24 #ifndef _GEMA_INTERPOLATOR_INPUT_BINDINGS_H_ 25 #define _GEMA_INTERPOLATOR_INPUT_BINDINGS_H_ 48 virtual int size()
const = 0;
51 virtual int valueSize(
int srcIndex)
const = 0;
57 virtual void reset() = 0;
62 virtual bool next() = 0;
67 virtual const double*
value(
int srcIndex) = 0;
99 template <
class Base,
class Ac>
110 virtual int numSrcs() {
return 1; }
116 virtual int valueSize(
int srcIndex)
const { Q_UNUSED(srcIndex); assert(srcIndex == 0);
return _valueAc->valueSize(); }
125 virtual const double* value(
int srcIndex) { Q_UNUSED(srcIndex); assert(srcIndex == 0); assert(
_currIndex >= 0);
return _valueAc->value(
_currIndex); }
148 virtual void setValue(
int srcIndex,
const double* value)
150 Q_UNUSED(srcIndex); assert(srcIndex == 0); assert(
_currIndex >= 0);
161 template <
class Base,
class Ac>
178 virtual int valueSize(
int srcIndex)
const { assert(srcIndex >= 0 && srcIndex <
_valueAcList.
size());
return _valueAcList.
at(srcIndex)->valueSize(); }
210 virtual void setValue(
int srcIndex,
const double* value)
226 template <
class Base,
class Ac>
237 virtual int numSrcs() {
return 1; }
243 virtual int valueSize(
int srcIndex)
const { Q_UNUSED(srcIndex); assert(srcIndex == 0);
return _valueAc->valueSize(); }
252 virtual const double* value(
int srcIndex)
255 assert(srcIndex == 0);
257 if(
_valueAc->info()->canStoreFunctions())
289 virtual void setValue(
int srcIndex,
const double* value)
291 Q_UNUSED(srcIndex); assert(srcIndex == 0); assert(
_currElem);
301 template <
class Base,
class Ac>
318 virtual int valueSize(
int srcIndex)
const { assert(srcIndex >= 0 && srcIndex <
_valueAcList.
size());
return _valueAcList.
at(srcIndex)->valueSize(); }
327 virtual const double* value(
int srcIndex)
363 virtual void setValue(
int srcIndex,
const double* value)
395 virtual int valueSize(
int srcIndex)
const { Q_UNUSED(srcIndex); assert(srcIndex == 0);
return _data.n_rows; }
Base interface for FEM (finite element) mesh elements.
Definition: gmElement.h:37
A GmInterpolatorInputDataBinding implementation returning values provided by a list of Gauss value ac...
Definition: gmInterpolatorInputBindings.h:302
GmInterpolatorGaussCoordinateSetBinding * _pointSet
The point set providing the indices used to access values.
Definition: gmInterpolatorInputBindings.h:268
const unsigned int n_rows
number of rows in the vector (read-only)
Definition: gmVector.h:87
virtual bool next(GmCRVector &coord, int *index)=0
Similar to nextCoordinate(), returns both the next coordinate and node index. Same caveats apply....
virtual void setValue(int srcIndex, const double *value)
Updates the value pointed to by the current iterator position, for the given data source index (betwe...
Definition: gmInterpolatorInputBindings.h:148
QList< Ac > _valueAcList
The list of accessors for the interpolated node values.
Definition: gmInterpolatorInputBindings.h:194
The GmGaussAccessor class is a proxy object to a value accesor implementing a more convenient interfa...
Definition: gmGaussAccessor.h:38
Declaration of usefull configuration definitions for the Core library.
const T & at(int i) const const
GmInterpolatorMNodeDataBinding(GmInterpolatorNodeCoordinateSetBinding *pointSet, const QList< Ac > &nodeAccessors)
Constructor, receiving the point set for which this binding will return values and the list of access...
Definition: gmInterpolatorInputBindings.h:168
virtual void ipNaturalCoord(const GmElement *elem, int ip, GmVector &ipCoord) const =0
Given an element and its integration point index, fills ipCoord with its natural coordinate.
virtual void setValue(int srcIndex, const double *value)
Updates the value pointed to by the current iterator position, for the given data source index (betwe...
Definition: gmInterpolatorInputBindings.h:210
void setMemory(const double *data, int nlin)
Exchanges the memory area used by the vector. Same caveats explained in the class documentation apply...
Definition: gmVector.h:100
int _currIndex
The current index.
Definition: gmInterpolatorInputBindings.h:195
Interface class for accessing and setting values from an "indexable" collection of values.
Definition: gmValueAccessor.h:59
virtual void setValue(int srcIndex, const double *value)
Updates the value pointed to by the current iterator position, for the given data source index (betwe...
Definition: gmInterpolatorInputBindings.h:289
int _currIp
The current integration point index.
Definition: gmInterpolatorInputBindings.h:274
Interface for a coordinate set that stores node coordinates. Besides returning coordinates,...
Definition: gmInterpolatorCoordinateBindings.h:143
virtual int size() const =0
Returns the number of coordinates stored by this set.
GmCRVector _currCoord
The current coordinate.
Definition: gmInterpolatorInputBindings.h:134
int _currIp
The current integration point index.
Definition: gmInterpolatorInputBindings.h:348
A GmInterpolatorInputDataBinding implementation returning values provided by a Gauss value accessor....
Definition: gmInterpolatorInputBindings.h:227
bool isEmpty() const const
GmInterpolatorInOutDataBinding implementation working with values provided by a list of node value ac...
Definition: gmInterpolatorInputBindings.h:203
Ac _valueAc
The accessor for the interpolated node values.
Definition: gmInterpolatorInputBindings.h:132
Implementation of the GmGaussAccessor proxy class.
GmInterpolatorGaussCoordinateSetBinding * _pointSet
The point set providing the indices used to access values.
Definition: gmInterpolatorInputBindings.h:342
GmInterpolatorMGaussDataBinding(GmInterpolatorGaussCoordinateSetBinding *pointSet, const QList< Ac > &gaussAccessors)
Constructor, receiving the point set for which this binding will return values and the list of access...
Definition: gmInterpolatorInputBindings.h:308
Ac _valueAc
The accessor for the interpolated Gauss values.
Definition: gmInterpolatorInputBindings.h:272
virtual void setValue(int srcIndex, const double *value)
Updates the value pointed to by the current iterator position, for the given data source index (betwe...
Definition: gmInterpolatorInputBindings.h:363
GmInterpolatorNodeDataBinding(GmInterpolatorNodeCoordinateSetBinding *pointSet, Ac nodeAc)
Constructor, receiving the point set for which this binding will return values and the accessor used ...
Definition: gmInterpolatorInputBindings.h:106
GmInterpolatorInOutDataBinding implementation working with values provided by a list of Gauss value a...
Definition: gmInterpolatorInputBindings.h:356
GmInterpolatorInOutDataBinding implementation working with values provided by a node value accessor.
Definition: gmInterpolatorInputBindings.h:141
An auxiliary vector WRAPPER that binds the vector to a CONST memory area with data already initialize...
Definition: gmVector.h:69
QList< Ac > _valueAcList
The list of accessors for the interpolated Gauss values.
Definition: gmInterpolatorInputBindings.h:346
GmCRVector _currCoord
The current coordinate.
Definition: gmInterpolatorInputBindings.h:275
GmInterpolatorNodeCoordinateSetBinding * _pointSet
The point set providing the indices used to access values.
Definition: gmInterpolatorInputBindings.h:190
virtual void reset()=0
Resets the coordinate iterator. The following call to nextCoordinate() will return the first coordina...
const GmElement * _currElem
The current element.
Definition: gmInterpolatorInputBindings.h:273
virtual void setValue(int srcIndex, const double *value)=0
Updates the value pointed to by the current iterator position, for the given data source index (betwe...
Interface for a coordinate set that stores Gauss point coordinates. Besides returning coordinates,...
Definition: gmInterpolatorCoordinateBindings.h:166
virtual bool setValue(int index, const double *value)=0
Allows for altering the value associated with entry "index" in the value set. This version of the fun...
GmCRVector _currCoord
The current coordinate.
Definition: gmInterpolatorInputBindings.h:349
const GmElement * _currElem
The current element.
Definition: gmInterpolatorInputBindings.h:347
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition: gmVector.h:34
GmInterpolatorNodeCoordinateSetBinding * _pointSet
The point set providing the indices used to access values.
Definition: gmInterpolatorInputBindings.h:128
GmInterpolatorGaussDataBinding(GmInterpolatorGaussCoordinateSetBinding *pointSet, Ac gaussAc)
Constructor, receiving the point set for which this binding will return values and the accessor used ...
Definition: gmInterpolatorInputBindings.h:233
arma::mat GmMatrix
The basic type for a GeMA matrix object. Currently based on an Armadillo matrix.
Definition: gmMatrix.h:38
int _currIndex
The current index.
Definition: gmInterpolatorInputBindings.h:133
GmInterpolatorInOutDataBinding implementation working with values provided by a Gauss value accessor.
Definition: gmInterpolatorInputBindings.h:282
virtual bool next(GmCRVector &coord, const GmElement **elem, int *ip)=0
Similar to nextCoordinate(), returns both the next coordinate and Gauss point index....
GmCRVector _currCoord
The current coordinate.
Definition: gmInterpolatorInputBindings.h:196
A GmInterpolatorInputDataBinding implementation returning values provided by a list of node value acc...
Definition: gmInterpolatorInputBindings.h:162
A version of GmInterpolatorInputDataBinding that lets us to also update the stored data.
Definition: gmInterpolatorInputBindings.h:80
A GmInterpolatorInputDataBinding implementation returning values provided by a node value accessor....
Definition: gmInterpolatorInputBindings.h:100