Reference documentation for deal.II version 9.5.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Attributes | List of all members
internal::FunctionParser::ParserImplementation< dim, Number > Class Template Reference

#include <deal.II/base/mu_parser_internal.h>

Inheritance diagram for internal::FunctionParser::ParserImplementation< dim, Number >:
[legend]

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::ParserDataparser_data
 
std::map< std::string, double > constants
 
std::vector< std::string > var_names
 
bool initialized
 
unsigned int n_vars
 

Detailed Description

template<int dim, typename Number>
class internal::FunctionParser::ParserImplementation< dim, Number >

Definition at line 158 of file mu_parser_internal.h.

Constructor & Destructor Documentation

◆ ParserImplementation()

template<int dim, typename Number >
internal::FunctionParser::ParserImplementation< dim, Number >::ParserImplementation

Definition at line 227 of file mu_parser_internal.cc.

◆ ~ParserImplementation()

template<int dim, typename Number >
virtual internal::FunctionParser::ParserImplementation< dim, Number >::~ParserImplementation ( )
virtualdefault

Member Function Documentation

◆ initialize()

template<int dim, typename Number >
void internal::FunctionParser::ParserImplementation< dim, Number >::initialize ( const std::string &  vars,
const std::vector< std::string > &  expressions,
const std::map< std::string, double > &  constants,
const bool  time_dependent = false 
)
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 236 of file mu_parser_internal.cc.

◆ init_muparser()

template<int dim, typename Number >
void internal::FunctionParser::ParserImplementation< dim, Number >::init_muparser

Set up the internal muParser objects to parse and evaluate mathematical expressions.

Definition at line 273 of file mu_parser_internal.cc.

◆ do_value()

template<int dim, typename Number >
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 379 of file mu_parser_internal.cc.

◆ do_all_values()

template<int dim, typename Number >
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 426 of file mu_parser_internal.cc.

Member Data Documentation

◆ expressions

template<int dim, typename Number >
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 203 of file mu_parser_internal.h.

◆ parser_data

template<int dim, typename Number >
Threads::ThreadLocalStorage<internal::FunctionParser::ParserData> internal::FunctionParser::ParserImplementation< dim, Number >::parser_data
mutableprivate

The muParser objects (hidden with the PIMPL idiom) for each thread (and one for each component).

Definition at line 211 of file mu_parser_internal.h.

◆ constants

template<int dim, typename Number >
std::map<std::string, double> internal::FunctionParser::ParserImplementation< dim, Number >::constants
private

An array to keep track of all the constants, required to initialize fp in each thread.

Definition at line 217 of file mu_parser_internal.h.

◆ var_names

template<int dim, typename Number >
std::vector<std::string> internal::FunctionParser::ParserImplementation< dim, Number >::var_names
private

An array for the variable names, required to initialize fp in each thread.

Definition at line 223 of file mu_parser_internal.h.

◆ initialized

template<int dim, typename Number >
bool internal::FunctionParser::ParserImplementation< dim, Number >::initialized
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 229 of file mu_parser_internal.h.

◆ n_vars

template<int dim, typename Number >
unsigned int internal::FunctionParser::ParserImplementation< dim, Number >::n_vars
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 238 of file mu_parser_internal.h.


The documentation for this class was generated from the following files: