File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,9 @@ namespace pfasst
171171 options::add_option<double >(" Duration" , " tend" , " final time of simulation" );
172172 options::add_option<size_t >(" Duration" , " num_iters" , " number of iterations" );
173173
174+ options::add_option<double >(" Tolerances" , " abs_res_tol" , " absolute residual tolerance" );
175+ options::add_option<double >(" Tolerances" , " rel_res_tol" , " relative residual tolerance" );
176+
174177 options::get_instance ().init ();
175178 }
176179
Original file line number Diff line number Diff line change @@ -92,6 +92,13 @@ namespace pfasst
9292 }
9393 // ! @}
9494
95+ // ! @{
96+ virtual void set_options () override
97+ {
98+ this ->abs_residual_tol = time (config::get_value<double >(" abs_res_tol" , this ->abs_residual_tol ));
99+ this ->rel_residual_tol = time (config::get_value<double >(" rel_res_tol" , this ->rel_residual_tol ));
100+ }
101+
95102 virtual void setup (bool coarse) override
96103 {
97104 auto const nodes = this ->quadrature ->get_nodes ();
@@ -113,6 +120,7 @@ namespace pfasst
113120 }
114121 }
115122 }
123+ // ! @}
116124
117125 // ! @{
118126 virtual void spread () override
@@ -121,7 +129,6 @@ namespace pfasst
121129 this ->state [m]->copy (this ->state [0 ]);
122130 }
123131 }
124- // ! @}
125132
126133 /* *
127134 * Save current solution states.
@@ -137,6 +144,7 @@ namespace pfasst
137144 }
138145 }
139146 }
147+ // ! @}
140148
141149 // ! @{
142150 void set_quadrature (shared_ptr<IQuadrature<time>> quadrature)
You can’t perform that action at this time.
0 commit comments