Skip to content

Commit 74c950b

Browse files
committed
Merge branch 'dev' of https://github.com/topology-tool-kit/ttk into DelRips
2 parents b3892e3 + 98e6984 commit 74c950b

File tree

98 files changed

+16448
-3874
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+16448
-3874
lines changed

.github/workflows/test-macos.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ jobs:
139139
run: |
140140
cd ttk-data
141141
# remove buggy example
142+
rm python/harmonicSkeleton.py
142143
# related issue: https://github.com/topology-tool-kit/ttk/issues/1055
143144
rm python/nestedTrackingFromOverlap.py
144145
# tmp removal of mpi example

ChangeLog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
## TTK - ChangeLog
22
=
33
### dev
4-
- Cycle-aware dimensionality reduction (TopoAE++)
4+
- Cycle-aware dimensionality reduction (TopoAE++, IEEE TVCG 2026)
55
- Distributed computation of persistent homology! (IEEE TPDS 2025)
6+
- Discrete vector field topology! (IEEE VIS 2024)
67
- New backend for TrackingFromFields (critical point based)
8+
- Stochastic discrete gradient (IEEE VIS 2012)
79
- Fast planar Rips filtration persistence computation
810
- Migration to ParaView 6
911
- CI updates

core/base/common/welcomeMsg.inl

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,37 @@
22
// Julien Tierny <[email protected]>
33
// January 2020.
44

5-
// "TTK (c) 2025"
5+
// "TTK (c) 2026"
66

77
printMsg(
88
debug::output::BOLD
9-
+ " _____ _____ _ __ __ __ ____ ___ ____ ____"
9+
+ " _____ _____ _ __ __ __ ____ ___ ____ __"
1010
+ debug::output::ENDCOLOR,
1111
debug::Priority::PERFORMANCE,
1212
debug::LineMode::NEW,
1313
stream);
1414
printMsg(debug::output::BOLD
15-
+ "|_ _|_ _| |/ / / /__\\ \\ |___ \\ / _ "
16-
"\\___ \\| ___|"
15+
+ "|_ _|_ _| |/ / / /__\\ \\ |___ \\ / _ \\___ \\ / /_"
1716
+ debug::output::ENDCOLOR,
1817
debug::Priority::PERFORMANCE,
1918
debug::LineMode::NEW,
2019
stream);
2120
printMsg(
2221
debug::output::BOLD
23-
+ " | | | | | ' / | |/ __| | __) | | | |__) |___ \\"
22+
+ " | | | | | ' / | |/ __| | __) | | | |__) | '_ \\"
2423
+ debug::output::ENDCOLOR,
2524
debug::Priority::PERFORMANCE,
2625
debug::LineMode::NEW,
2726
stream);
2827
printMsg(
2928
debug::output::BOLD
30-
+ " | | | | | . \\ | | (__| | / __/| |_| / __/ ___) |"
29+
+ " | | | | | . \\ | | (__| | / __/| |_| / __/| (_) |"
3130
+ debug::output::ENDCOLOR,
3231
debug::Priority::PERFORMANCE,
3332
debug::LineMode::NEW,
3433
stream);
3534
printMsg(debug::output::BOLD
36-
+ " |_| |_| |_|\\_\\ | |\\___| | "
37-
"|_____|\\___/_____|____/"
35+
+ " |_| |_| |_|\\_\\ | |\\___| | |_____|\\___/_____|\\___/"
3836
+ debug::output::ENDCOLOR,
3937
debug::Priority::PERFORMANCE,
4038
debug::LineMode::NEW,

core/base/dimensionReduction/DimensionReduction.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,23 +81,14 @@ int DimensionReduction::execute(
8181
ae_CUDA, ae_Deterministic, ae_Seed, NumberOfComponents, ae_Epochs,
8282
ae_LearningRate, ae_Optimizer, ae_Method, ae_Model, ae_Architecture,
8383
ae_Activation, ae_BatchSize, ae_BatchNormalization, ae_RegCoefficient,
84-
IsInputImages);
84+
IsInputImages, ae_PreOptimize, ae_PreOptimizeEpochs);
8585
tcdr.setDebugLevel(debugLevel_);
8686
tcdr.setThreadNumber(threadNumber_);
8787

8888
outputEmbedding.resize(NumberOfComponents);
8989
for(int d = 0; d < NumberOfComponents; d++)
9090
outputEmbedding[d].resize(nRows);
9191

92-
if(ae_PreOptimize) {
93-
DimensionReduction initDR;
94-
initDR.setDebugLevel(debugLevel_);
95-
initDR.setInputMethod(ae_PreOptimizeMethod);
96-
std::vector<std::vector<double>> latentInitialization;
97-
initDR.execute(latentInitialization, inputMatrix, nRows, nColumns);
98-
tcdr.setLatentInitialization(latentInitialization);
99-
}
100-
10192
tcdr.execute(outputEmbedding, inputMatrix, nRows);
10293

10394
this->printMsg("Computed AE dimension reduction", 1.0, t.getElapsedTime(),

core/base/dimensionReduction/DimensionReduction.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@
6666
///
6767
/// "Topological Autoencoders++: Fast and Accurate Cycle-Aware Dimensionality
6868
/// Reduction" \n
69-
/// Mattéo Clémot, Julie Digne, Julien Tierny, \n
70-
/// arXiv preprint, 2025.
69+
/// Mattéo Clémot, Julie Digne, Julien Tierny, \n
70+
/// IEEE Transactions on Visualization and Computer Graphics.
71+
/// Accepted, to be presented at IEEE VIS 2026.
7172

7273
#pragma once
7374

@@ -365,7 +366,7 @@ namespace ttk {
365366
bool ae_BatchNormalization{true};
366367
double ae_RegCoefficient{1e-2};
367368
bool ae_PreOptimize{false};
368-
METHOD ae_PreOptimizeMethod{METHOD::PCA};
369+
int ae_PreOptimizeEpochs{1000};
369370

370371
// testing
371372
std::string ModulePath{"default"};

core/base/discreteGradient/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ ttk_add_base_library(discreteGradient
66
DiscreteGradient_Template.h
77
DEPENDS
88
triangulation
9+
ftmTree
910
)

core/base/discreteGradient/DiscreteGradient.cpp

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,58 @@ int DiscreteGradient::setManifoldSize(
249249
return 0;
250250
}
251251

252+
void DiscreteGradient::computeDerivatives(
253+
const SimplexId &x,
254+
const std::vector<SimplexId> &stencilIds,
255+
const std::array<float, 3> &xCoords,
256+
const std::vector<std::array<float, 3>> &stencilCoords,
257+
double (&grad)[3]) {
258+
259+
const double *scalars
260+
= static_cast<double const *>(this->inputScalarField_.first);
261+
if(stencilIds[0] != -1 && stencilIds[1] != -1)
262+
grad[0] = -(scalars[stencilIds[0]] - scalars[stencilIds[1]])
263+
/ std::abs(stencilCoords[0][0] - stencilCoords[1][0]);
264+
else if(stencilIds[0] != -1 && stencilIds[1] == -1)
265+
grad[0] = -(scalars[stencilIds[0]] - scalars[x])
266+
/ std::abs(stencilCoords[0][0] - xCoords[0]);
267+
else if(stencilIds[1] != -1 && stencilIds[0] == -1)
268+
grad[0] = -(scalars[x] - scalars[stencilIds[1]])
269+
/ std::abs(stencilCoords[1][0] - xCoords[0]);
270+
if(stencilIds[2] != -1 && stencilIds[3] != -1)
271+
grad[1] = -(scalars[stencilIds[2]] - scalars[stencilIds[3]])
272+
/ std::abs(stencilCoords[2][1] - stencilCoords[3][1]);
273+
else if(stencilIds[2] != -1 && stencilIds[3] == -1)
274+
grad[1] = -(scalars[stencilIds[2]] - scalars[x])
275+
/ std::abs(stencilCoords[2][1] - xCoords[1]);
276+
else if(stencilIds[3] != -1 && stencilIds[2] == -1)
277+
grad[1] = -(scalars[x] - scalars[stencilIds[3]])
278+
/ std::abs(stencilCoords[3][1] - xCoords[1]);
279+
if(stencilIds[4] != -1 && stencilIds[5] != -1)
280+
grad[2] = -(scalars[stencilIds[4]] - scalars[stencilIds[5]])
281+
/ std::abs(stencilCoords[4][2] - stencilCoords[5][2]);
282+
else if(stencilIds[4] != -1 && stencilIds[5] == -1)
283+
grad[2] = -(scalars[stencilIds[4]] - scalars[x])
284+
/ std::abs(stencilCoords[4][2] - xCoords[2]);
285+
else if(stencilIds[5] != -1 && stencilIds[4] == -1)
286+
grad[2] = -(scalars[x] - scalars[stencilIds[5]])
287+
/ std::abs(stencilCoords[5][2] - xCoords[2]);
288+
}
289+
290+
int DiscreteGradient::getCriticalPointMap(
291+
const vector<pair<SimplexId, char>> &criticalPoints, vector<char> &isPL) {
292+
isPL.resize(numberOfVertices_);
293+
std::fill(isPL.begin(), isPL.end(), 0);
294+
for(pair<SimplexId, char> criticalPoint : criticalPoints) {
295+
const SimplexId criticalPointId = criticalPoint.first;
296+
const char criticalPointType = criticalPoint.second;
297+
298+
isPL[criticalPointId] = criticalPointType;
299+
}
300+
301+
return 0;
302+
}
303+
252304
#ifdef TTK_ENABLE_MPI
253305
void DiscreteGradient::setCellToGhost(const int cellDim,
254306
const SimplexId cellId) {

0 commit comments

Comments
 (0)