GemaCoreLib
The GeMA Core library
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
GmUserFunctionContext Class Reference

The context received by C methods giving access to parameters data and metadata. More...

#include <gmUserFunction.h>

Collaboration diagram for GmUserFunctionContext:
Collaboration graph
[legend]

Public Member Functions

int id () const
 Returns the id of the node / cell that has an attribute / property beeing evaluated.
 
const GmMeshmesh () const
 Returns the mesh that holds the attribute being evaluated.
 
const GmVectorcoord () const
 Returns the evaluation point used when aggregating node attributes for a cell. More...
 
const GmUserFunctionfunctionInfo () const
 Information about the user function parameters.
 
const GmValueInforesultInfo () 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.
 

Detailed Description

The context received by C methods giving access to parameters data and metadata.

Member Function Documentation

◆ coord()

const GmVector* GmUserFunctionContext::coord ( ) const
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.

◆ par()

const double* GmUserFunctionContext::par ( int  i) const
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


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