Xfem
The Xfem Plugin
xfemSubElement.h
Go to the documentation of this file.
1 /************************************************************************
2 **
3 ** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4 ** All rights reserved.
5 **
6 ** This file is part of the "GeMA" software. It's use should respect
7 ** the terms in the license agreement that can be found together
8 ** with this source code.
9 ** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10 ** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11 ** A PARTICULAR PURPOSE.
12 **
13 ************************************************************************/
14 
24 #ifndef _GEMA_XFEM_SUBELEMENT_H_
25 #define _GEMA_XFEM_SUBELEMENT_H_
26 
27 #include <gmCell.h>
28 #include <gmMatrix.h>
29 
30 class XfemElement;
31 
33 #define XFEM_SUBELEMENT_FRACTURE_MASK (~(~0u >> 1))
34 
39 {
40 public:
41 
42  XfemSubElement(GmCellType type, bool fracture, const GmMatrix& nodeNaturalCoordinates);
43 
46 
49 
56  const GmMatrix& nodeCoordinates() const { return _naturalCoords; }
57 
61  int firstGaussPoint() const { return _firstGp; }
62 
64  int numGaussPoints() const { return _numGp; }
65 
66  int nodeIndex(const XfemElement* e, int index, GmValueAccessor* coordAc, bool* ok) const;
67 
68 private:
69  friend class XfemEnrichedElementData;
70 
73  int _firstGp;
74  int _numGp;
75 };
76 
77 #endif
78 
int firstGaussPoint() const
Returns the index of this subelements first Gauss point. For regular subelements, this is also the in...
Definition: xfemSubElement.h:61
bool fracture() const
Returns true if this is a sub-element used to represent the fracture (discontinuity) itself.
Definition: xfemSubElement.h:48
XfemSubElement(GmCellType type, bool fracture, const GmMatrix &nodeNaturalCoordinates)
Subelement constructor.
Definition: xfemSubElement.cpp:69
GmMatrix _naturalCoords
The set of nodes defining the subelement geometry. Coordinates are given in father natural coordinate...
Definition: xfemSubElement.h:72
Basic interface for an XFEM element.
Definition: xfemElement.h:43
int _typeFracture
The sub element type combined with a flag in its MSB to tell if this is a fracture sub-element or not...
Definition: xfemSubElement.h:71
int _numGp
The number of Gauss points for this subelement.
Definition: xfemSubElement.h:74
const GmMatrix & nodeCoordinates() const
Returns the subelement node coordinates, given in the father element natural coordinate system....
Definition: xfemSubElement.h:56
int _firstGp
The index of this subelement first Gauss point inside the element.
Definition: xfemSubElement.h:73
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 num...
Definition: xfemSubElement.cpp:92
int numGaussPoints() const
Returns the number of Gauss/integration points tied to this subelement.
Definition: xfemSubElement.h:64
GmCellType type() const
Returns the subelement type.
Definition: xfemSubElement.h:45
A class used to represent an enriched element subelement, defining an integration region inside the e...
Definition: xfemSubElement.h:38
GmCellType
#define XFEM_SUBELEMENT_FRACTURE_MASK
Mask with 1 on the MSB to tell if the subelement is a fracture (MSB = 1) or not (MSB = 0)
Definition: xfemSubElement.h:33
A class used to store per element data needed only in enriched elements.
Definition: xfemEnrichedElementData.h:37
arma::mat GmMatrix