]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Clear history for a new step
authorVladimir Ivannikov <vladimir.ivannikov@hzg.de>
Mon, 5 Dec 2022 10:20:26 +0000 (11:20 +0100)
committerVladimir Ivannikov <vladimir.ivannikov@hzg.de>
Mon, 5 Dec 2022 10:20:26 +0000 (11:20 +0100)
source/lac/solver_control.cc

index 8c13529801ef06157059dac486dba050fefeccf1..f5a0d9eb40b19b7e992f0beee49994f09b0a1d9d 100644 (file)
@@ -57,6 +57,9 @@ SolverControl::check(const unsigned int step, const double check_value)
   if (step == 0)
     {
       initial_val = check_value;
+
+      if (history_data_enabled)
+        history_data.clear();
     }
 
   if (m_log_history && ((step % m_log_frequency) == 0))
@@ -264,6 +267,9 @@ ReductionControl::check(const unsigned int step, const double check_value)
     {
       initial_val = check_value;
       reduced_tol = check_value * reduce;
+
+      if (history_data_enabled)
+        history_data.clear();
     }
 
   // check whether desired reduction

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.