13 #ifndef __deal2__appframe__timestep_control_h
14 #define __deal2__appframe__timestep_control_h
16 #include <base/subscriptor.h>
17 #include <base/smartpointer.h>
18 #include <lac/vector_memory.h>
22 using namespace dealii;
26 class ParameterHandler;
96 double tolerance = 1.e-2,
97 double start_step = 1.e-2,
98 double print_step = -1.,
99 bool autonomous =
false);
101 static void declare_parameters (ParameterHandler& param);
102 void parse_parameters (ParameterHandler& param);
107 double start ()
const;
115 double final ()
const;
120 double tolerance ()
const;
125 double step ()
const;
137 double next (
const double indicator);
145 bool autonomous ()
const;
158 void tolerance (
double);
162 void strategy (Strategy);
169 void start_step (
double);
175 void max_step (
double);
180 void autonomous (
bool);
197 void file_name_format (
const char*);
198 const char* file_name_format ();
227 TimestepControl::start ()
const
234 TimestepControl::final ()
const
241 TimestepControl::step ()
const
243 return current_step_val;
248 TimestepControl::tolerance ()
const
250 return tolerance_val;
255 TimestepControl::now ()
const
262 TimestepControl::start (
double t)
269 TimestepControl::final (
double t)
276 TimestepControl::tolerance (
double t)
290 TimestepControl::start_step (
double t)
297 TimestepControl::max_step (
double t)
304 TimestepControl::restart ()
307 step_val = (strategy_val == uniform)
310 current_step_val = step_val;
312 next_print_val = now_val + print_step;
314 next_print_val = now_val - 1.;
319 TimestepControl::file_name_format (
const char* fmt)
326 TimestepControl::file_name_format ()
333 TimestepControl::autonomous ()
const
335 return is_autonomous;
340 TimestepControl::autonomous (
bool b)