24#ifndef _GEMA_XFEM_MESH_H_
25#define _GEMA_XFEM_MESH_H_
36#include <gmpCellMesh.h>
216 virtual const char* pluginName()
const {
return "Xfem"; }
219 virtual const char* pluginType()
const {
return "mesh"; }
222 virtual bool hasCapability(
QString capabilityName)
const
224 if(capabilityName ==
"stateDump")
226 return (capabilityName ==
"enrichment") || XfemGemaMeshBase::hasCapability(capabilityName);
230 virtual void pushProxy(lua_State* L,
const GmLogCategory& logger) { LuaProxy::pushObject(L,
new XfemLuaMesh(
this, logger)); }
232 virtual void clear();
246 Q_UNUSED(ghostSupport); Q_UNUSED(hSupport);
249 return GmpCellFactory<XfemGemaElement, XfemElement, XfemLuaElement, GmpCellMeshData<XfemVector>>;
253 virtual int cellSize(
bool ghostSupport,
bool hSupport)
const
255 Q_UNUSED(ghostSupport); Q_UNUSED(hSupport);
258 return GmpCellSize<XfemGemaElement, XfemElement, XfemLuaElement, GmpCellMeshData<XfemVector>>();
virtual const GmCell * cell(int cellIndex) const=0
virtual const GmLogCategory & logger() const
QString description() const
Basic interface for an XFEM element.
Definition xfemElement.h:44
A class used to store per element data needed only in enriched elements.
Definition xfemEnrichedElementData.h:38
A simple class to represent a natural fracture.
Definition xfemFracture.h:35
The XfemGaussAccessor class is a proxy object to a value accesor implementing a more convenient inter...
Definition xfemGaussAccessor.h:41
Implementation of the XfemMesh interface based on the standard GeMA mesh plugin.
Definition xfemMesh.h:210
virtual GmpMeshLoader< XfemVector > * meshLoader()
Returns the custom mesh loader used to load XFem mesh data. This function should be replaced for usin...
Definition xfemMesh.h:237
virtual GmpCellAllocator cellAllocator(bool ghostSupport, bool hSupport) const
Returns the function responsible for allocating and initializing a new XFEM element.
Definition xfemMesh.h:244
virtual int cellSize(bool ghostSupport, bool hSupport) const
Returns the size of a cell object.
Definition xfemMesh.h:253
A special integration rule for handling refined xfem elements.
Definition xfemIntegrationRule.h:38
A proxy class to export XfemMesh methods to the Lua environment.
Definition xfemLuaMesh.h:33
Basic class for a XFEM mesh. This is the basic mesh interface for xfem problems adding enrichment cap...
Definition xfemMesh.h:50
virtual const XfemSubElement * subElement(const XfemElement *e, int index) const
Returns a subelement of an enriched element.
Definition xfemMesh.cpp:129
virtual int numFractureSubElements(const XfemElement *e) const
Returns the number of fracture sub-elements of the given enriched element (0 for non enriched ones)
Definition xfemMesh.cpp:112
virtual XfemEnrichedElementData * enrichedElementData(const XfemElement *e) const
Returns the enriched element private data or NULL if the element has not been enriched.
Definition xfemMesh.cpp:97
QList< int > _totalDofSet
list with the total number of DOF in the model
Definition xfemMesh.h:190
virtual void addTotalNumDOF(QList< int > eCI)
Adds a the list with the total number of DOF.
Definition xfemMesh.h:118
virtual int getTotalNumDOF(int id) const
Returns the list with the total number of DOF at a specific position.
Definition xfemMesh.h:115
void setSaturationRelativePermeabilityModel(char nonIsoThermal)
Set the Char defining the Saturation and Relative Permeability Model.
Definition xfemMesh.h:157
virtual bool enrichElement(XfemElement *e)
Marks the given element as enriched.
Definition xfemMesh.cpp:78
virtual GmGaussValueSetGroup * createGaussValueSetGroup(GmSimulationData *simulation, GmElementMesh *mesh)
Overrides the standard GmElementMesh::createGaussValueSetGroup() implementation to create XfemGaussVa...
Definition xfemMesh.cpp:393
const QMap< int, XfemEnrichedElementData * > & enrichedElementMap() const
Returns the map storing data for every enriched element in the mesh. Use carefully.
Definition xfemMesh.h:69
QList< GmVector > _elemCutInfo
vector with element information {iElem, # of fractures per element}
Definition xfemMesh.h:189
virtual void removeSubElement(XfemElement *e, int index)
Removes an existing sub-element from the enriched element. This removal will automatically trigger an...
Definition xfemMesh.cpp:271
virtual int numRegularSubElements(const XfemElement *e) const
Returns the number of regular (non fracture) sub-elements of the given enriched element (0 for non en...
Definition xfemMesh.cpp:104
virtual bool getMultiPhasic() const
Returns the Boolean to define whether multiPhasic analysis is carried out.
Definition xfemMesh.h:148
virtual int sizeElemCutInfo()
Returns the size of elemCutInfo list.
Definition xfemMesh.h:112
QList< XfemFracture * > _naturalFractures
The set of mesh natural fractures.
Definition xfemMesh.h:188
virtual bool getSaturationRelativePermeabilityModel() const
Returns the Char defining the Saturation and Relative Permeability Model.
Definition xfemMesh.h:160
void setCubicLaw(bool cubicLaw)
Set the cubic Law Boolean to define whether cubic law or constant fracture permeability is used.
Definition xfemMesh.h:139
virtual void addNodeStateVarIds(QStringList eCI)
Adds list with the state variable ids in the model.
Definition xfemMesh.h:130
void setMultiPhasic(bool multiPhasic)
Set the multiPhasic Boolean to define whether multiPhasic analysis is carried out.
Definition xfemMesh.h:145
virtual bool getCubicLaw() const
Returns the Boolean to define whether cubic law or constant fracture permeability is used.
Definition xfemMesh.h:142
virtual const QList< XfemFracture * > & naturalFractures() const
Returns the list of mesh natural fractures.
Definition xfemMesh.h:94
const GmIntegrationRule * enrichedElementRegularIntegrationRule(const XfemElement *e, int ruleSet) const
Returns the elements regular integration rule with support for enriched elements.
Definition xfemMesh.cpp:345
virtual void addElemCutInfo(QList< GmVector > eCI)
Adds a vector with element cut information.
Definition xfemMesh.h:106
virtual XfemElement * element(int index)
Returns a mesh cell already converted to an XfemElement. Non const version.
Definition xfemMesh.h:62
virtual void deleteElemCutInfo()
delete element cut information
Definition xfemMesh.h:109
virtual void clearXfemData()
Clears Xfem related data from the mesh.
Definition xfemMesh.cpp:433
const GmIntegrationRule * enrichedElementFractureIntegrationRule(const XfemSubElement *se, int ruleSet) const
Returns the integration rule for the given fracture sub-element.
Definition xfemMesh.cpp:360
virtual XfemGaussAccessor * enrichedGaussAttributeAccessor(QString id, Unit desiredUnit, const GmLogCategory &logger) const
Equivalent to call enrichedGaussAttributeAccessor(id, 0, true, desiredUnit, logger)
Definition xfemMesh.h:86
virtual bool getNonIsoThermal() const
Returns the Boolean to define whether nonIsoThermal analysis is carried out.
Definition xfemMesh.h:154
virtual QList< int > getElemTopologicalMap(int i) const
Returns the list of element neighborns of element id who contain the node i.
Definition xfemMesh.h:169
virtual void addNodeTopologicalMap(QList< int > eCI)
Adds the list of element id who contain the node i.
Definition xfemMesh.h:166
virtual void updateSubElementCoordinates(XfemElement *e, int index, const GmMatrix &seNaturalCoords, int ruleSet=0)
Updates the set of natural coordinates from a sub-element, provided that the sub-element type remains...
Definition xfemMesh.cpp:320
virtual void printValues(const GmLogCategory &logger, int options)
Overrides printValues to add subelement information.
Definition xfemMesh.cpp:399
virtual void clearNaturalFractures()
Remove all natural fractures from the mesh.
Definition xfemMesh.cpp:203
virtual int addSubElement(XfemElement *e, XfemSubElement *se, int ruleSet=0)
Adds a new sub-element to the xfem element. This addition will automatically trigger an update in the...
Definition xfemMesh.cpp:225
virtual QList< int > getNodeTopologicalMap(int i) const
Returns the list of element id who contain the node i.
Definition xfemMesh.h:163
virtual QList< QPair< int, QList< int > > > getfaceTopologicalMap(int i) const
Returns the list of neighborn element for each face of the element i.
Definition xfemMesh.h:175
void setNonIsoThermal(bool nonIsoThermal)
Set the nonIsoThermal Boolean to define whether nonIsoThermal analysis is carried out.
Definition xfemMesh.h:151
virtual void addFaceTopologicalMap(QList< QPair< int, QList< int > > > eCI)
Adds the list of neighborn element for each face of the element i.
Definition xfemMesh.h:178
virtual void deleteTotalNumDOF()
delete element cut information
Definition xfemMesh.h:121
virtual int sizeNodeStateVarIds() const
Returns the size of list with the state variable ids in the model.
Definition xfemMesh.h:136
virtual QString getNodeStateVarIds(int id) const
Returns the list with the state variable ids in the model.
Definition xfemMesh.h:127
XfemMesh(GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
Constructor. Will be called by the plugin loading code.
Definition xfemMesh.cpp:44
virtual void addNaturalFracture(XfemFracture *f)
Adds a new natural fracture to the mesh. The mesh takes ownership of the fracture object.
Definition xfemMesh.h:97
virtual void deleteNodeStateVarIds()
delete list with the state variable ids in the model
Definition xfemMesh.h:133
virtual int sizeTotalNumDOF()
Returns the size of elemCutInfo list.
Definition xfemMesh.h:124
virtual GmVector getElemCutInfo(int id) const
Returns the list with element information {iElem, # of fractures per element}.
Definition xfemMesh.h:103
QMap< int, XfemEnrichedElementData * > _elementMap
Map storing individual data for enriched elements.
Definition xfemMesh.h:187
virtual const XfemSubElement * fractureSubElement(const XfemElement *e, int index) const
Returns a fracture sub-element with an indexing starting from zero for the first fracture sub-element...
Definition xfemMesh.cpp:141
virtual void addElemTopologicalMap(QList< int > eCI)
Adds the list of element neighborns of element id who contain the node i.
Definition xfemMesh.h:172
virtual const XfemElement * element(int index) const
Returns a mesh cell already converted to an XfemElement.
Definition xfemMesh.h:59
virtual void clearSubElements()
Clears all subelements from the mesh. This will automatically clear element integration rules and dat...
Definition xfemMesh.cpp:152
virtual ~XfemMesh()
Destructor.
Definition xfemMesh.cpp:62
Class responsible for loading mesh data for an XFem mesh.
Definition xfemMeshLoader.h:38
A class used to represent an enriched element subelement, defining an integration region inside the e...
Definition xfemSubElement.h:39
GmCell *(* GmpCellAllocator)(void *addr, int meshId, GmCellType type, int hindex, int id, int offset)
void append(const T &value)
const T & at(int i) const const
Declaration of the XfemElement class.
Declaration of the XfemGaussAccessor class.
Declaration of the XfemLuaElement class.
Declaration of the XfemLuaMesh class.
GmpCellMeshBase< XfemMesh, XfemVector > XfemGemaMeshBase
Aux typedef for defining the base class for the XfemGemaMesh class.
Definition xfemMesh.h:204
Declaration of the XfemMeshLoader class.