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)); }
110 int queryIndex(
const GmCell* c,
int ip)
const
112 assert(ip >= 0 && ip < numPoints(c));
113 return _gvs->pointIndex(c->
cellId(), ip);
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
An accessor proxy + method for saving a cell in the context.
Definition gmCellAccessor.h:37
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 cellId() const =0
Returns a number identifying the cell. It should be possible to use this id as an index to GmCellMesh...
The GmGaussAccessor class is a proxy object to a value accessor implementing a more convenient interf...
Definition gmGaussAccessor.h:39
const GmGaussValueSet * _gvs
The value set that owns the value accessor used to translate indices.
Definition gmGaussAccessor.h:117
const GmMeshGaussIndex * gaussIndex() const
Returns the associated Gauss index object.
Definition gmGaussAccessor.h:107
virtual int numPoints(const GmCell *c) const
Returns the number of Gauss / integration points for the given cell.
Definition gmGaussAccessor.h:49
GmGaussAccessor(GmValueAccessor *ac, const GmGaussValueSet *gvs)
Constructor. Takes ownership of the accessor.
Definition gmGaussAccessor.h:42
Inheriting from GmValueSet, this class adds the peculiarities needed for saving values in Gauss point...
Definition gmGaussValueSet.h:35
A Gauss index interface always indexing ALL the elements of a mesh, with support for mesh growing.
Definition gmGaussIndex.h:275
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
Implementation of the GmCellAccessor proxy 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
Implementation of the GmElement class.
Declaration of the GmGaussValueSet class.
arma::mat GmMatrix
The basic type for a GeMA matrix object. Currently based on an Armadillo matrix.
Definition gmMatrix.h:38
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition gmVector.h:34