24 #ifndef _GEMA_GAUSS_ACCESSOR_H_ 25 #define _GEMA_GAUSS_ACCESSOR_H_ 52 virtual const double* valueAt(
const GmCell* c,
int ip,
const GmVector* coord)
const 55 return _ac->valueAt(queryIndex(c, ip), coord);
58 virtual double scalarValueAt(
const GmCell* c,
int ip,
const GmVector* coord)
const 61 return _ac->scalarValueAt(queryIndex(c, ip), coord);
67 _ac->matrixValueAt(queryIndex(c, ip), coord, mat);
73 _ac->vectorValueAt(queryIndex(c, ip), coord, vec);
76 virtual bool setValue (
const GmCell* c,
int ip,
const double* value) {
return _ac->setValue(queryIndex(c, ip), value); }
77 virtual bool setScalarValue (
const GmCell* c,
int ip,
double value) {
return _ac->setScalarValue(queryIndex(c, ip), value); }
78 virtual bool setScalarValueAtDim(
const GmCell* c,
int ip,
int dim,
double value) {
return _ac->setScalarValueAtDim(queryIndex(c, ip), dim, value); }
79 virtual bool setValueAsDef (
const GmCell* c,
int ip) {
return _ac->setValueAsDef(queryIndex(c, ip)); }
80 virtual bool setVectorValue (
const GmCell* c,
int ip,
const GmVector& vec) {
return _ac->setVectorValue(queryIndex(c, ip), vec); }
81 virtual bool setMatrixValue (
const GmCell* c,
int ip,
const GmMatrix& mat) {
return _ac->setMatrixValue(queryIndex(c, ip), mat); }
82 virtual bool setFunctionValue (
const GmCell* c,
int ip,
GmUserFunction* functionDef) {
return _ac->setFunctionValue(queryIndex(c, ip), functionDef); }
83 virtual bool setFunctionValue (
const GmCell* c,
int ip,
GmUserFunctionEvaluator* functionEval) {
return _ac->setFunctionValue(queryIndex(c, ip), functionEval); }
85 virtual QString valueStr(
const GmCell* c,
int ip,
bool evalFunctions,
bool printDefAsNil,
86 int fieldWidth = 0,
char format =
'g',
int precision = -1,
const GmVector* coord = NULL)
const 89 return _ac->valueStr(queryIndex(c, ip), evalFunctions, printDefAsNil, fieldWidth, format, precision, coord);
94 return _ac->setFunctionFromName(queryIndex(c, ip), userFunctionId, err);
97 virtual bool setValueFromVariant(
const GmCell* c,
int ip,
const QVariant& v,
bool acceptMissingDimension,
QString& err)
99 return _ac->setValueFromVariant(queryIndex(c, ip), v, acceptMissingDimension, err);
102 virtual bool isDefValue(
const GmCell* c,
int ip)
const {
return _ac->isDefValue(queryIndex(c, ip)); }
103 virtual bool isFunction(
const GmCell* c,
int ip)
const {
return _ac->isFunction(queryIndex(c, ip)); }
104 virtual QString functionId(
const GmCell* c,
int ip)
const {
return _ac->functionId(queryIndex(c, ip)); }
107 int queryIndex(
const GmCell* c,
int ip)
const 109 assert(ip >= 0 && ip < numPoints(c));
110 return _gvs->pointIndex(c->
cellId(), ip);
Implementation of the GmCellAccessor proxy class.
GmGaussAccessor(GmValueAccessor *ac, const GmGaussValueSet *gvs)
Constructor. Takes ownership of the accessor.
Definition: gmGaussAccessor.h:42
Class responsible for evaluating a UserFunction over a node / cell.
Definition: gmUserFunction.h:148
The GmGaussAccessor class is a proxy object to a value accesor implementing a more convenient interfa...
Definition: gmGaussAccessor.h:38
Base interface for mesh cells.
Definition: gmCell.h:81
Declaration of the GmGaussValueSet class.
Inheriting from GmValueSet, this class adds the peculiarities needed for saving values in Gauss point...
Definition: gmGaussValueSet.h:34
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...
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
virtual int numPoints(const GmCell *c) const
Returns the number of Gauss / integration points for the given cell.
Definition: gmGaussAccessor.h:49
#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
Implementation of the GmElement 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
arma::mat GmMatrix
The basic type for a GeMA matrix object. Currently based on an Armadillo matrix.
Definition: gmMatrix.h:38
Class used to store the definition of a user function and its parameters.
Definition: gmUserFunction.h:78
const GmGaussValueSet * _gvs
The value set that owns the value accessor used to translate indices.
Definition: gmGaussAccessor.h:114
An accessor proxy + method for saving a cell in the context.
Definition: gmCellAccessor.h:36