25#ifndef _GEMA_XFEM_MECHANIC_H_
26#define _GEMA_XFEM_MECHANIC_H_
28#include <gmpFemPhysicsCoupled.h>
29#include <gmpMechanicalPhysics.h>
30#include <gmpMechanicPoint.h>
34class GmpMechanicalPhysics;
49 : T(objType, simulation,
id,
"",
73 const GmpFemPhysicsCommonMaterialFactory* matFactory,
const GmLogCategory& logger);
78 virtual const char* pluginName()
const {
return "Xfem"; }
80 virtual const char* pluginType()
const {
return _pluginType; }
94 virtual bool dofByElement(
bool* fixed,
bool* addOnly,
bool* trackChanges)
const;
103 int border, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
105 virtual FemResultType
fillElementData(
const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
152 virtual bool beforeElementStiffnessLoop(
const GmpFemMatrixSet& elemMatrices,
const GmpFemVectorSet& elemVectors);
169 virtual bool insertionSortWORepeatedint(
QList<int>& a,
double tol);
171 virtual bool insertionSortint(
QList<int>& tVec);
178 const GmMatrix& ROT,
GmMatrix& D_xy,
const double& rockStrength,
bool open);
180 virtual bool naturalFractureReturnMapping(
const GmElement* e,
XfemEnrichedElementData* exData,
const GmVector& sold,
const GmMatrix& Dep,
const GmVector& enew,
const GmVector& eold,
GmVector& Stn_new,
const GmMatrix& ROT,
GmVector& S_w_xy,
bool open,
const int& iFracSubElement,
const GmVector& ip,
const int& k);
182 virtual bool cohesiveFractureReturnMapping(
const GmElement* e,
const GmVector& sold,
const GmMatrix& Dep,
const GmVector& enew,
const GmVector& eold,
GmVector& Stn_new,
const GmMatrix& ROT,
GmVector& S_w_xy,
const double& rockStrength,
bool open,
const GmVector& ip,
const int& k);
GmPluginObjectFactory * objectFactory(QString pluginName, QString category="", QString objType="")
GmPluginLoader * loader() 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
Basic class for the standard plane strain physics plugin object.
Definition xfemMechanic.h:69
void fillNodalLevelSetMatrix(GmMatrix X, GmMatrix Xg, GmMatrix &H)
Compute nodal levelset function (H) The minimum distance between a point(nodes or integration point) ...
Definition xfemMechanic.cpp:2115
const char * _pluginType
The plugin type name.
Definition xfemMechanic.h:201
xfemBoundaryConditionValueIds
IDs for property values from accepted boundary condition types.
Definition xfemMechanic.h:143
@ BC_AY_ID
Nodal enriched displacement for fixed node enriched displacement boundary condition in y.
Definition xfemMechanic.h:145
@ BC_AZ_ID
Nodal enriched displacement for fixed node enriched displacement boundary condition in z.
Definition xfemMechanic.h:146
@ BC_AX_ID
Nodal enriched displacement for fixed node enriched displacement boundary condition in x.
Definition xfemMechanic.h:144
@ NUM_BCV_IDS
The number of boundary conditions value ids above.
Definition xfemMechanic.h:149
virtual void fillEnhancedDof(const XfemElement *xe, QVector< int > &iUe, const int &np)
Fills the position index with the degreee of freedo, both the mechanical and hydraulic physics....
Definition xfemMechanic.cpp:2803
virtual const GmElementDof * dofMapping(const GmElement *e) const
Definition xfemMechanic.cpp:189
virtual bool splitJoinTensorToInterface(GmVector &Tensor, GmVector &Cohesive, bool type)
Split tensor to interface or Join interface to tensor type = true ==> split tensor to interface compo...
Definition xfemMechanic.cpp:2858
XfemMechanic(const char *pluginType, GmSimulationData *simulation, QString id, QString description, const GmpFemPhysicsCommonMaterialFactory *matFactory, const GmLogCategory &logger)
Constructor. Will be called by the plugin loading code.
Definition xfemMechanic.cpp:62
virtual ~XfemMechanic()
Destructor.
Definition xfemMechanic.cpp:100
virtual const QVariantMap * physicsMetaDataMap()
Returns a reference for the Xfem mechanical physics attribute map, built when the function is called ...
Definition xfemMechanic.cpp:106
virtual bool checkAndLoadPrivateData(LuaTable &table)
Overloads default checkAndLoadPrivateData() to be able to setup materials.
Definition xfemMechanic.cpp:157
xfemStateVarIds
IDs for Mechanical xfem state vars.
Definition xfemMechanic.h:111
@ NUM_STATEVAR_IDS
The number of state var ids above.
Definition xfemMechanic.h:116
@ U_ID
Id for retrieving the accessor to the displacement state var.
Definition xfemMechanic.h:112
@ A_ID
Id for retrieving the accessor to the enriched state var
Definition xfemMechanic.h:113
virtual void fillElementDisplacements(const GmElement *e, GmVector &ue, const int &nEnrich)
See comments on base class. Fills the vector ue with nodal displacements.
Definition xfemMechanic.cpp:1939
xfemPhysicsAttributeIds
IDs for physics attributes.
Definition xfemMechanic.h:121
@ ISOPARAMETRIC_ID
Id for retrieving the isoParametric physics attribute.
Definition xfemMechanic.h:122
@ NUM_ATTRI_IDS
The number of physics attribute ids above.
Definition xfemMechanic.h:127
@ FIXEDENRICHEDDOF_ID
Id for retrieving the fixed enrichment physics attribute.
Definition xfemMechanic.h:123
void fillInteractingCraksGaussLevelSets(const GmElement *e, XfemEnrichedElementData *exData, int nEnrich, int nCracks, QList< double >crackIndex, QList< GmMatrix > &gaussLevelSet)
computation of Additional enrichment fuctions for cracks intersection considering element nodes and i...
Definition xfemMechanic.cpp:1870
virtual void clearChangedElements()
The assembler calls to clear the internal list used to track dof changes.
Definition xfemMechanic.cpp:735
virtual GmGaussAccessor * createGaussAttributeAccessor(GmElementMesh *mesh, QString id, int snum, bool locked, Unit desiredUnit, const GmLogCategory &logger) const
Overrides the standard GmpFemPhysics::createGaussAttributeAccessor() implementation to create an enri...
Definition xfemMechanic.h:193
void fillEnhancedBuMatrix(const GmElement *e, const GmShape *shape, const GmVector &ncoord, const GmMatrix &X, const GmMatrix &J, GmMatrix &Bu, const QList< int > &gaussLevelSet, const int &nEnrich, const GmVector &nodes, GmElementDof *dofMap, XfemEnrichedElementData *exData, const int &gaussIP)
Calculates the enhanced strain displacement matrix (B) and the Jacobian determinant in a specified (x...
Definition xfemMechanic.cpp:2380
GmpMechanicalPhysics * _mechPhys
The mechanical physics providing parameters and matrices to the coupling equation.
Definition xfemMechanic.h:203
GmMatrix _Dsn
Constitutive tangent matrix (2 x 2)
Definition xfemMechanic.h:202
void tipDOFTreat(const int &nelem, GmVector &nodes)
treat tip degrees of freedom
Definition xfemMechanic.cpp:2554
GmpHydraulic * _hydroPhys
The hydraulic physics providing parameters and matrices to the coupling equation.
Definition xfemMechanic.h:204
virtual bool fillFixedEnrichedBC(QVector< int > &nodes, QVector< int > &dof, QVector< double > &values) const
Definition xfemMechanic.cpp:470
virtual bool fixedNodalDofsBc(QVector< int > &nodes, QVector< int > &dof, QVector< double > &values, bool *constantValues) const
See comments on base class. Fills vectors with prescribed node pore pressures.
Definition xfemMechanic.cpp:431
virtual FemResultType fillElementData(const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
Fills the element matrices and vectors for a generic elements.
Definition xfemMechanic.cpp:757
void unitVectSegment(const GmMatrix &Xg, GmMatrix &uVec, GmMatrix &uVec2, GmMatrix &uVec3, GmMatrix &ROT)
Definition xfemMechanic.cpp:2731
void fillGaussLevelSetMatrix(GmMatrix X, GmMatrix Xg, GmMatrix &H)
Compute Gauss levelset function (H) The minimum distance between a point(integration point) and a seg...
Definition xfemMechanic.cpp:2175
xfemBoundaryConditionIds
IDs for accepted boundary condition types.
Definition xfemMechanic.h:133
@ FIXED_A_BC_ID
Id for fixed node enriched displacement boundary condition.
Definition xfemMechanic.h:134
@ NUM_BC_IDS
The number of boundary conditions ids above.
Definition xfemMechanic.h:138
virtual QList< int > changedElements() const
Fills the list of elements that had their dofs changed since the physics was create.
Definition xfemMechanic.cpp:668
void fillInteractingCraksNodalLevelSets(const GmElement *e, XfemEnrichedElementData *exData, int nEnrich, int nCracks, QList< double >crackIndex, QList< GmMatrix > &nodalLevelSet)
computation of Additional enrichment fuctions for cracks intersection considering element nodes and i...
Definition xfemMechanic.cpp:1801
void fillEnhancedNuJumpMatrix(const GmElement *e, GmMatrix &Nu, const GmVector &N, const QList< int > &BottomLevelSet, const QList< int > &TopLevelSet, const GmVector &nodes, GmElementDof *dofMap, XfemEnrichedElementData *exData, const int &iSubCrack)
Calculates the enhanced strain displacement matrix (B) and the Jacobian determinant in a specified (x...
Definition xfemMechanic.cpp:2236
Basic class for a XFEM mesh. This is the basic mesh interface for xfem problems adding enrichment cap...
Definition xfemMesh.h:50
virtual XfemGaussAccessor * enrichedGaussAttributeAccessor(QString id, Unit desiredUnit, const GmLogCategory &logger) const
Equivalent to call enrichedGaussAttributeAccessor(id, 0, true, desiredUnit, logger)
Definition xfemMesh.h:86
Auxiliar class wrapping a plugin physics object. Its only purpose is to override the creation of Gaus...
Definition xfemMechanic.h:46
virtual GmGaussAccessor * createGaussAttributeAccessor(GmElementMesh *mesh, QString id, int snum, bool locked, Unit desiredUnit, const GmLogCategory &logger) const
Overrides the standard GmpFemPhysics::createGaussAttributeAccessor() implementation to create an enri...
Definition xfemMechanic.h:57
Declaration of the XfemMesh class.