#include <FunctionParserUtils.h>
Public Types | |
| typedef GenericSymFunction< is_ad > | SymFunction |
| Shorthand for an autodiff function parser object. | |
| typedef std::shared_ptr< SymFunction > | SymFunctionPtr |
| Shorthand for an smart pointer to an autodiff function parser object. | |
Public Member Functions | |
| FunctionParserUtils (const InputParameters ¶meters) | |
| void | setParserFeatureFlags (SymFunctionPtr &) const |
| apply input parameters to internal feature flags of the parser object | |
Static Public Member Functions | |
| static InputParameters | validParams () |
Protected Types | |
| enum class | FailureMethod { nan , nan_warning , error , exception } |
| Enum for failure method. More... | |
Protected Member Functions | |
| GenericReal< is_ad > | evaluate (SymFunctionPtr &, const std::string &object_name="") |
| Evaluate FParser object and check EvalError. | |
| GenericReal< is_ad > | evaluate (SymFunctionPtr &, const std::vector< GenericReal< is_ad > > &, const std::string &object_name="") |
| Evaluate FParser object and check EvalError. | |
| void | addFParserConstants (SymFunctionPtr &parser, const std::vector< std::string > &constant_names, const std::vector< std::string > &constant_expressions) const |
| add constants (which can be complex expressions) to the parser object | |
| virtual void | functionsOptimize (SymFunctionPtr &parsed_function) |
| run FPOptimizer on the parsed function | |
| void | parsedFunctionSetup (SymFunctionPtr &function, const std::string &expression, const std::string &variables, const std::vector< std::string > &constant_names, const std::vector< std::string > &constant_expressions, const libMesh::Parallel::Communicator &comm) const |
| Performs setup steps on a SymFunction. | |
| void | functionsOptimize (SymFunctionPtr &parsed_function) |
| void | functionsOptimize (SymFunctionPtr &parsed_function) |
Protected Attributes | |
| enum FunctionParserUtils::FailureMethod | _evalerror_behavior |
| const Real | _quiet_nan |
| appropriate not a number value to return | |
| std::vector< GenericReal< is_ad > > | _func_params |
| Array to stage the parameters passed to the functions when calling Eval. | |
| const Real | _epsilon |
| fuzzy comparison tolerance | |
| bool | _enable_jit |
| feature flags | |
| bool | _enable_ad_cache |
| bool | _disable_fpoptimizer |
| bool | _enable_auto_optimize |
Static Protected Attributes | |
| static const char * | _eval_error_msg [] |
| table of FParser eval error codes | |
Definition at line 54 of file FunctionParserUtils.h.
| typedef GenericSymFunction<is_ad> FunctionParserUtils< is_ad >::SymFunction |
Shorthand for an autodiff function parser object.
Definition at line 62 of file FunctionParserUtils.h.
| typedef std::shared_ptr<SymFunction> FunctionParserUtils< is_ad >::SymFunctionPtr |
Shorthand for an smart pointer to an autodiff function parser object.
Definition at line 65 of file FunctionParserUtils.h.
|
strongprotected |
Enum for failure method.
| Enumerator | |
|---|---|
| nan | |
| nan_warning | |
| error | |
| exception | |
Definition at line 116 of file FunctionParserUtils.h.
| FunctionParserUtils< is_ad >::FunctionParserUtils | ( | const InputParameters & | parameters | ) |
|
protected |
add constants (which can be complex expressions) to the parser object
|
protected |
Evaluate FParser object and check EvalError.
|
protected |
Evaluate FParser object and check EvalError.
This version uses a supplied vector of function parameters, which is useful if an object uses more than one parsed function, which may have different function parameter values.
|
protectedvirtual |
run FPOptimizer on the parsed function
|
protected |
|
protected |
Definition at line 211 of file FunctionParserUtils.C.
|
protected |
Performs setup steps on a SymFunction.
| function | reference to pointer to the function to set up |
| expression | expression to parse |
| variables | comma separated string holding all the variables of the expression |
| constant_names | vector of names (symbols) of constants in the expression |
| constant_expressions | vectors of expressions (=values) of constants in the expression |
| comm | communicator used to stagger JIT file creations |
| void FunctionParserUtils< is_ad >::setParserFeatureFlags | ( | SymFunctionPtr & | ) | const |
apply input parameters to internal feature flags of the parser object
|
static |
Referenced by ArrayParsedAux::validParams(), ParsedAux::validParams(), ParsedVectorAux::validParams(), ParsedConvergence::validParams(), ParsedFunctorMaterialTempl< is_ad >::validParams(), ParsedMaterialHelper< is_ad >::validParams(), CutMeshByLevelSetGeneratorBase::validParams(), LevelSetMeshingHelper::validParams(), ParsedCurveGenerator::validParams(), ParsedElementDeletionGenerator::validParams(), ParsedExtraElementIDGenerator::validParams(), ParsedGenerateNodeset::validParams(), ParsedGenerateSideset::validParams(), ParsedNodeTransformGenerator::validParams(), ParsedSubdomainGeneratorBase::validParams(), ProjectSideSetOntoLevelSetGenerator::validParams(), TransfiniteMeshGenerator::validParams(), MFEMParsedFunction::validParams(), ParsedDownSelectionPositions::validParams(), ParsedPostprocessor::validParams(), ParsedReporterBase::validParams(), ParsedODEKernel::validParams(), and SolutionUserObject::validParams().
|
protected |
Definition at line 111 of file FunctionParserUtils.h.
|
protected |
Definition at line 110 of file FunctionParserUtils.h.
|
protected |
Definition at line 112 of file FunctionParserUtils.h.
|
protected |
feature flags
Definition at line 109 of file FunctionParserUtils.h.
|
protected |
fuzzy comparison tolerance
Definition at line 128 of file FunctionParserUtils.h.
|
staticprotected |
table of FParser eval error codes
Definition at line 122 of file FunctionParserUtils.h.
|
protected |
|
protected |
Array to stage the parameters passed to the functions when calling Eval.
Definition at line 125 of file FunctionParserUtils.h.
|
protected |
appropriate not a number value to return
Definition at line 119 of file FunctionParserUtils.h.