Loading [MathJax]/extensions/tex2jax.js
Go to the documentation of this file.
22 "reset_dt",
false,
"Use when restarting a calculation to force a change in dt.");
24 "cutback_factor_at_failure",
26 "cutback_factor_at_failure>0 & cutback_factor_at_failure<1",
27 "Factor to apply to timestep if it a time step fails to convergence.");
38 _fe_problem(parameters.have_parameter<
FEProblemBase *>(
"_fe_problem_base")
41 _executioner(*getCheckedPointerParam<
Transient *>(
"_executioner")),
42 _time(_fe_problem.time()),
43 _time_old(_fe_problem.timeOld()),
44 _t_step(_fe_problem.timeStep()),
45 _dt(_fe_problem.dt()),
46 _dt_min(_executioner.dtMin()),
47 _dt_max(_executioner.dtMax()),
48 _end_time(_executioner.endTime()),
49 _sync_times(_app.getOutputWarehouse().getSyncTimes()),
50 _timestep_tolerance(_executioner.timestepTol()),
51 _verbose(_executioner.verbose()),
53 _cutback_factor_at_failure(getParam<Real>(
"cutback_factor_at_failure")),
54 _reset_dt(getParam<bool>(
"reset_dt")),
56 _current_dt(declareRestartableData(
"current_dt", 1.0))
99 bool at_sync_point =
false;
101 std::ostringstream diag;
107 diag <<
"Limiting dt to dtmax: " << std::setw(9) << std::setprecision(6) << std::setfill(
'0')
108 << std::showpoint << std::left <<
_dt_max << std::endl;
115 diag <<
"Increasing dt to dtmin: " << std::setw(9) << std::setprecision(6) << std::setfill(
'0')
116 << std::showpoint << std::left <<
_dt_min << std::endl;
123 diag <<
"Limiting dt for end_time: " << std::setw(9) << std::setprecision(6)
124 << std::setfill(
'0') << std::showpoint << std::left <<
_end_time <<
" dt: " << std::setw(9)
125 << std::setprecision(6) << std::setfill(
'0') << std::showpoint << std::left << dt
133 diag <<
"Limiting dt for sync_time: " << std::setw(9) << std::setprecision(6)
134 << std::setfill(
'0') << std::showpoint << std::left << *
_sync_times.begin()
135 <<
" dt: " << std::setw(9) << std::setprecision(6) << std::setfill(
'0') << std::showpoint
136 << std::left << dt << std::endl;
141 mooseError(
"Adjusting to sync_time resulted in a non-positive time step. dt: ",
149 at_sync_point =
true;
157 return at_sync_point;
192 mooseError(
"Solve failed and timestep already at or below dtmin, cannot continue!");
Transient executioners usually loop through a number of timesteps...
static InputParameters validParams()
virtual void restoreSolutions()
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
void mooseError(Args &&... args) const
Real & _time
Values from executioner.
Transient & _executioner
Reference to transient executioner.
bool halfTransient() const
Whether or not this simulation should only run half its transient (useful for testing recovery)
Real & _timestep_tolerance
std::set< Real > & _sync_times
void computeStep()
Called before a new step is started.
virtual bool constrainStep(Real &dt)
Called after computeStep() is called.
virtual bool converged() const
If the time step converged.
FEProblemBase & _fe_problem
Real & _current_dt
Size of the current time step as computed by the Stepper. Note that the actual dt that was taken migh...
TimeStepper(const InputParameters ¶meters)
const bool & _verbose
should detailed diagnostic output be printed
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
Every object that can be built by the factory should be derived from this class.
const Real _cutback_factor_at_failure
Cutback factor if a time step fails to converge.
bool _has_reset_dt
True if dt has been reset.
Interface for objects that needs scalar coupling capabilities.
Base class for time stepping.
virtual Real computeDT()=0
Called to compute _current_dt for a normal step.
A class for creating restricted objects.
virtual void acceptStep()
This gets called when time step is accepted.
virtual bool solve() override
Picard solve the FEProblem.
virtual void step()
Take a time step.
bool _converged
Whether or not the previous solve converged.
virtual void forceTimeStep(Real dt)
virtual void rejectStep()
This gets called when time step is rejected.
static InputParameters validParams()
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
bool _reset_dt
If true then the next dt will be computed by computeInitialDT()
virtual void preExecute()
PicardSolve & picardSolve()
Return underlining PicardSolve object.
MooseApp & _app
The MooseApp this object is associated with.
virtual void init()
Initialize the time stepper.
defineLegacyParams(TimeStepper)
virtual Real computeInitialDT()=0
Called to compute _current_dt for the first timestep.
virtual Real computeFailedDT()
Called to compute _current_dt after a solve has failed.