www.mooseframework.org
IterationAdaptiveDT.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 // MOOSE includes
11 #include "IterationAdaptiveDT.h"
12 #include "Function.h"
13 #include "PiecewiseLinear.h"
14 #include "Transient.h"
15 #include "NonlinearSystem.h"
16 
17 #include <limits>
18 #include <set>
19 
21 
24 {
26  params.addClassDescription("Adjust the timestep based on the number of iterations");
27  params.addParam<int>("optimal_iterations",
28  "The target number of nonlinear iterations for adaptive timestepping");
29  params.addParam<int>("iteration_window",
30  "Attempt to grow/shrink timestep if the iteration count "
31  "is below/above 'optimal_iterations plus/minus "
32  "iteration_window' (default = optimal_iterations/5).");
33  params.addParam<unsigned>("linear_iteration_ratio",
34  "The ratio of linear to nonlinear iterations "
35  "to determine target linear iterations and "
36  "window for adaptive timestepping (default = "
37  "25)");
38  params.addParam<std::vector<PostprocessorName>>("timestep_limiting_postprocessor",
39  "If specified, a list of postprocessor values "
40  "used as an upper limit for the "
41  "current time step length");
42  params.addParam<std::vector<FunctionName>>(
43  "timestep_limiting_function",
44  "A list of 'PiecewiseBase' type functions used to control the timestep by "
45  "limiting the change in the function over a timestep");
46  params.addParam<Real>(
47  "max_function_change",
48  "The absolute value of the maximum change in timestep_limiting_function over a timestep");
49  params.addParam<bool>("force_step_every_function_point",
50  false,
51  "Forces the timestepper to take "
52  "a step that is consistent with "
53  "points defined in the function");
54  params.addRangeCheckedParam<Real>(
55  "post_function_sync_dt",
56  "post_function_sync_dt>0",
57  "Timestep to apply after time sync with function point. To be used in "
58  "conjunction with 'force_step_every_function_point'.");
59  params.addRequiredParam<Real>("dt", "The default timestep size between solves");
60  params.addParam<std::vector<Real>>("time_t", {}, "The values of t");
61  params.addParam<std::vector<Real>>("time_dt", {}, "The values of dt");
62  params.addParam<Real>("growth_factor",
63  2.0,
64  "Factor to apply to timestep if easy convergence (if "
65  "'optimal_iterations' is specified) or if recovering "
66  "from failed solve");
67  params.addParam<Real>("cutback_factor",
68  0.5,
69  "Factor to apply to timestep if difficult convergence "
70  "occurs (if 'optimal_iterations' is specified). "
71  "For failed solves, use cutback_factor_at_failure");
72 
73  params.addParam<bool>("reject_large_step",
74  false,
75  "If 'true', time steps that are too large compared to the "
76  "ideal time step will be rejected and repeated");
77  params.addRangeCheckedParam<Real>("reject_large_step_threshold",
78  0.1,
79  "reject_large_step_threshold > 0 "
80  "& reject_large_step_threshold < 1",
81  "Ratio between the the ideal time step size and the "
82  "current time step size below which a time step will "
83  "be rejected if 'reject_large_step' is 'true'");
84 
85  params.declareControllable("growth_factor cutback_factor");
86 
87  return params;
88 }
89 
91  : TimeStepper(parameters),
93  _dt_old(declareRestartableData<Real>("dt_old", 0.0)),
94  _input_dt(getParam<Real>("dt")),
95  _tfunc_last_step(declareRestartableData<bool>("tfunc_last_step", false)),
96  _sync_last_step(declareRestartableData<bool>("sync_last_step", false)),
97  _linear_iteration_ratio(isParamValid("linear_iteration_ratio")
98  ? getParam<unsigned>("linear_iteration_ratio")
99  : 25), // Default to 25
100  _adaptive_timestepping(false),
101  _pps_value(
102  parameters.get<std::vector<PostprocessorName>>("timestep_limiting_postprocessor").size()),
103  _timestep_limiting_functions(),
104  _piecewise_timestep_limiting_functions(),
105  _piecewise_linear_timestep_limiting_functions(),
106  _times(0),
107  _max_function_change(-1),
108  _force_step_every_function_point(getParam<bool>("force_step_every_function_point")),
109  _post_function_sync_dt(isParamValid("force_step_every_function_point") &&
110  isParamValid("post_function_sync_dt")
111  ? getParam<Real>("post_function_sync_dt")
112  : 0.0),
113  _tfunc_times(getParam<std::vector<Real>>("time_t").begin(),
114  getParam<std::vector<Real>>("time_t").end()),
115  _time_ipol(getParam<std::vector<Real>>("time_t"), getParam<std::vector<Real>>("time_dt")),
116  _use_time_ipol(_time_ipol.getSampleSize() > 0),
117  _growth_factor(getParam<Real>("growth_factor")),
118  _cutback_factor(getParam<Real>("cutback_factor")),
119  _nl_its(declareRestartableData<unsigned int>("nl_its", 0)),
120  _l_its(declareRestartableData<unsigned int>("l_its", 0)),
121  _cutback_occurred(declareRestartableData<bool>("cutback_occurred", false)),
122  _at_function_point(false),
123  _reject_large_step(getParam<bool>("reject_large_step")),
124  _large_step_rejection_threshold(getParam<Real>("reject_large_step_threshold"))
125 {
126  auto timestep_limiting_postprocessor_names =
127  parameters.get<std::vector<PostprocessorName>>("timestep_limiting_postprocessor");
128  for (size_t i = 0; i < _pps_value.size(); ++i)
129  _pps_value[i] = &getPostprocessorValueByName(timestep_limiting_postprocessor_names[i]);
130 
131  if (isParamValid("optimal_iterations"))
132  {
133  _adaptive_timestepping = true;
134  _optimal_iterations = getParam<int>("optimal_iterations");
135 
136  if (isParamValid("iteration_window"))
137  _iteration_window = getParam<int>("iteration_window");
138  else
140  }
141  else
142  {
143  if (isParamValid("iteration_window"))
144  mooseError("'optimal_iterations' must be used for 'iteration_window' to be used");
145  if (isParamValid("linear_iteration_ratio"))
146  mooseError("'optimal_iterations' must be used for 'linear_iteration_ratio' to be used");
147  }
148 
149  if (isParamValid("timestep_limiting_function"))
151  isParamValid("max_function_change") ? getParam<Real>("max_function_change") : -1;
152  else
153  {
154  if (isParamValid("max_function_change"))
155  mooseError("'timestep_limiting_function' must be used for 'max_function_change' to be used");
157  mooseError("'timestep_limiting_function' must be used for 'force_step_every_function_point' "
158  "to be used");
159  }
160 
161  if (!isParamValid("force_step_every_function_point") && isParamValid("post_function_sync_dt"))
162  paramError("post_function_sync_dt",
163  "Not applicable if 'force_step_every_function_point = false'");
164 }
165 
166 void
168 {
169  if (isParamValid("timestep_limiting_function"))
170  {
171  std::set<Real> times;
172 
173  const auto tid = isParamValid("_tid") ? getParam<THREAD_ID>("_tid") : 0;
174  for (const auto & name : getParam<std::vector<FunctionName>>("timestep_limiting_function"))
175  {
176  const auto * func = &_fe_problem.getFunction(name, tid);
177  _timestep_limiting_functions.push_back(func);
178 
179  const auto * pfunc = dynamic_cast<const PiecewiseBase *>(func);
181 
182  if (pfunc)
183  {
184  const auto * plfunc = dynamic_cast<const PiecewiseLinear *>(pfunc);
186 
187  const auto ntimes = pfunc->functionSize();
188  for (unsigned int i = 0; i < ntimes; ++i)
189  times.insert(pfunc->domain(i));
190  }
191  else
192  mooseError("timestep_limiting_function must be a PiecewiseBase function");
193  }
194  _times.resize(times.size());
195  std::copy(times.begin(), times.end(), _times.begin());
196 
197  mooseAssert(_timestep_limiting_functions.size() ==
199  "Timestep limiting function count inconsistency");
200  mooseAssert(_piecewise_timestep_limiting_functions.size() ==
202  "Timestep limiting function count inconsistency");
203  }
204 }
205 
206 void
208 {
210 
211  // Delete all tfunc times that are at or before the begin time
212  while (!_tfunc_times.empty() && _time + _timestep_tolerance >= *_tfunc_times.begin())
213  _tfunc_times.erase(_tfunc_times.begin());
214 }
215 
216 Real
218 {
219  Real dt;
220  if (_tfunc_last_step)
221  {
223  if (_verbose)
224  _console << "Setting initial dt to value specified by dt function: " << std::setw(9) << dt
225  << std::endl;
226  }
227  else
228  {
229  dt = _input_dt;
230  if (_verbose)
231  _console << "Setting initial dt to input value: " << std::setw(9) << dt << std::endl;
232  }
233  return dt;
234 }
235 
236 Real
238 {
239  Real dt = _dt_old;
240 
241  if (_cutback_occurred)
242  {
243  _cutback_occurred = false;
245  {
246  // Don't allow it to grow this step, but shrink if needed
247  bool allowToGrow = false;
248  computeAdaptiveDT(dt, allowToGrow);
249  }
250  }
251  else if (_tfunc_last_step)
252  {
253  _sync_last_step = false;
255 
256  if (_verbose)
257  _console << "Setting dt to value specified by dt function: " << std::setw(9) << dt
258  << std::endl;
259  }
260  else if (_sync_last_step)
261  {
262  _sync_last_step = false;
264  {
266 
267  if (_verbose)
268  _console << "Setting dt to 'post_function_sync_dt': " << std::setw(9) << dt << std::endl;
269  }
270  else
271  {
273 
274  if (_verbose)
275  _console << "Setting dt to unconstrained value used before sync: " << std::setw(9) << dt
276  << std::endl;
277  }
278  }
279  else if (_adaptive_timestepping)
280  computeAdaptiveDT(dt);
281  else if (_use_time_ipol)
282  dt = computeInterpolationDT();
283  else
284  {
285  dt *= _growth_factor;
286  if (dt > _dt_old * _growth_factor)
287  dt = _dt_old * _growth_factor;
288  if (_verbose)
289  _console << "Growing dt based on growth factor (" << _growth_factor
290  << ") and previous dt before sync (" << _dt_old << ") : " << std::setw(9) << dt
291  << std::endl;
292  }
293 
294  return dt;
295 }
296 
297 bool
299 {
300  bool at_sync_point = TimeStepper::constrainStep(dt);
301 
302  // Limit the timestep to postprocessor value
304 
305  // Limit the timestep to limit change in the function
306  limitDTByFunction(dt);
307 
308  // Adjust to the next tfunc time if needed
309  if (!_tfunc_times.empty() && _time + dt + _timestep_tolerance >= *_tfunc_times.begin())
310  {
311  dt = *_tfunc_times.begin() - _time;
312 
313  if (_verbose)
314  _console << "Limiting dt to sync with dt function time: " << std::setw(9)
315  << *_tfunc_times.begin() << " dt: " << std::setw(9) << dt << std::endl;
316  }
317 
318  return at_sync_point;
319 }
320 
321 Real
323 {
324  _cutback_occurred = true;
325 
326  // Can't cut back any more
327  if (_dt <= _dt_min)
328  mooseError("Solve failed and timestep already at dtmin, cannot continue!");
329 
330  if (_verbose)
331  {
332  _console << "\nSolve failed with dt: " << std::setw(9) << _dt
333  << "\nRetrying with reduced dt: " << std::setw(9) << _dt * _cutback_factor_at_failure
334  << std::endl;
335  }
336  else
337  _console << "\nSolve failed, cutting timestep." << std::endl;
338 
340 }
341 
342 bool
344 {
345  if (!_reject_large_step)
346  return TimeStepper::converged();
347 
348  // the solver has not converged
349  if (!TimeStepper::converged())
350  return false;
351 
352  // we are already at dt_min or at the start of the simulation
353  // in which case we can move on to the next step
354  if (_dt == _dt_min || _t_step < 2)
355  return true;
356 
357  // we get what the next time step should be
358  Real dt_test = _dt;
360 
361  // we cannot constrain the time step any further
362  if (dt_test == 0)
363  return true;
364 
365  // if the time step is much smaller than the current time step
366  // we need to repeat the current iteration with a smaller time step
367  if (dt_test < _dt * _large_step_rejection_threshold)
368  return false;
369 
370  // otherwise we move one
371  return true;
372 }
373 
374 void
376 {
377  if (_pps_value.size() != 0 && _t_step > 1)
378  {
379  Real limiting_pps_value = *_pps_value[0];
380  unsigned int i_min = 0;
381  for (size_t i = 1; i < _pps_value.size(); ++i)
382  if (*_pps_value[i] < limiting_pps_value)
383  {
384  limiting_pps_value = *_pps_value[i];
385  i_min = i;
386  }
387 
388  if (limitedDT > limiting_pps_value)
389  {
390  if (limiting_pps_value < 0)
391  mooseWarning(
392  "Negative timestep limiting postprocessor '" +
393  getParam<std::vector<PostprocessorName>>("timestep_limiting_postprocessor")[i_min] +
394  "': " + std::to_string(limiting_pps_value));
395  limitedDT = std::max(_dt_min, limiting_pps_value);
396 
397  if (_verbose)
398  _console << "Limiting dt to postprocessor value. dt = " << limitedDT << std::endl;
399  }
400  }
401 }
402 
403 void
405 {
406  Real orig_dt = limitedDT;
407  const auto nfunc = _timestep_limiting_functions.size();
408  Real restricted_step = std::numeric_limits<Real>::max();
409 
410  for (unsigned int j = 0; j < nfunc; ++j)
411  {
412  // Limit by function change for piecewise linear functions.
414  {
415  const auto current_function_value =
417 
418  const auto ntimes = _piecewise_linear_timestep_limiting_functions[j]->functionSize();
419  for (std::size_t next_time_index = 1; next_time_index < ntimes; ++next_time_index)
420  {
421  const auto next_time =
422  _piecewise_linear_timestep_limiting_functions[j]->domain(next_time_index);
423 
424  // Skip ahead to find time point that is just past the current time.
425  if (next_time + _timestep_tolerance <= _time)
426  continue;
427 
428  // Find out how far we can go without exceeding the max function change.
429  const auto next_function_value =
430  _piecewise_linear_timestep_limiting_functions[j]->range(next_time_index);
431  const auto change = std::abs(next_function_value - current_function_value);
432  if (change > _max_function_change)
433  {
434  // Interpolate to find step.
435  restricted_step =
436  std::min(restricted_step, (_max_function_change / change) * (next_time - _time));
437  break;
438  }
439 
440  // Don't keep going if we've already passed the current limited step.
441  if (next_time > _time + limitedDT)
442  break;
443  }
444  }
445  else if (_timestep_limiting_functions[j])
446  {
447  const Real old_value = _timestep_limiting_functions[j]->value(_time_old);
448  Real new_value = _timestep_limiting_functions[j]->value(_time_old + limitedDT);
449  Real change = std::abs(new_value - old_value);
450 
451  if (_max_function_change > 0.0 && change > _max_function_change)
452  do
453  {
454  limitedDT /= 2.0;
455  new_value = _timestep_limiting_functions[j]->value(_time_old + limitedDT);
456  change = std::abs(new_value - old_value);
457  } while (change > _max_function_change);
458  }
459  }
460 
461  if (restricted_step < limitedDT)
462  limitedDT = std::max(_dt_min, restricted_step);
463 
464  _at_function_point = false;
466  for (unsigned int i = 0; i + 1 < _times.size(); ++i)
467  if (_time >= _times[i] && _time < _times[i + 1])
468  {
469  if (limitedDT > _times[i + 1] - _time - _timestep_tolerance)
470  {
471  limitedDT = _times[i + 1] - _time;
472  _at_function_point = true;
473  }
474  break;
475  }
476 
477  if (_verbose && limitedDT != orig_dt)
478  {
479  if (_at_function_point)
480  _console << "Limiting dt to match function point. dt = ";
481  else
482  _console << "Limiting dt to limit change in function. dt = ";
483 
484  _console << limitedDT << std::endl;
485  }
486 }
487 
488 void
489 IterationAdaptiveDT::computeAdaptiveDT(Real & dt, bool allowToGrow, bool allowToShrink)
490 {
491  const unsigned int growth_nl_its(
493  const unsigned int shrink_nl_its(_optimal_iterations + _iteration_window);
494  const unsigned int growth_l_its(_optimal_iterations > _iteration_window
497  : 0);
498  const unsigned int shrink_l_its(_linear_iteration_ratio *
500 
501  if (allowToGrow && (_nl_its < growth_nl_its && _l_its < growth_l_its))
502  {
503  // Grow the timestep
504  dt *= _growth_factor;
505 
506  if (_verbose)
507  _console << "Growing dt: nl its = " << _nl_its << " < " << growth_nl_its
508  << " && lin its = " << _l_its << " < " << growth_l_its << " old dt: " << std::setw(9)
509  << _dt_old << " new dt: " << std::setw(9) << dt << '\n';
510  }
511  else if (allowToShrink && (_nl_its > shrink_nl_its || _l_its > shrink_l_its))
512  {
513  // Shrink the timestep
514  dt *= _cutback_factor;
515 
516  if (_verbose)
517  _console << "Shrinking dt: nl its = " << _nl_its << " > " << shrink_nl_its
518  << " || lin its = " << _l_its << " > " << shrink_l_its << " old dt: " << std::setw(9)
519  << _dt_old << " new dt: " << std::setw(9) << dt << '\n';
520  }
521 
522  _console << std::flush;
523 }
524 
525 Real
527 {
529 
530  if (dt > _dt_old * _growth_factor)
531  {
532  dt = _dt_old * _growth_factor;
533 
534  if (_verbose)
535  _console << "Growing dt to recover from cutback. "
536  << " old dt: " << std::setw(9) << _dt_old << " new dt: " << std::setw(9) << dt
537  << std::endl;
538  }
539 
540  return dt;
541 }
542 
543 void
545 {
547 }
548 
549 void
551 {
553 
554  _tfunc_last_step = false;
555  while (!_tfunc_times.empty() && _time + _timestep_tolerance >= *_tfunc_times.begin())
556  {
557  if (std::abs(_time - *_tfunc_times.begin()) <= _timestep_tolerance)
558  _tfunc_last_step = true;
559 
560  _tfunc_times.erase(_tfunc_times.begin());
561  }
562 
565 
568  {
570  _sync_last_step = true;
571 
572  if (_verbose)
573  _console << "Sync point hit in current step, using previous dt for old dt: " << std::setw(9)
574  << _dt_old << std::endl;
575  }
576  else
577  _dt_old = _dt;
578 }
static InputParameters validParams()
Definition: TimeStepper.C:16
Real & _timestep_tolerance
Definition: TimeStepper.h:140
unsigned int nLinearIterations() const
Return the number of linear iterations.
bool atSyncPoint()
Is the current step at a sync point (sync times, time interval, target time, etc)?
Definition: Transient.h:201
Function base which provides a piecewise approximation to a specified (x,y) point data set...
Definition: PiecewiseBase.h:20
virtual Real & dtOld() const
const Real & _cutback_factor
cut the timestep by by this factor
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
unsigned int & _nl_its
Number of nonlinear iterations in previous solve.
std::vector< const Function * > _timestep_limiting_functions
std::vector< const PostprocessorValue * > _pps_value
if specified, the postprocessor values used to determine an upper limit for the time step length ...
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
Definition: MooseUtils.h:1147
Real & _time_old
Definition: TimeStepper.h:132
virtual Real computeDT() override
Called to compute _current_dt for a normal step.
Adjust the timestep based on the number of iterations.
Base class for time stepping.
Definition: TimeStepper.h:22
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
T sample(const T &x) const
This function will take an independent variable input and will return the dependent variable based on...
const Real _input_dt
The dt from the input file.
Function which provides a piecewise continuous linear interpolation of a provided (x...
virtual Real computeInitialDT() override
Called to compute _current_dt for the first timestep.
Transient & _executioner
Reference to transient executioner.
Definition: TimeStepper.h:128
IterationAdaptiveDT(const InputParameters &parameters)
virtual bool constrainStep(Real &dt)
Called after computeStep() is called.
Definition: TimeStepper.C:102
bool _reject_large_step
Indicates whether we need to reject a time step much larger than its ideal size.
void limitDTByFunction(Real &limitedDT)
virtual bool constrainStep(Real &dt) override
Called after computeStep() is called.
virtual bool converged() const
If the time step converged.
Definition: TimeStepper.C:197
std::vector< const PiecewiseLinear * > _piecewise_linear_timestep_limiting_functions
const Real _cutback_factor_at_failure
Cutback factor if a time step fails to converge.
Definition: TimeStepper.h:149
const Real & _growth_factor
grow the timestep by this factor
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
int _optimal_iterations
Adapt the timestep to maintain this non-linear iteration count...
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
auto max(const L &left, const R &right)
virtual Real computeFailedDT() override
Called to compute _current_dt after a solve has failed.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
const bool _force_step_every_function_point
insert sync points at the time nodes of the _piecewise_timestep_limiting_function ...
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
const bool & _verbose
whether a detailed diagnostic output should be printed
Definition: TimeStepper.h:143
FEProblemBase & _fe_problem
Definition: TimeStepper.h:126
virtual Function & getFunction(const std::string &name, const THREAD_ID tid=0)
Real unconstrainedDT()
Get the unconstrained dt.
Definition: Transient.h:207
const bool _use_time_ipol
true if we want to use piecewise-defined time stepping
std::vector< const PiecewiseBase * > _piecewise_timestep_limiting_functions
unsigned int & _l_its
Number of linear iterations in previous solve.
static InputParameters validParams()
virtual void preExecute() override
virtual void acceptStep()
This gets called when time step is accepted.
Definition: TimeStepper.C:175
LinearInterpolation _time_ipol
PiecewiseBase linear definition of time stepping.
const Real _post_function_sync_dt
Set timestep size if previous timestep is synced with function.
virtual void rejectStep() override
This gets called when time step is rejected.
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
std::set< Real > _tfunc_times
bool _adaptive_timestepping
adaptive timestepping is active if the optimal_iterations input parameter is specified ...
NonlinearSystemBase & getNonlinearSystemBase(const unsigned int sys_num)
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
void limitDTToPostprocessorValue(Real &limitedDT) const
virtual bool converged() const override
If the time step converged.
virtual const PostprocessorValue & getPostprocessorValueByName(const PostprocessorName &name) const
Retrieve the value of the Postprocessor.
virtual void init() override
Initialize the time stepper.
void computeAdaptiveDT(Real &dt, bool allowToGrow=true, bool allowToShrink=true)
unsigned int nNonlinearIterations() const
Return the number of non-linear iterations.
const int _linear_iteration_ratio
use _optimal_iterations and _iteration_window multiplied with this factor for linear iterations ...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< Real > _times
time point defined in the piecewise function
registerMooseObject("MooseApp", IterationAdaptiveDT)
int _iteration_window
...plus/minus this value.
virtual void preExecute()
Definition: TimeStepper.C:70
virtual void rejectStep()
This gets called when time step is rejected.
Definition: TimeStepper.C:185
Real & _dt_min
Definition: TimeStepper.h:135
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
const InputParameters & parameters() const
Get the parameters of the object.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
int & _t_step
Definition: TimeStepper.h:133
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
double _large_step_rejection_threshold
Threshold used to detect whether we need to reject a step.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
auto min(const L &left, const R &right)
Real & _dt
Definition: TimeStepper.h:134
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
Declare the given parameters as controllable.
void ErrorVector unsigned int
Real & _time
Values from executioner.
Definition: TimeStepper.h:131
Interface class for classes which interact with Postprocessors.
virtual void acceptStep() override
This gets called when time step is accepted.