libMesh
|
ParsedFEMFunction provides support for FParser-based parsed functions in FEMSystem. More...
#include <parsed_fem_function.h>
Public Member Functions | |
ParsedFEMFunction (const System &sys, std::string expression, const std::vector< std::string > *additional_vars=nullptr, const std::vector< Output > *initial_vals=nullptr) | |
Constructor. More... | |
ParsedFEMFunction & | operator= (const ParsedFEMFunction &) |
Constructors. More... | |
ParsedFEMFunction & | operator= (ParsedFEMFunction &&)=delete |
ParsedFEMFunction (const ParsedFEMFunction &) | |
ParsedFEMFunction (ParsedFEMFunction &&)=default | |
virtual | ~ParsedFEMFunction ()=default |
void | reparse (std::string expression) |
Re-parse with new expression. More... | |
virtual void | init_context (const FEMContext &c) override |
Prepares a context object for use. More... | |
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 |
Evaluation function for time-dependent vector-valued functions. More... | |
virtual Output | component (const FEMContext &c, unsigned int i, const Point &p, Real time=0.) override |
const std::string & | expression () |
Output | get_inline_value (std::string_view inline_var_name) const |
void | set_inline_value (std::string_view inline_var_name, Output newval) |
Changes the value of an inline variable. More... | |
void | operator() (const FEMContext &, const Point &p, DenseVector< Output > &output) |
Evaluation function for time-independent vector-valued functions. More... | |
Protected Member Functions | |
void | partial_reparse (std::string expression) |
std::size_t | find_name (std::string_view varname, std::string_view expr) const |
void | eval_args (const FEMContext &c, const Point &p, const Real time) |
Output | eval (FunctionParserBase< Output > &parser, std::string_view libmesh_dbg_var(function_name), unsigned int libmesh_dbg_var(component_idx)) const |
Output | eval (char &libmesh_dbg_var(parser), std::string_view 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< std::unique_ptr< 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 |
ParsedFEMFunction provides support for FParser-based parsed functions in FEMSystem.
All overridden virtual functions are documented in fem_function_base.h.
Definition at line 57 of file parsed_fem_function.h.
|
inlineexplicit |
Constructor.
Definition at line 197 of file parsed_fem_function.h.
|
inline |
Definition at line 222 of file parsed_fem_function.h.
|
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 425 of file parsed_fem_function.h.
|
inlineoverridevirtual |
i
at coordinate p
and time time
.Reimplemented from libMesh::FEMFunctionBase< Output >.
Definition at line 467 of file parsed_fem_function.h.
|
inlineprotected |
Definition at line 839 of file parsed_fem_function.h.
|
inlineprotected |
|
inlineprotected |
Definition at line 710 of file parsed_fem_function.h.
|
inline |
Definition at line 107 of file parsed_fem_function.h.
|
inlineprotected |
Definition at line 684 of file parsed_fem_function.h.
|
inline |
Definition at line 481 of file parsed_fem_function.h.
Referenced by libMesh::ParsedFEMFunctionParameter< T >::get(), ParsedFEMFunctionTest::testInlineGetter(), and ParsedFEMFunctionTest::testInlineSetter().
|
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 393 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 434 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 144 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 448 of file parsed_fem_function.h.
|
inline |
Constructors.
Definition at line 249 of file parsed_fem_function.h.
|
delete |
|
inlineprotected |
Definition at line 620 of file parsed_fem_function.h.
|
inline |
Re-parse with new expression.
Definition at line 264 of file parsed_fem_function.h.
|
inline |
Changes the value of an inline variable.
Definition at line 554 of file parsed_fem_function.h.
Referenced by libMesh::ParsedFEMFunctionParameter< T >::set(), and ParsedFEMFunctionTest::testInlineSetter().
|
private |
Definition at line 188 of file parsed_fem_function.h.
|
private |
Definition at line 158 of file parsed_fem_function.h.
Referenced by libMesh::ParsedFEMFunction< T >::expression().
|
private |
Definition at line 189 of file parsed_fem_function.h.
|
private |
Definition at line 160 of file parsed_fem_function.h.
|
private |
Definition at line 160 of file parsed_fem_function.h.
|
private |
Definition at line 160 of file parsed_fem_function.h.
|
private |
Definition at line 160 of file parsed_fem_function.h.
|
private |
Definition at line 175 of file parsed_fem_function.h.
|
private |
Definition at line 178 of file parsed_fem_function.h.
|
private |
Definition at line 183 of file parsed_fem_function.h.
|
private |
Definition at line 164 of file parsed_fem_function.h.
|
private |
Definition at line 170 of file parsed_fem_function.h.
|
private |
Definition at line 159 of file parsed_fem_function.h.
|
private |
Definition at line 157 of file parsed_fem_function.h.
Referenced by libMesh::ParsedFEMFunction< T >::operator=().
|
private |
Definition at line 166 of file parsed_fem_function.h.
|
private |
Definition at line 168 of file parsed_fem_function.h.
|
private |
Definition at line 187 of file parsed_fem_function.h.