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
75 saveCellInContext(c, ip);
76 return _ac->valueAt(queryIndex(c), coord);
79 double scalarValueAt(
const GmCell* c,
const GmVector* coord,
int ip = -1)
const
81 saveCellInContext(c, ip);
82 return _ac->scalarValueAt(queryIndex(c), coord);
87 saveCellInContext(c, ip);
88 _ac->matrixValueAt(queryIndex(c), coord, mat);
93 saveCellInContext(c, ip);
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
108 saveCellInContext(c, ip);
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)); }
Helper class with common code for several classes that wrap a value accessor, provinding a slitly dif...
Definition gmAccessorProxy.h:39
Extends GmCellAccessor to handle attribute accessors.
Definition gmCellAccessor.h:133
GmAttributeCellAccessor(GmValueAccessor *ac)
Constructor. Takes ownership of the accessor.
Definition gmCellAccessor.h:136
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
An auxiliary matrix WRAPPER that binds the matrix to a CONST memory area with data already inicialize...
Definition gmMatrix.h:102
An auxiliary vector WRAPPER that binds the vector to a CONST memory area with data already initialize...
Definition gmVector.h:72
The GmCellAccessor class is a proxy object to a value accesor implementing a more convenient interfac...
Definition gmCellAccessor.h:67
GmCellAccessor(GmValueAccessor *ac)
Constructor. Takes ownership of the accessor.
Definition gmCellAccessor.h:70
virtual int queryIndex(const GmCell *c) const =0
A virtual function that given a cell returns the index that should be accessed.
An accessor proxy + method for saving a cell in the context.
Definition gmCellAccessor.h:37
GmCellAccessorProxy(GmValueAccessor *ac)
Constructor. Takes ownership of the accessor.
Definition gmCellAccessor.h:40
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
Base interface for mesh cells.
Definition gmCell.h:88
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...
virtual int cellId() const =0
Returns a number identifying the cell. It should be possible to use this id as an index to GmCellMesh...
Extends GmCellAccessor to handle property accessors.
Definition gmCellAccessor.h:145
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
GmPropertyCellAccessor(GmValueAccessor *ac, int psetIndex)
Constructor. Takes ownership of the accessor.
Definition gmCellAccessor.h:148
Class responsible for evaluating a UserFunction over a node / cell.
Definition gmUserFunction.h:160
Class used to store the definition of a user function and its parameters.
Definition gmUserFunction.h:82
Interface class for accessing and setting values from an "indexable" collection of values.
Definition gmValueAccessor.h:60
Auxiliar class used to store the needed information to translate an user function id / user function ...
Definition gmValueSetEvalContext.h:46
void setCell(const GmCell *cell, int ip)
Sets the cell / integration point over which values will be calculated.
Definition gmValueSetEvalContext.h:78
Implementation of the GmAccessorProxy class Moved from gmCellAccessor.h.
Declaration of the GmCell class.
#define GMC_API_EXPORT
Macro for controlling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_L...
Definition gmCoreConfig.h:35
Declaration of the GmValueSetEvalContext class.
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition gmVector.h:34