19 params.
addClassDescription(
"Collects the number of failed time steps from the time stepper.");
20 params.
addParam<
bool>(
"current_time_step_only",
22 "Count only the failed solves of the current time step, which is reset "
23 "to zero when a time step converges.");
29 _current_time_step_only(getParam<bool>(
"current_time_step_only")),
30 _failures_before_step(declareRestartableData<unsigned
int>(
"failures_before_step", 0)),
31 _t_step_counted(declareRestartableData<
int>(
"t_step_counted", -1))
37 mooseError(
"No user-specified time stepper in Executioner block");
40 mooseError(
"Problem is not transient, and will not calculate timesteps.");
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
registerMooseObject("MooseApp", NumFailedTimeSteps)
void ErrorVector unsigned int
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
static InputParameters validParams()
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
MooseApp & _app
The MOOSE application this is associated with.
This postprocessor outputs the amount of failed time steps.
virtual Real getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
const TimeStepper * _timestepper
Retrieves the current TimeStepper used by the executioner.
static InputParameters validParams()
int & _t_step_counted
Time step number at which _failures_before_step was recorded.
unsigned int & _failures_before_step
Number of failures before the current time step.
const bool _current_time_step_only
Whether to count only the failed solves of the current time step.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
NumFailedTimeSteps(const InputParameters ¶meters)
virtual bool isTransient() const =0
unsigned int numFailures() const
Gets the number of failures and returns them.
Base class for transient executioners that use a FixedPointSolve solve object for multiapp-main app i...
int & _t_step
The number of the time step.
SubProblem & _subproblem
Reference to the Subproblem for this user object.