21 "Terminates the simulation when a boolean chain control data has a certain value.");
24 "input",
"Boolean control data indicating if the simulation should be terminated");
25 params.
addParam<
bool>(
"terminate_on_true",
27 "If set to 'true', termination occurs if the input has a value of 'true'; " 28 "else termination occurs if the input has a value of 'false'");
31 "Flag to throw an error on termination; else just signal the problem to " 32 "terminate the solve.");
34 "Message to use if termination occurs");
41 _terminate_on_true(getParam<bool>(
"terminate_on_true")),
42 _throw_error(getParam<bool>(
"throw_error")),
43 _termination_message(getParam<
std::string>(
"termination_message")),
44 _input(getChainControlData<bool>(
"input"))
const bool _terminate_on_true
Whether to terminate on true or false.
registerMooseObject("MooseApp", TerminateChainControl)
const bool _throw_error
Flag to throw an error if the terminate condition is met.
const std::string & _termination_message
Message to use if termination occurs.
virtual void terminateSolve()
Allow objects to request clean termination of the solve.
static InputParameters validParams()
TerminateChainControl(const InputParameters ¶meters)
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this object.
virtual void execute() override
Execute the control.
static InputParameters validParams()
const bool & _input
The control data that indicates if the simulation should be terminated.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
Terminates the simulation when a boolean chain control data has a certain value.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
void terminate()
Performs termination.
Control that additionally provides the capability to produce/consume data values, to allow control op...