File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ struct CheckParams
77 double err_threshold = 1e-13 ; // maximum acceptable error
88 bool print_max_err_always = true ; // always print error, even if acceptable
99 bool dump_always = false ; // always dump compared fields, even if acceptable
10+ bool exit_on_failure = false ; // exit the program if check fails
1011
1112 bool enabled () { return check_interval > 0 ; }
1213
Original file line number Diff line number Diff line change 1-
21#pragma once
32
43#include " fields.hxx"
@@ -102,7 +101,10 @@ public:
102101 MPI_Barrier (grid.comm ());
103102 }
104103
105- assert (max_err < err_threshold);
104+ if (exit_on_failure && max_err >= err_threshold) {
105+ LOG_ERROR (" exiting due to failed continuity check\n " );
106+ }
107+
106108 last_max_err = max_err;
107109 }
108110
@@ -185,7 +187,10 @@ public:
185187 writer_.end_step ();
186188 }
187189
188- assert (max_err < err_threshold);
190+ if (exit_on_failure && max_err >= err_threshold) {
191+ LOG_ERROR (" exiting due to failed gauss check\n " );
192+ }
193+
189194 last_max_err = max_err;
190195 }
191196
You can’t perform that action at this time.
0 commit comments