Xfem
The Xfem Plugin
Public Member Functions | Private Attributes | Friends | List of all members
XfemSubElement Class Reference

A class used to represent an enriched element subelement, defining an integration region inside the enriched element. More...

#include <xfemSubElement.h>

Public Member Functions

 XfemSubElement (GmCellType type, bool fracture, const GmMatrix &nodeNaturalCoordinates)
 Subelement constructor. More...
 
GmCellType type () const
 Returns the subelement type.
 
bool fracture () const
 Returns true if this is a sub-element used to represent the fracture (discontinuity) itself.
 
const GmMatrixnodeCoordinates () const
 Returns the subelement node coordinates, given in the father element natural coordinate system. The matrix is organized as a 'd x n' matrix where d is the number of natural coordinates for the father element and n the number of nodes for the sub element type. See XfemSubElement() documentation for an example.
 
int firstGaussPoint () const
 Returns the index of this subelements first Gauss point. For regular subelements, this is also the index of its first integration point inside the element set of integration points.
 
int numGaussPoints () const
 Returns the number of Gauss/integration points tied to this subelement.
 
int nodeIndex (const XfemElement *e, int index, GmValueAccessor *coordAc, bool *ok) const
 Given the sub-element's father element, and a sub-element vertex index (a value between 0 and the number of nodes of the sub-element type), returns the global mesh index of that vertex. More...
 

Private Attributes

int _typeFracture
 The sub element type combined with a flag in its MSB to tell if this is a fracture sub-element or not.
 
GmMatrix _naturalCoords
 The set of nodes defining the subelement geometry. Coordinates are given in father natural coordinates.
 
int _firstGp
 The index of this subelement first Gauss point inside the element.
 
int _numGp
 The number of Gauss points for this subelement.
 

Friends

class XfemEnrichedElementData
 

Detailed Description

A class used to represent an enriched element subelement, defining an integration region inside the enriched element.

Constructor & Destructor Documentation

◆ XfemSubElement()

XfemSubElement::XfemSubElement ( GmCellType  type,
bool  fracture,
const GmMatrix nodeNaturalCoordinates 
)

Subelement constructor.

Parameters
typeThe sub element type. It must be compatible with the element type (both should be surface types or both volume types, exception made for fracture sub-elements that can be of a lower dimension than the element itself) and also should have the same interpolation order (the current calculation done to convert the sub element integration points to the father element reference frame requires that).
fractureIs this a sub-element used to represent the fracture itself?
nodeNaturalCoordinatesThe sub element coordinates, given in the natural coordinate space of the father element. This is a matrix organized as a 'd x n' matrix where d is the number of natural coordinates for the father element and n the number of nodes for the sub element type. For a tri3 sub element maped over a quad4 father, for example, it will contain the xi and eta coordinates of the three points forming the triangle:
seNaturalCoords = [xi_node1, xi_node2, xi_node3]
[eta_node1, eta_node2, eta_node3]
For a quad4 sub element maped over a tri3 father that would give:
seNaturalCoords = [zeta1_node1, zeta1_node2, zeta1_node3, zeta1_node4]
[zeta2_node1, zeta2_node2, zeta2_node3, zeta2_node4]
[zeta3_node1, zeta3_node2, zeta3_node3, zeta3_node4]

Member Function Documentation

◆ nodeIndex()

int XfemSubElement::nodeIndex ( const XfemElement e,
int  index,
GmValueAccessor coordAc,
bool *  ok 
) const

Given the sub-element's father element, and a sub-element vertex index (a value between 0 and the number of nodes of the sub-element type), returns the global mesh index of that vertex.

The result node can be a regular geometry node or a ghost node. For the later, returned indices are ghost indices (with the high bit set). If the vertex is not a mesh node, returns 0 and sets ok to false.

IMPORTANT: This is not a fast function. It will search all of the father elements nodes for a match. For ghost nodes the comparisson will be done in cartesian coordinates given by coordAc.


The documentation for this class was generated from the following files: