- expressionFParser expression to process Postprocessor values into a boolean value. Termination of the simulation occurs when this returns true.
C++ Type:FunctionExpression
Controllable:No
Description:FParser expression to process Postprocessor values into a boolean value. Termination of the simulation occurs when this returns true.
Terminator
Requests termination of the current solve based on the evaluation of a parsed logical expression of the Postprocessor value(s).
The parsed logical expression is specified with the "expression". More information about parsed expressions may be found on the function parser documentation.
The Terminator
can act in two modes, specified by the "fail_mode" :
HARD
stop, the default, will terminate the simulation when the conditions are metSOFT
stop, will stop the ongoing solve and let the solver try again using a smaller time step, for transient simulations.
To use the Terminator
as if it were in a PASS
mode, where it stops the simulation and accepts the result, use the HARD
fail_mode with the INFO
error_level.
The message output by the Terminator
when the condition for termination is met is specified using the "error_level" parameter. It may be output as:
an error, forcing a hard failure
a warning, to raise attention to an issue or abnormal solve conditions
an information message, to indicate that while the
Terminator
is acting on the solve, the conditions met are expected or normal. This can be used to make theTerminator
stop the simulation but accept the result.
Example input syntax
In this example, the Terminator
is used to fail a time step solve, based on a criterion dt > 20
. Once the solve is soft-failed for this time step, the solver tries again by cutting the time step. This happens to make the Terminator
parsed criterion pass, so it does not act again on this time step.
[UserObjects]
[arnold]
type = Terminator
expression = 'dt > 20'
fail_mode = SOFT
execute_on = TIMESTEP_END
[]
[]
(../moose/test/tests/userobjects/Terminator/terminator_soft.i)In this example, the Terminator
is used to stop a simulation and accept the result once the following criterion is met: dt > 20
. Stopping simulation is done with the HARD
failure mode, and the solve is considered as converged because the error level is set to info
.
[UserObjects]
[arnold]
type = Terminator
expression = 'dt > 20'
fail_mode = HARD
error_level = INFO
message = 'Arnold says this should end'
execute_on = TIMESTEP_END
[]
[]
(../moose/test/tests/userobjects/Terminator/terminator_pass.i)Input Parameters
- error_levelINFOThe error level for the message. A level of ERROR will always lead to a hard termination of the entire simulation.
Default:INFO
C++ Type:MooseEnum
Controllable:No
Description:The error level for the message. A level of ERROR will always lead to a hard termination of the entire simulation.
- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, ALWAYS.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, ALWAYS.
- fail_modeHARDAbort entire simulation (HARD) or just the current time step (SOFT).
Default:HARD
C++ Type:MooseEnum
Controllable:No
Description:Abort entire simulation (HARD) or just the current time step (SOFT).
- messageAn optional message to be output instead of the default message when the termination condition is triggered
C++ Type:std::string
Controllable:No
Description:An optional message to be output instead of the default message when the termination condition is triggered
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
Optional Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.