ParsedConvergence

This Convergence allows the user to specify arbitrary expressions for convergence and divergence criteria. These expressions ("convergence_expression" and "divergence_expression") may contain any of the following:

The expressions are parsed using the Function Parser syntax. The full library of mathematical operators is valid in the parsed expression, but for convenience, we list some of the logical and comparison operators here:

SyntaxDescription
()Parentheses for order of operations
!ANOT A
A & BA AND B
A I BA OR B
A = BA EQUALS B
A != BA DOES NOT EQUAL B
A >= BA GREATER THAN OR EQUAL TO B

The expressions must evaluate to either 1 or 0, which correspond to true or false, respectively; if the expression returns another value, an error results. Note the following rules for the Convergence object values:

  • For the convergence expression, Convergence objects evaluate to true if they are CONVERGED and false otherwise (ITERATING or DIVERGED).

  • For the divergence expression, Convergence objects evaluate to true if they are DIVERGED and false otherwise (ITERATING or CONVERGED).

The divergence expression is optional. If omitted, divergence occurs if any of the supplied Convergence objects return DIVERGED, e.g.,


divergence_expression = 'conv1 | conv2 | conv3'

if "symbol_values" contains conv1, conv2, and conv3.

Input Parameters

  • convergence_expressionExpression to parse for convergence

    C++ Type:FunctionExpression

    Unit:(no unit assumed)

    Controllable:No

    Description:Expression to parse for convergence

Required Parameters

  • divergence_expressionExpression to parse for divergence

    C++ Type:FunctionExpression

    Unit:(no unit assumed)

    Controllable:No

    Description:Expression to parse for divergence

  • epsilon1e-12Fuzzy comparison tolerance

    Default:1e-12

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Fuzzy comparison tolerance

  • execute_onLINEARThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.

    Default:LINEAR

    C++ Type:ExecFlagEnum

    Unit:(no unit assumed)

    Options:NONE, INITIAL, LINEAR, NONLINEAR_CONVERGENCE, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM

    Controllable:No

    Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.

  • symbol_namesSymbol names to use in the parsed expressions

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:Symbol names to use in the parsed expressions

  • symbol_valuesValues (Convergence names, Postprocessor names, Function names, and constants) corresponding to each entry in 'symbol_names'

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:Values (Convergence names, Postprocessor names, Function names, and constants) corresponding to each entry in 'symbol_names'

  • verboseFalseEnable printing of additional information, including convergence and divergence reasons.

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Enable printing of additional information, including convergence and divergence reasons.

Optional Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    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

    Unit:(no unit assumed)

    Controllable:No

    Description:Set the enabled status of the MooseObject.

  • implicitTrueDetermines whether this object is calculated using an implicit or explicit form

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Determines whether this object is calculated using an implicit or explicit form

Advanced Parameters

  • disable_fpoptimizerFalseDisable the function parser algebraic optimizer

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Disable the function parser algebraic optimizer

  • enable_ad_cacheTrueEnable caching of function derivatives for faster startup time

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Enable caching of function derivatives for faster startup time

  • enable_auto_optimizeTrueEnable automatic immediate optimization of derivatives

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Enable automatic immediate optimization of derivatives

  • enable_jitTrueEnable just-in-time compilation of function expressions for faster evaluation

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Enable just-in-time compilation of function expressions for faster evaluation

  • evalerror_behaviornanWhat to do if evaluation error occurs. Options are to pass a nan, pass a nan with a warning, throw a error, or throw an exception

    Default:nan

    C++ Type:MooseEnum

    Unit:(no unit assumed)

    Options:nan, nan_warning, error, exception

    Controllable:No

    Description:What to do if evaluation error occurs. Options are to pass a nan, pass a nan with a warning, throw a error, or throw an exception

Parsed Expression Advanced Parameters