deal.II version GIT relicensing-1931-g88c382288c 2024-10-04 03:40:00+00:00
|
#include <deal.II/base/mu_parser_internal.h>
Public Member Functions | |
ParserImplementation () | |
virtual | ~ParserImplementation ()=default |
virtual void | initialize (const std::string &vars, const std::vector< std::string > &expressions, const std::map< std::string, double > &constants, const bool time_dependent=false) |
void | init_muparser () const |
Number | do_value (const Point< dim > &p, const double time, unsigned int component) const |
void | do_all_values (const Point< dim > &p, const double time, ArrayView< Number > &values) const |
Public Attributes | |
std::vector< std::string > | expressions |
Private Attributes | |
Threads::ThreadLocalStorage< internal::FunctionParser::ParserData > | parser_data |
std::map< std::string, double > | constants |
std::vector< std::string > | var_names |
bool | initialized |
unsigned int | n_vars |
Definition at line 157 of file mu_parser_internal.h.
internal::FunctionParser::ParserImplementation< dim, Number >::ParserImplementation | ( | ) |
Definition at line 260 of file mu_parser_internal.cc.
|
virtualdefault |
|
virtual |
Initialize the internal state of the object. This is the same as the inheriting class method - see FunctionParser::initialize() for more information.
Reimplemented in FunctionParser< dim >, and TensorFunctionParser< rank, dim, Number >.
Definition at line 269 of file mu_parser_internal.cc.
void internal::FunctionParser::ParserImplementation< dim, Number >::init_muparser | ( | ) | const |
Set up the internal muParser objects to parse and evaluate mathematical expressions.
Definition at line 306 of file mu_parser_internal.cc.
Number internal::FunctionParser::ParserImplementation< dim, Number >::do_value | ( | const Point< dim > & | p, |
const double | time, | ||
unsigned int | component | ||
) | const |
Compute the value of a single component.
Definition at line 411 of file mu_parser_internal.cc.
void internal::FunctionParser::ParserImplementation< dim, Number >::do_all_values | ( | const Point< dim > & | p, |
const double | time, | ||
ArrayView< Number > & | values | ||
) | const |
Compute the values of all components.
Definition at line 458 of file mu_parser_internal.cc.
std::vector<std::string> internal::FunctionParser::ParserImplementation< dim, Number >::expressions |
An array of function expressions (one per component), required to initialize tfp in each thread.
Definition at line 202 of file mu_parser_internal.h.
|
mutableprivate |
The muParser objects (hidden with the PIMPL idiom) for each thread (and one for each component).
Definition at line 210 of file mu_parser_internal.h.
|
private |
An array to keep track of all the constants, required to initialize fp in each thread.
Definition at line 216 of file mu_parser_internal.h.
|
private |
An array for the variable names, required to initialize fp in each thread.
Definition at line 222 of file mu_parser_internal.h.
|
private |
State of usability. This variable is checked every time the function is called for evaluation. It's set to true in the initialize() methods.
Definition at line 228 of file mu_parser_internal.h.
|
private |
Number of variables. If this is also a function of time, then the number of variables is dim+1, otherwise it is dim. In the case that this is a time dependent function, the time is supposed to be the last variable. If n_vars is not identical to the number of the variables parsed by the initialize() method, then an exception is thrown.
Definition at line 237 of file mu_parser_internal.h.