@@ -306,20 +306,24 @@ triangulation.
306306 Seed = newSeed;
307307 }
308308
309- inline bool newSeed () {
310- return OldSeed != Seed;
309+ inline void
310+ setReturnSaddleConnectors (const bool &returnSaddleConnectors) {
311+ OldReturnSaddleConnectors = ReturnSaddleConnectors;
312+ ReturnSaddleConnectors = returnSaddleConnectors;
311313 }
312314
313- inline bool newBackend () {
314- return OldBackEnd != BackEnd;
315+ inline bool newParameters () {
316+ return OldSeed != Seed || OldBackEnd != BackEnd
317+ || OldReturnSaddleConnectors != ReturnSaddleConnectors;
315318 }
316319
317320 inline void setSaddleConnectorsPersistenceThreshold (double threshold) {
318321 SaddleConnectorsPersistenceThreshold = threshold;
319322 }
320323
321324 /* *
322- * Preprocess all the required connectivity requests on the triangulation.
325+ * Preprocess all the required connectivity requests on the
326+ * triangulation.
323327 */
324328 inline void preconditionTriangulation (AbstractTriangulation *const data) {
325329 if (data != nullptr ) {
@@ -407,8 +411,8 @@ discrete gradient, false otherwise.
407411 bool isCellCritical (const Cell &cell) const ;
408412
409413 /* *
410- * Return the identifier of the cell paired to the cell given by the user
411- in the gradient.
414+ * Return the identifier of the cell paired to the cell given by the
415+ user in the gradient.
412416 */
413417 template <typename triangulationType>
414418 SimplexId getPairedCell (const Cell &cell,
@@ -461,8 +465,8 @@ in the gradient.
461465 bool *const cycleFound = nullptr ) const ;
462466
463467 /* *
464- * Detect the presence of a cycle on a edge-triangle path starting from an
465- * edge.
468+ * Detect the presence of a cycle on a edge-triangle path starting from
469+ * an edge.
466470 */
467471 template <typename triangulationType>
468472 bool detectGradientCycle (const Cell &cell,
@@ -686,8 +690,8 @@ in the gradient.
686690 std::vector<float > &stencilLength);
687691
688692 /* *
689- * @brief Compute the opposite of numerical gradient at point x with given
690- * stencil
693+ * @brief Compute the opposite of numerical gradient at point x with
694+ * given stencil
691695 */
692696 void computeDerivatives (
693697 const SimplexId &x,
@@ -939,7 +943,9 @@ gradient, false otherwise.
939943 BACKEND OldBackEnd{BACKEND::CLASSIC_BACKEND};
940944 unsigned int Seed{};
941945 unsigned int OldSeed{};
942-
946+ bool ReturnSaddleConnectors{};
947+ bool OldReturnSaddleConnectors{};
948+ bool FirstRun{true };
943949 // spare storage (bypass cache) for gradient internal structure
944950 AbstractTriangulation::gradientType localGradient_{};
945951 // cache key (scalar field pointer + timestamp)
0 commit comments