22 "Computes time step size based on a target number of fixed point iterations");
24 "dt_initial",
"dt_initial > 0",
"The initial time step size");
26 "target_iterations",
"target_iterations > 0",
"The target number of fixed point iterations");
30 "The number of iterations added to and subtracted from 'target_iterations' to determine the " 31 "iteration window; the time step size will increase if the iterations were below " 32 "'target_iterations' - 'target_window' and will decrease if the iterations were above " 33 "'target_iterations' + 'target_window'.");
37 "increase_factor >= 1",
38 "Factor by which the previous time step size will increase if the previous " 39 "number of fixed point iterations was below the target window minimum " 40 "('target_iterations' - 'target_window').");
44 "decrease_factor <= 1",
45 "Factor by which the previous time step size will decrease if the previous " 46 "number of fixed point iterations was above the target window maximum " 47 "('target_iterations' + 'target_window').");
54 _dt_initial(getParam<
Real>(
"dt_initial")),
55 _target_center(getParam<unsigned
int>(
"target_iterations")),
56 _target_window(getParam<unsigned
int>(
"target_window")),
57 _target_min(_target_center - _target_window),
58 _target_max(_target_center + _target_window),
59 _increase_factor(getParam<
Real>(
"increase_factor")),
60 _decrease_factor(getParam<
Real>(
"decrease_factor")),
61 _dt_old(declareRestartableData<
Real>(
"dt_old", 0.0)),
62 _fp_its(declareRestartableData<unsigned
int>(
"fp_its", 0))
72 mooseError(
"This time stepper can only be used if there are MultiApps in the problem.");
76 if (conv.isParamValid(
"fixed_point_min_its") && conv.isParamValid(
"fixed_point_max_its"))
78 const auto min_its = conv.
getParam<
unsigned int>(
"fixed_point_min_its");
79 const auto max_its = conv.getParam<
unsigned int>(
"fixed_point_max_its");
81 mooseError(
"The specified target iteration window, [",
85 "], must be within the minimum and maximum number of fixed point iterations " 86 "specified for the Executioner, [",
TransientBase & _executioner
Reference to transient executioner.
static InputParameters validParams()
const Real _decrease_factor
Factor by which to decrease time steps.
virtual Real computeInitialDT() override
Computes time step size for the initial time step.
Base class for time stepping.
virtual void init() override
Initialize the time stepper.
unsigned int numFixedPointIts() const
Get the number of fixed point iterations performed Because this returns the number of fixed point ite...
const bool & _verbose
whether a detailed diagnostic output should be printed
FEProblemBase & _fe_problem
virtual void acceptStep()
This gets called when time step is accepted.
const unsigned int _target_max
Maximum fixed point iterations of window.
virtual Convergence & getConvergence(const std::string &name, const THREAD_ID tid=0) const
Gets a Convergence object.
const ConvergenceName & getMultiAppFixedPointConvergenceName() const
Gets the MultiApp fixed point convergence object name.
registerMooseObject("MooseApp", FixedPointIterationAdaptiveDT)
Computes time step size based on a target number of fixed point iterations.
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
static InputParameters validParams()
unsigned int & _fp_its
Number of fixed point iterations in previous solve.
virtual Real computeDT() override
Computes time step size after the initial time step.
const Real _increase_factor
Factor by which to increase time steps.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
FixedPointSolve & fixedPointSolve()
const unsigned int _target_min
Minimum fixed point iterations of window.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const Real _dt_initial
Initial time step size.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool hasMultiApps() const
Returns whether or not the current simulation has any multiapps.
Real & _dt_old
Old time step size.
virtual void init()
Initialize the time stepper.
virtual void acceptStep() override
This gets called when time step is accepted.
void ErrorVector unsigned int
FixedPointIterationAdaptiveDT(const InputParameters ¶meters)