#include <Func.h>
Public Member Functions | |
Func () | |
Func (const Func &rhs) | |
~Func () | |
void | setExpr (string expr) |
string | getExpr () const |
vector< string > | getVars () const |
void | setVarValues (vector< string > vars, vector< double > vals) |
void | setVar (string name, double value) |
double | getVar (string name) const |
double | getValue () const |
void | setMode (unsigned int mode) |
unsigned int | getMode () const |
void | setX (double value) |
double | getX () const |
void | setY (double value) |
double | getY () const |
void | setZ (double value) |
double | getZ () const |
void | setXY (double x, double y) |
void | setXYZ (double x, double y, double z) |
double | getDerivative () const |
Func & | operator= (const Func rhs) |
void | process (const Eref &e, ProcPtr p) |
void | reinit (const Eref &e, ProcPtr p) |
Static Public Member Functions | |
static const Cinfo * | initCinfo () |
Static Public Attributes | |
static const int | VARMAX = 10 |
Protected Member Functions | |
void | _clearBuffer () |
void | _showError (mu::Parser::exception_type &e) const |
Protected Attributes | |
vector< double * > | _varbuf |
mu::Parser | _parser |
double * | _x |
double * | _y |
double * | _z |
unsigned int | _mode |
bool | _valid |
Friends | |
double * | _addVar (const char *name, void *data) |
Func::Func | ( | const Func & | rhs | ) |
Func::~Func | ( | ) |
void Func::_clearBuffer | ( | ) | [protected] |
References _parser, and _varbuf.
Referenced by operator=(), and ~Func().
void Func::_showError | ( | mu::Parser::exception_type & | e | ) | const [protected] |
Referenced by getDerivative(), getValue(), and getVars().
double Func::getDerivative | ( | ) | const |
References _parser, _showError(), _valid, and _x.
Referenced by initCinfo(), and process().
string Func::getExpr | ( | ) | const |
References _parser, and _valid.
Referenced by Func(), initCinfo(), and operator=().
unsigned int Func::getMode | ( | ) | const |
References _mode.
Referenced by initCinfo().
double Func::getValue | ( | ) | const |
References _parser, _showError(), and _valid.
Referenced by initCinfo(), and process().
double Func::getVar | ( | string | name | ) | const |
Referenced by Func(), initCinfo(), and operator=().
vector< string > Func::getVars | ( | ) | const |
References _parser, _showError(), and _valid.
Referenced by Func(), initCinfo(), and operator=().
double Func::getX | ( | ) | const |
References _x.
Referenced by initCinfo().
double Func::getY | ( | ) | const |
References _y.
Referenced by initCinfo().
double Func::getZ | ( | ) | const |
References _z.
Referenced by initCinfo().
const Cinfo * Func::initCinfo | ( | ) | [static] |
References _mode, _valid, getDerivative(), and getValue().
Referenced by initCinfo().
References _parser, _valid, setExpr(), and trim().
Referenced by initCinfo().
void Func::setExpr | ( | string | expr | ) |
Referenced by Func(), initCinfo(), operator=(), and reinit().
void Func::setMode | ( | unsigned int | mode | ) |
References _mode.
Referenced by initCinfo().
void Func::setVar | ( | string | name, | |
double | value | |||
) |
Referenced by Func(), initCinfo(), and operator=().
void Func::setVarValues | ( | vector< string > | vars, | |
vector< double > | vals | |||
) |
Referenced by initCinfo().
void Func::setX | ( | double | value | ) |
References _x.
Referenced by initCinfo().
void Func::setXY | ( | double | x, | |
double | y | |||
) |
Referenced by initCinfo().
void Func::setXYZ | ( | double | x, | |
double | y, | |||
double | z | |||
) |
Referenced by initCinfo().
void Func::setY | ( | double | value | ) |
References _y.
Referenced by initCinfo().
void Func::setZ | ( | double | value | ) |
References _z.
Referenced by initCinfo().
double* _addVar | ( | const char * | name, | |
void * | data | |||
) | [friend] |
Call-back to add variables to parser automatically.
Simple function parser and evaluator for MOOSE. This can take a mathematical expression in standard C form and a list of variables values and evaluate the results.
Referenced by Func().
unsigned int Func::_mode [protected] |
Referenced by getMode(), operator=(), process(), and setMode().
mu::Parser Func::_parser [protected] |
Referenced by _clearBuffer(), Func(), getDerivative(), getExpr(), getValue(), getVars(), operator=(), and reinit().
bool Func::_valid [mutable, protected] |
Referenced by getDerivative(), getExpr(), getValue(), getVars(), process(), and reinit().
vector< double *> Func::_varbuf [protected] |
Referenced by _clearBuffer(), and Func().
const int Func::VARMAX = 10 [static] |
Referenced by Func().