![]() |
GemaCoreLib
The GeMA Core library
|
A helper class that returns the coordinates of an element's Gauss points, tailored to be used inside a loop over a set of elements. More...
#include <gmGaussCoordinates.h>
Public Member Functions | |
GmMultiGaussCoordinates (const GmElementMesh *mesh, int ruleSet, const GmValueAccessor *coordAc) | |
Builds an object that can be used to return an elemnt's Gauss coordinates after a call to setElement() | |
void | setElement (const GmElement *e) |
Sets the current element. | |
![]() | |
int | numPoints () const |
Return the number of integration points for this element. | |
void | coord (int ip, GmVector &c) const |
Fills c with the cartesian coordinates of integration point ip. | |
const GmShape * | shape () const |
Returns the current element shape function. | |
const GmIntegrationRule * | integrationRule () const |
Returns the current element integration rule. | |
GmMatrix & | coordMatrix () |
Returns a WRITABLE reference to the current element node coordinates. Can be used to alter the standard element node coordinate set. | |
Private Attributes | |
const GmElementMesh * | _mesh |
The mesh containing the traversed elements. | |
int | _ruleSet |
The rule set defining the integration rules used by the elements. | |
const GmValueAccessor * | _coordAc |
The node coordinate accessor. | |
GmCellType | _lastType |
The type of the last element. | |
Additional Inherited Members | |
![]() | |
GmGaussCoordinates (const GmShape *shape, const GmIntegrationRule *ir) | |
The basic constructor. Accepts NULL parameters as long as they are filled before using numPoints() or coord() | |
![]() | |
const GmShape * | _shape |
The shape function for the element type. | |
const GmIntegrationRule * | _ir |
The integration rule defining the set of Gauss points. | |
GmMatrix | _X |
The matrix with element node coordinates. | |
A helper class that returns the coordinates of an element's Gauss points, tailored to be used inside a loop over a set of elements.
Use it like: GmVector ipCoord; GmMultiGaussCoordinates egc(mesh, ruleSet, nodeAc); GmForeachElement(const GmElement* e, mesh) { egc.setElement(e); for(int ip = 0, nip = egc.numPoints(); ip < nip; ip++) { egc.coord(ip, ipCoord); // Fills ipCoord with the cartesian coordinates of the Gauss point ip for element e } }