21 const std::string & function_str,
22 const std::vector<std::string> & symbol_names,
23 const std::vector<std::string> & symbol_values,
25 : _moose_app(moose_app),
26 _fe_problem(fe_problem),
27 _function_str(function_str),
28 _symbol_names(symbol_names),
29 _symbol_values(symbol_values),
31 _chain_control_data_system(_moose_app.getChainControlDataSystem())
35 _function_ptr = std::make_unique<ParsedFunction<Real, RealGradient>>(
93 " - chain control data values (bool or Real)\n" 95 " - scalar variable names\n" 96 " - constant values");
std::vector< ChainControlData< Real > * > _real_control_data_values
Real control data values.
std::vector< const Function * > _function_values
Function values.
std::vector< const VariableValue * > _scalar_values
Scalar variable values.
void updateChainControlDataValues()
Updates control data values in wrapped function.
Base class for function objects.
void initializeFunctionInputs()
Gets initial value, address, and input index for each function input.
ChainControlDataSystem & _chain_control_data_system
Chain control data system.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
std::vector< ChainControlData< bool > * > _bool_control_data_values
bool control data values
const THREAD_ID _tid
Thread id passed from owning object.
std::vector< unsigned int > _scalar_indices
_input_values index for each scalar variable value
std::vector< unsigned int > _real_control_data_indices
_input_values index for each Real control data value
Base class for MOOSE-based applications.
virtual bool hasScalarVariable(const std::string &var_name) const override
Returns a Boolean indicating whether any system contains a variable with the name provided...
const std::vector< std::string > & _symbol_names
Symbols used in the function expression string.
Real evaluate(Real t, const Point &p)
Evaluates the libMesh::ParsedFunction.
bool isFloat(const std::string &str)
Courtesy https://stackoverflow.com/a/57163016 and https://stackoverflow.com/questions/447206/c-isfloa...
ChainControlData< T > & getChainControlData(const std::string &data_name)
Gets the chain control data of the given name and type and creates if it does not exist...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
std::unique_ptr< ParsedFunction< Real > > _function_ptr
Wrapped libMesh::ParsedFunction.
void updateFunctionValues(Real t, const Point &pt)
Updates function values in wrapped function.
virtual Function & getFunction(const std::string &name, const THREAD_ID tid=0)
FEProblemBase & _fe_problem
Problem.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
bool hasChainControlDataOfType(const std::string &data_name) const
Queries if the chain control data of the given name and type exists.
ChainControlParsedFunctionWrapper(MooseApp &moose_app, FEProblemBase &fe_problem, const std::string &function_str, const std::vector< std::string > &symbol_names, const std::vector< std::string > &symbol_values, const THREAD_ID tid=0)
Constructor.
virtual MooseVariableScalar & getScalarVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the scalar variable reference from whichever system contains it.
std::vector< unsigned int > _bool_control_data_indices
_input_values index for each bool control data value
std::vector< Real * > _input_values
libMesh::ParsedFunction input values
const std::string & _function_str
Function expression.
std::vector< unsigned int > _function_indices
_input_values index for each function value
OutputTools< Real >::VariableValue VariableValue
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void updateScalarVariableValues()
Updates scalar values in wrapped function.
std::vector< Real > _initial_values
Initial value for each function input.
const std::vector< std::string > & _symbol_values
Values pairing with symbol_names.
virtual bool hasFunction(const std::string &name, const THREAD_ID tid=0)
const VariableValue & sln() const
auto index_range(const T &sizable)