To read and manipulate tabulated functions. More...
Public Member Functions | |
Tabulation () | |
Default constructor. | |
Tabulation (string file) | |
Constructor using file name. | |
~Tabulation () | |
Destructor. | |
void | setFile (string file) |
Set file name. More... | |
real_t | getValue (string funct, real_t v) |
Return the calculated value of the function. More... | |
real_t | getDerivative (string funct, real_t v) |
Return the derivative of the function at a given point. More... | |
real_t | getValue (string funct, real_t v1, real_t v2) |
Return the calculated value of the function. More... | |
real_t | getValue (string funct, real_t v1, real_t v2, real_t v3) |
Return the calculated value of the function. More... | |
Detailed Description
To read and manipulate tabulated functions.
This class enables reading a tabulated function of one to three variables and calculating the value of the function using piecewise multilinear interpolation.
The file defining the function is an XML file where any function is introduced via the tag "Function".
Member Function Documentation
void setFile | ( | string | file | ) |
Set file name.
This function is to be used when the default constructor is invoked.
Return the calculated value of the function.
Case of a function of one variable
- Parameters
-
[in] funct Name of the function to be evaluated, as read from input file [in] v Value of the variable
- Returns
- Computed value of the function
Return the derivative of the function at a given point.
Case of a function of one variable
- Parameters
-
[in] funct Name of the function to be evaluated, as read from input file [in] v Value of the variable
- Returns
- Derivative value
Return the calculated value of the function.
Case of a function of two variables
- Parameters
-
[in] funct Name of the function to be evaluated, as read from input file [in] v1 Value of the first variable [in] v2 Value of the second variable
- Returns
- Computed value of the function
Return the calculated value of the function.
Case of a function of three variables
- Parameters
-
[in] funct Name of the funct to be evaluated, as read from input file [in] v1 Value of the first variable [in] v2 Value of the second variable [in] v3 Value of the third variable
- Returns
- Computed value of the function