![]() |
GemaCoreLib
The GeMA Core library
|
The context received by C methods giving access to parameters data and metadata. More...
#include <gmUserFunction.h>
Public Member Functions | |
int | id () const |
Returns the id of the node / cell that has an attribute / property beeing evaluated. | |
const GmMesh * | mesh () const |
Returns the mesh that holds the attribute being evaluated. | |
const GmVector * | coord () const |
Returns the evaluation point used when aggregating node attributes for a cell. More... | |
const GmUserFunction * | functionInfo () const |
Information about the user function parameters. | |
const GmValueInfo * | resultInfo () const |
Information about the returned result. | |
int | resultSize () const |
Returns the size of the returned value. | |
int | numPars () const |
Returns the number of input parameters. | |
const double * | par (int i) const |
Returns the it'h input parameter as a vector of doubles. More... | |
double | scalarPar (int i) const |
Returns the it'h input parameter as a single double. | |
int | parSize (int i) const |
Returns the size of the i'th parameter. | |
Private Member Functions | |
GmUserFunctionContext (GmUserFunctionEvaluator *eval) | |
Private constructor. | |
void | setId (int index) |
Set the current node / cell id. | |
void | setCoord (const GmVector *coord) |
Set the evaluation point used when aggregating node attributes for a cell. The coordinate values depends on the type of cell. For 'plain' cells, it should be cartesian coordinates. For element cells, it should be natural coordinates. | |
Private Attributes | |
int | _id |
The attribute / cell id. | |
const GmVector * | _coord |
Point of aggregation when node attributes are evaluated on behalf of a cell. | |
GmUserFunctionEvaluator * | _eval |
The evaluation context used to retrieve remaining information provided by the context. | |
Friends | |
class | GmUserFunctionEvaluator |
Only the evaluator can create and manipulate a Function context. | |
The context received by C methods giving access to parameters data and metadata.
|
inline |
Returns the evaluation point used when aggregating node attributes for a cell.
The coordinate values depends on the type of cell. For 'plain' cells, they are cartesian coordinates. For element cells, natural coordinates.
|
inline |
Returns the it'h input parameter as a vector of doubles.
In general, the returned vector has size equal to parSize(i), but if this parameter refers to a nodal value used by a cell, and the specified interpolation function was NO_INTERPOLATION, the returned vector size will be equal to parSize(i) multiplied by the number of nodes in the cell and data will be ordered in the vector in the same order as the nodes appear in the cell