24 #ifndef _GEMA_CELL_ACCESSOR_H_ 25 #define _GEMA_CELL_ACCESSOR_H_ 73 const double* valueAt(
const GmCell* c,
const GmVector* coord,
int ip=-1)
const 76 return _ac->valueAt(queryIndex(c), coord);
79 double scalarValueAt(
const GmCell* c,
const GmVector* coord,
int ip = -1)
const 82 return _ac->scalarValueAt(queryIndex(c), coord);
88 _ac->matrixValueAt(queryIndex(c), coord, mat);
94 _ac->vectorValueAt(queryIndex(c), coord, vec);
97 bool setValue (
const GmCell* c,
const double* value) {
return _ac->setValue(queryIndex(c), value); }
98 bool setScalarValue (
const GmCell* c,
double value) {
return _ac->setScalarValue(queryIndex(c), value); }
99 bool setScalarValueAtDim(
const GmCell* c,
int dim,
double value) {
return _ac->setScalarValueAtDim(queryIndex(c), dim, value); }
100 bool setValueAsDef (
const GmCell* c) {
return _ac->setValueAsDef(queryIndex(c)); }
101 bool setFunctionValue (
const GmCell* c,
GmUserFunction* functionDef) {
return _ac->setFunctionValue(queryIndex(c), functionDef); }
102 bool setFunctionValue (
const GmCell* c,
GmUserFunctionEvaluator* functionEval) {
return _ac->setFunctionValue(queryIndex(c), functionEval); }
104 QString valueStr(
const GmCell* c,
bool evalFunctions,
bool printDefAsNil,
105 int fieldWidth = 0,
char format =
'g',
int precision = -1,
106 const GmVector* coord = NULL,
int ip = -1)
const 109 return _ac->valueStr(queryIndex(c), evalFunctions, printDefAsNil, fieldWidth, format, precision, coord);
114 return _ac->setFunctionFromName(queryIndex(c), userFunctionId, err);
117 bool setValueFromVariant(
const GmCell* c,
const QVariant& v,
bool acceptMissingDimension,
QString& err)
119 return _ac->setValueFromVariant(queryIndex(c), v, acceptMissingDimension, err);
122 bool isDefValue(
const GmCell* c)
const {
return _ac->isDefValue(queryIndex(c)); }
123 bool isFunction(
const GmCell* c)
const {
return _ac->isFunction(queryIndex(c)); }
124 QString functionId(
const GmCell* c)
const {
return _ac->functionId(queryIndex(c)); }
128 virtual int queryIndex(
const GmCell* c)
const = 0;
GmCellAccessorProxy(GmValueAccessor *ac)
Constructor. Takes ownership of the accessor.
Definition: gmCellAccessor.h:40
Class responsible for evaluating a UserFunction over a node / cell.
Definition: gmUserFunction.h:148
void setCell(const GmCell *cell, int ip)
Sets the cell / integration point over which values will be calculated.
Definition: gmValueSetEvalContext.h:78
Base interface for mesh cells.
Definition: gmCell.h:81
virtual int propertyIndex(int propertySet) const =0
Given a property set number, returns the line of the property set that contains property values for t...
Extends GmCellAccessor to handle attribute accessors.
Definition: gmCellAccessor.h:132
Interface class for accessing and setting values from an "indexable" collection of values.
Definition: gmValueAccessor.h:59
virtual int cellId() const =0
Returns a number identifying the cell. It should be possible to use this id as an index to GmCellMesh...
GmPropertyCellAccessor(GmValueAccessor *ac, int psetIndex)
Constructor. Takes ownership of the accessor.
Definition: gmCellAccessor.h:148
virtual int queryIndex(const GmCell *c) const
A virtual function that given a cell returns the index that should be accessed.
Definition: gmCellAccessor.h:140
GmAttributeCellAccessor(GmValueAccessor *ac)
Constructor. Takes ownership of the accessor.
Definition: gmCellAccessor.h:136
void saveCellInContext(const GmCell *c, int ip) const
A function that given a cell, saves it in the context. The ip parameter should store the integration ...
Definition: gmCellAccessor.h:50
The GmCellAccessor class is a proxy object to a value accesor implementing a more convenient interfac...
Definition: gmCellAccessor.h:66
virtual int queryIndex(const GmCell *c) const
A virtual function that given a cell returns the index that should be accessed.
Definition: gmCellAccessor.h:152
Declaration of the GmValueSetEvalContext class.
#define GMC_API_EXPORT
Macro for controling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_LI...
Definition: gmCoreConfig.h:35
An auxiliary vector WRAPPER that binds the vector to a CONST memory area with data already initialize...
Definition: gmVector.h:69
GmCellAccessor(GmValueAccessor *ac)
Constructor. Takes ownership of the accessor.
Definition: gmCellAccessor.h:70
Extends GmCellAccessor to handle property accessors.
Definition: gmCellAccessor.h:144
Auxiliar class used to store the needed information to translate an user function id / user function ...
Definition: gmValueSetEvalContext.h:45
Declaration of the GmCell class.
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition: gmVector.h:34
An auxiliary matrix WRAPPER that binds the matrix to a CONST memory area with data already inicialize...
Definition: gmMatrix.h:100
Class used to store the definition of a user function and its parameters.
Definition: gmUserFunction.h:78
Implementation of the GmAccessorProxy class Moved from gmCellAccessor.h.
Helper class with common code for several classes that wrap a value accessor, provinding a slitly dif...
Definition: gmAccessorProxy.h:38
An accessor proxy + method for saving a cell in the context.
Definition: gmCellAccessor.h:36