Support for using parsed functions in FEMSystem. More...
#include <parsed_fem_function.h>
Public Member Functions | |
ParsedFEMFunction (const System &sys, const std::string &expression, const std::vector< std::string > *additional_vars=nullptr, const std::vector< Output > *initial_vals=nullptr) | |
ParsedFEMFunction & | operator= (const ParsedFEMFunction &)=delete |
ParsedFEMFunction & | operator= (ParsedFEMFunction &&)=delete |
ParsedFEMFunction (const ParsedFEMFunction &)=default | |
ParsedFEMFunction (ParsedFEMFunction &&)=default | |
virtual | ~ParsedFEMFunction ()=default |
void | reparse (const std::string &expression) |
virtual void | init_context (const FEMContext &c) override |
virtual std::unique_ptr< FEMFunctionBase< Output > > | clone () const override |
virtual Output | operator() (const FEMContext &c, const Point &p, const Real time=0.) override |
void | operator() (const FEMContext &c, const Point &p, const Real time, DenseVector< Output > &output) override |
virtual Output | component (const FEMContext &c, unsigned int i, const Point &p, Real time=0.) override |
const std::string & | expression () |
Output | get_inline_value (const std::string &inline_var_name) const |
void | set_inline_value (const std::string &inline_var_name, Output newval) |
void | operator() (const FEMContext &, const Point &p, DenseVector< Output > &output) |
Protected Member Functions | |
void | partial_reparse (const std::string &expression) |
std::size_t | find_name (const std::string &varname, const std::string &expr) const |
void | eval_args (const FEMContext &c, const Point &p, const Real time) |
Output | eval (FunctionParserBase< Output > &parser, const std::string &libmesh_dbg_var(function_name), unsigned int libmesh_dbg_var(component_idx)) const |
Output | eval (char &libmesh_dbg_var(parser), const std::string &libmesh_dbg_var(function_name), unsigned int libmesh_dbg_var(component_idx)) const |
Private Attributes | |
const System & | _sys |
std::string | _expression |
std::vector< std::string > | _subexpressions |
unsigned int | _n_vars |
unsigned int | _n_requested_vars |
unsigned int | _n_requested_grad_components |
unsigned int | _n_requested_hess_components |
bool | _requested_normals |
std::vector< FunctionParserBase< Output > > | parsers |
std::vector< char > | parsers |
std::vector< Output > | _spacetime |
std::vector< bool > | _need_var |
std::vector< bool > | _need_var_grad |
std::vector< bool > | _need_var_hess |
std::string | variables |
std::vector< std::string > | _additional_vars |
std::vector< Output > | _initial_vals |
Support for using parsed functions in FEMSystem.
ParsedFEMFunction provides support for FParser-based parsed functions in FEMSystem. All overridden virtual functions are documented in fem_function_base.h.
Definition at line 55 of file parsed_fem_function.h.
|
inlineexplicit |
Constructor.
Definition at line 200 of file parsed_fem_function.h.
|
default |
The remaining 5 special functions can be safely defaulted.
|
default |
|
virtualdefault |
|
inlineoverridevirtual |
The new copy should be as "deep" as necessary to allow independent destruction and simultaneous evaluations of the copies in different threads.
Implements libMesh::FEMFunctionBase< Output >.
Definition at line 387 of file parsed_fem_function.h.
|
inlineoverridevirtual |
i
at coordinate p
and time time
.Reimplemented from libMesh::FEMFunctionBase< Output >.
Definition at line 429 of file parsed_fem_function.h.
|
inlineprotected |
Definition at line 802 of file parsed_fem_function.h.
|
inlineprotected |
|
inlineprotected |
Definition at line 673 of file parsed_fem_function.h.
|
inline |
Definition at line 110 of file parsed_fem_function.h.
|
inlineprotected |
Definition at line 647 of file parsed_fem_function.h.
|
inline |
Definition at line 443 of file parsed_fem_function.h.
Referenced by libMesh::ParsedFEMFunctionParameter< T >::get().
|
inlineoverridevirtual |
Prepares a context object for use.
Most problems will want to reimplement this for efficiency, in order to call FE::get_*() as their particular function requires.
Reimplemented from libMesh::FEMFunctionBase< Output >.
Definition at line 355 of file parsed_fem_function.h.
|
inlineoverridevirtual |
p
and time time
, which defaults to zero.Pure virtual, so you have to override it.
Implements libMesh::FEMFunctionBase< Output >.
Definition at line 396 of file parsed_fem_function.h.
|
inlineinherited |
Evaluation function for time-independent vector-valued functions. Sets output values in the passed-in output
DenseVector.
Definition at line 145 of file fem_function_base.h.
|
inlineoverridevirtual |
Evaluation function for time-dependent vector-valued functions. Sets output values in the passed-in output
DenseVector.
Pure virtual, so you have to override it.
Implements libMesh::FEMFunctionBase< Output >.
Definition at line 410 of file parsed_fem_function.h.
|
delete |
This class contains a const reference so it can't be copy or move-assigned.
|
delete |
|
inlineprotected |
Definition at line 583 of file parsed_fem_function.h.
|
inline |
Re-parse with new expression.
Definition at line 226 of file parsed_fem_function.h.
|
inline |
Changes the value of an inline variable.
Definition at line 517 of file parsed_fem_function.h.
Referenced by libMesh::ParsedFEMFunctionParameter< T >::set().
|
private |
Definition at line 191 of file parsed_fem_function.h.
|
private |
Definition at line 161 of file parsed_fem_function.h.
Referenced by libMesh::ParsedFEMFunction< T >::expression().
|
private |
Definition at line 192 of file parsed_fem_function.h.
|
private |
Definition at line 163 of file parsed_fem_function.h.
|
private |
Definition at line 163 of file parsed_fem_function.h.
|
private |
Definition at line 163 of file parsed_fem_function.h.
|
private |
Definition at line 163 of file parsed_fem_function.h.
|
private |
Definition at line 178 of file parsed_fem_function.h.
|
private |
Definition at line 181 of file parsed_fem_function.h.
|
private |
Definition at line 186 of file parsed_fem_function.h.
|
private |
Definition at line 167 of file parsed_fem_function.h.
|
private |
Definition at line 173 of file parsed_fem_function.h.
|
private |
Definition at line 162 of file parsed_fem_function.h.
|
private |
Definition at line 160 of file parsed_fem_function.h.
|
private |
Definition at line 169 of file parsed_fem_function.h.
|
private |
Definition at line 171 of file parsed_fem_function.h.
|
private |
Definition at line 190 of file parsed_fem_function.h.