@@ -74,7 +74,8 @@ int DiscreteGradient::buildGradient(const triangulationType &triangulation,
7474 this ->numberOfVertices_ = triangulation.getNumberOfVertices ();
7575
7676 this ->gradient_ = bypassCache ? &this ->localGradient_ : findGradient ();
77- if (this ->gradient_ == nullptr || bypassCache) {
77+ bool newParameters = (this ->newBackend ()) || (this ->newSeed ());
78+ if (this ->gradient_ == nullptr || bypassCache || newParameters) {
7879
7980 if (!bypassCache) {
8081 // add new cache entry
@@ -93,13 +94,13 @@ int DiscreteGradient::buildGradient(const triangulationType &triangulation,
9394 } else if (this ->BackEnd == BACKEND::STOCHASTIC_BACKEND) {
9495 this ->processLowerStarsStochastic <dataType, triangulationType>(
9596 this ->inputOffsets_ , triangulation);
96- this ->printMsg (" Build stochastic discrete gradient" , 1.0 ,
97+ this ->printMsg (" Built discrete gradient (Stochastic elgorithm) " , 1.0 ,
9798 tm.getElapsedTime (), this ->threadNumber_ );
9899
99100 } else if (this ->BackEnd == BACKEND::CLASSIC_BACKEND) {
100101 this ->processLowerStars (this ->inputOffsets_ , triangulation);
101- this ->printMsg (" Built discrete gradient" , 1.0 , tm. getElapsedTime () ,
102- this ->threadNumber_ );
102+ this ->printMsg (" Built discrete gradient (Homotopic expansion algorithm) " ,
103+ 1.0 , tm. getElapsedTime (), this ->threadNumber_ );
103104#ifdef TTK_ENABLE_MPI_TIME
104105 double elapsedTime
105106 = ttk::endMPITimer (t_mpi, ttk::MPIrank_, ttk::MPIsize_);
0 commit comments