concepts::ParsedFormulaBase< dim > Class Template Reference
Parses the given string and evaluates it on request. More...
#include <parsedFormula.hh>
Public Types | |
typedef concepts::Sequence< std::pair< std::string, std::string > > | RepSeq |
Public Member Functions | |
ParsedFormulaBase () | |
ParsedFormulaBase (const ParsedFormulaBase< dim > &frm) | |
Copy constructor. More... | |
void | set (const std::string formula, uint i=0, RepSeq rep=RepSeq()) |
Sets the i th formula. More... | |
Protected Member Functions | |
Real | process_ (const Real3d &p, const Real t=0.0, uint i=0) const |
Processing the i th formula (with time-dependency variable) More... | |
Protected Attributes | |
std::string | formula_ [dim] |
The original formula. More... | |
Private Attributes | |
uint | len_ [dim] |
Length of the parsed formula More... | |
Array< uchar > | pgm_ [dim] |
The parsed formula. More... | |
Detailed Description
template<uint dim>
class concepts::ParsedFormulaBase< dim >
Parses the given string and evaluates it on request.
The following operations and functions are allowed in the formula: + - / and *, (), ^ for exponentiation (also with broken exponents but only with positive bases) and the following formulae:
- sin
- cos
- atan
- sinh
- cosh
- asin
- acos
- sqr
- sqrt
- exp
- ln
x, y and z are allowed as variables and pi is defined.
Definition at line 60 of file parsedFormula.hh.
Member Typedef Documentation
◆ RepSeq
typedef concepts::Sequence<std::pair<std::string,std::string> > concepts::ParsedFormulaBase< dim >::RepSeq |
Definition at line 62 of file parsedFormula.hh.
Constructor & Destructor Documentation
◆ ParsedFormulaBase() [1/2]
|
inline |
Definition at line 64 of file parsedFormula.hh.
◆ ParsedFormulaBase() [2/2]
|
inline |
Copy constructor.
Definition at line 71 of file parsedFormula.hh.
Member Function Documentation
◆ process_()
|
protected |
Processing the i
th formula (with time-dependency variable)
◆ set()
void concepts::ParsedFormulaBase< dim >::set | ( | const std::string | formula, |
uint | i = 0 , |
||
RepSeq | rep = RepSeq() |
||
) |
Sets the i
th formula.
Member Data Documentation
◆ formula_
|
protected |
The original formula.
Definition at line 85 of file parsedFormula.hh.
◆ len_
|
private |
Length of the parsed formula
Definition at line 90 of file parsedFormula.hh.
◆ pgm_
|
private |
The parsed formula.
Definition at line 88 of file parsedFormula.hh.
The documentation for this class was generated from the following file:
- formula/parsedFormula.hh