Xfem
The Xfem Plugin
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
XfemMechanic Class Reference

Basic class for the standard plane strain physics plugin object. More...

#include <xfemMechanic.h>

Inheritance diagram for XfemMechanic:
Inheritance graph
[legend]
Collaboration diagram for XfemMechanic:
Collaboration graph
[legend]

Public Member Functions

 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.
 
virtual ~XfemMechanic ()
 Destructor.
 
virtual const char * pluginName () const
 
virtual const char * pluginType () const
 
virtual const QVariantMap * physicsMetaDataMap ()
 Returns a reference for the Xfem mechanical physics attribute map, built when the function is called for the first time.
 
virtual QList< int > changedElements () const
 Fills the list of elements that had their dofs changed since the physics was create.
 
virtual void clearChangedElements ()
 The assembler calls to clear the internal list used to track dof changes.
 
virtual bool fillFixedEnrichedBC (QList< int > &nodes, QList< int > &dof, QList< double > &values) const
 
virtual bool dofByElement (bool *fixed, bool *addOnly, bool *trackChanges) const
 
virtual const GmElementDofdofMapping (const GmElement *e) const
 
virtual bool fixedNodalDofsBc (QList< int > &nodes, QList< int > &dof, QList< double > &values, bool *constantValues) const
 See comments on base class. Fills vectors with prescribed node pore pressures.
 
virtual bool fixedNodalForcesBc (QList< int > &nodes, QList< int > &dof, QList< double > &values) const
 
virtual FemResultType fillElementDataForBc (const GmElement *e, const GmBoundaryCondition *bc, int bcIndex, int bcListIndex, int border, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
 
virtual FemResultType fillElementData (const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
 Fills the element matrices and vectors for a generic elements.
 

Protected Types

enum  xfemStateVarIds { U_ID, A_ID, NUM_STATEVAR_IDS }
 IDs for Mechanical xfem state vars. More...
 
enum  xfemPhysicsAttributeIds { ISOPARAMETRIC_ID, FIXEDENRICHEDDOF_ID, NUM_ATTRI_IDS }
 IDs for physics attributes. More...
 
enum  xfemBoundaryConditionIds { FIXED_A_BC_ID, NUM_BC_IDS }
 IDs for accepted boundary condition types. More...
 
enum  xfemBoundaryConditionValueIds { BC_AX_ID, BC_AY_ID, BC_AZ_ID, NUM_BCV_IDS }
 IDs for property values from accepted boundary condition types. More...
 

Protected Member Functions

virtual bool beforeElementStiffnessLoop (const GmpFemMatrixSet &elemMatrices, const GmpFemVectorSet &elemVectors)
 
virtual bool checkAndLoadPrivateData (LuaTable &table)
 Overloads default checkAndLoadPrivateData() to be able to setup materials.
 
virtual void fillElementDisplacements (const GmElement *e, GmVector &ue, const int &nEnrich)
 See comments on base class. Fills the vector ue with nodal displacements.
 
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 (xi, eta) point. More...
 
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 (xi, eta) point. More...
 
virtual void fillEnhancedDof (const XfemElement *xe, QList< int > &iUe, const int &np)
 Fills the position index with the degreee of freedo, both the mechanical and hydraulic physics. the implementation supports order of the defined state variables i.e {U, P} or {P, U}. More...
 
void tipDOFTreat (const int &nelem, GmVector &nodes)
 treat tip degrees of freedom
 
void fillNodalLevelSetMatrix (GmMatrix X, GmMatrix Xg, GmMatrix &H)
 Compute nodal levelset function (H) The minimum distance between a point(nodes or integration point) and a segment (fracture) is determined. This function returns the signed distance function used to enrich the element for XFEM. More...
 
void fillGaussLevelSetMatrix (GmMatrix X, GmMatrix Xg, GmMatrix &H)
 Compute Gauss levelset function (H) The minimum distance between a point(integration point) and a segment (fracture) is determined. This function returns the signed distance function used to enrich the element for XFEM. More...
 
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 integration point
 
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 integration point
 
virtual void fillFractureRotationMatrix (const GmElement *e, const GmShape *shp, GmMatrix Je, GmMatrix &Rot)
 
virtual bool getCrackNodePair (XfemEnrichedElementData *exData, QList< QList< int >> &pfNodes)
 
virtual bool insertionSortWORepeatedint (QList< int > &a, double tol)
 
virtual bool insertionSortint (QList< int > &tVec)
 
void unitVectSegment (const GmMatrix &Xg, GmMatrix &uVec, GmMatrix &uVec2, GmMatrix &uVec3, GmMatrix &ROT)
 
virtual bool fillNaturalCrackStiffnessMatrix (const GmElement *e, GmMatrix &Dep, GmVector coord, const int &ip, const GmVector &S_tn, const GmVector &Etn_old, const GmVector &v_w_tn, const GmMatrix &ROT, GmMatrix &D_xy, bool open)
 
virtual bool fillCohesiveCrackStiffnessMatrix (const GmElement *e, GmMatrix &Dep, GmVector coord, const int &ip, const GmVector &nrd, const GmVector &trd, const GmVector &Etn_old, const GmVector &v_w_tn, const GmVector &sold, const GmMatrix &ROT, GmMatrix &D_xy, const double &rockStrength, bool open)
 
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)
 
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)
 
virtual bool assemblyCrackStiffnessMatrix (const GmElement *e, GmMatrix &elemK, const GmMatrix &Kfr, const QList< int > &iUe, const QList< int > &pfList, const int &numDof)
 
virtual void assemblyCrackInternalForceVector (const GmElement *e, GmMatrix &elemFi, const GmVector &Fint_St, const QList< int > &iUe, const QList< int > &pfList, const int &numDof)
 
virtual bool splitJoinTensorToInterface (GmVector &Tensor, GmVector &Cohesive, bool type)
 Split tensor to interface or Join interface to tensor type = true ==> split tensor to interface components type = false ==> join interface components to tensor.
 
virtual GmGaussAccessorcreateGaussAttributeAccessor (GmElementMesh *mesh, QString id, int snum, bool locked, Unit desiredUnit, const GmLogCategory &logger) const
 Overrides the standard GmpFemPhysics::createGaussAttributeAccessor() implementation to create an enriched accessor. In this way, Gauss accessors recovered by GmpFemPhysicsCommon will be enriched accessors.
 

Protected Attributes

const char * _pluginType
 The plugin type name.
 
GmMatrix _Dsn
 Constitutive tangent matrix (2 x 2)
 
GmpMechanicalPhysics * _mechPhys
 The mechanical physics providing parameters and matrices to the coupling equation.
 
GmpHydraulic * _hydroPhys
 The hydraulic physics providing parameters and matrices to the coupling equation.
 

Detailed Description

Basic class for the standard plane strain physics plugin object.

Member Enumeration Documentation

◆ xfemBoundaryConditionIds

IDs for accepted boundary condition types.

Enumerator
FIXED_A_BC_ID 

Id for fixed node enriched displacement boundary condition.

NUM_BC_IDS 

The number of boundary conditions ids above.

◆ xfemBoundaryConditionValueIds

IDs for property values from accepted boundary condition types.

Enumerator
BC_AX_ID 

Nodal enriched displacement for fixed node enriched displacement boundary condition in x.

BC_AY_ID 

Nodal enriched displacement for fixed node enriched displacement boundary condition in y.

BC_AZ_ID 

Nodal enriched displacement for fixed node enriched displacement boundary condition in z.

NUM_BCV_IDS 

The number of boundary conditions value ids above.

◆ xfemPhysicsAttributeIds

IDs for physics attributes.

Enumerator
ISOPARAMETRIC_ID 

Id for retrieving the isoParametric physics attribute.

FIXEDENRICHEDDOF_ID 

Id for retrieving the fixed enrichment physics attribute.

NUM_ATTRI_IDS 

The number of physics attribute ids above.

◆ xfemStateVarIds

IDs for Mechanical xfem state vars.

Enumerator
U_ID 

Id for retrieving the accessor to the displacement state var.

A_ID 

Id for retrieving the accessor to the enriched state var.

NUM_STATEVAR_IDS 

The number of state var ids above.

Member Function Documentation

◆ dofMapping()

const GmElementDof * XfemMechanic::dofMapping ( const GmElement e) const
virtual

The set of enriched dofs

The set of standard displacement dofs (u)

The set of enriched displacement dofs

The set of standard displacement dofs (u)

The set of enriched displacement dofs

Reimplemented in XfemHMCoupled.

◆ fillEnhancedBuMatrix()

void XfemMechanic::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 
)
protected

Calculates the enhanced strain displacement matrix (B) and the Jacobian determinant in a specified (xi, eta) point.

See the description of fillStiffnessMatrix() for in depth details.

e The element where we are calculating the matrix ip Integration point (xi, eta) where the matrix will be calculated X Node coordinates X matrix used to calculate the Jacobian matrix. Size = n x 2. Hn Matrix of nodal level set values Hip Matrix of gauss point level set value Bu Filled with the calculated enhanced strain displacement matrix. Khoei, XFEM Chapter 2, Section 2.7, Equation 2.73. Size = 4 x 4n detJ Filled by the function with the determinant of the Jacobian matrix

◆ fillEnhancedDof()

void XfemMechanic::fillEnhancedDof ( const XfemElement xe,
QList< int > &  iUe,
const int &  np 
)
protectedvirtual

Fills the position index with the degreee of freedo, both the mechanical and hydraulic physics. the implementation supports order of the defined state variables i.e {U, P} or {P, U}.

◆ fillEnhancedNuJumpMatrix()

void XfemMechanic::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 
)
protected

Calculates the enhanced strain displacement matrix (B) and the Jacobian determinant in a specified (xi, eta) point.

See the description of fillStiffnessMatrix() for in depth details.

Param e The element where we are calculating the matrix Param ip Integration point (xi, eta) where the matrix will be calculated Param X Node coordinates X matrix used to calculate the Jacobian matrix. Size = n x 2. Param Hn Matrix of nodal level set values Param Hip Matrix of gauss point level set value Param Bu Filled with the calculated enhanced strain displacement matrix. Khoei, XFEM Chapter 2, Section 2.7, Equation 2.73. Size = 4 x 4n Param detJ Filled by the function with the determinant of the Jacobian matrix

◆ fillFixedEnrichedBC()

bool XfemMechanic::fillFixedEnrichedBC ( QList< int > &  nodes,
QList< int > &  dof,
QList< double > &  values 
) const
virtual

The set of enriched displacement dofs

◆ fillGaussLevelSetMatrix()

void XfemMechanic::fillGaussLevelSetMatrix ( GmMatrix  X,
GmMatrix  Xg,
GmMatrix H 
)
protected

Compute Gauss levelset function (H) The minimum distance between a point(integration point) and a segment (fracture) is determined. This function returns the signed distance function used to enrich the element for XFEM.

X The integration point coordinates matrix (xi,yi) Xg The ghost nodal coordinates matrix (xi,yi) H The gauss level set vector (xi,yi)

◆ fillNodalLevelSetMatrix()

void XfemMechanic::fillNodalLevelSetMatrix ( GmMatrix  X,
GmMatrix  Xg,
GmMatrix H 
)
protected

Compute nodal levelset function (H) The minimum distance between a point(nodes or integration point) and a segment (fracture) is determined. This function returns the signed distance function used to enrich the element for XFEM.

X The nodal coordinates matrix (xi,yi) Xg The ghost nodal coordinates matrix (xi,yi) H The nodal level set vector (xi,yi)

◆ unitVectSegment()

void XfemMechanic::unitVectSegment ( const GmMatrix Xg,
GmMatrix uVec,
GmMatrix uVec2,
GmMatrix uVec3,
GmMatrix ROT 
)
protected

\Returns cossines of perpendicular unit vector of segment a-b

Parameters
XgThe ghost nodal coordinates matrix (xi,yi)
uVecThe perpendicular unit vector of segment (vx,vy)

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