Xfem
The Xfem Plugin
Loading...
Searching...
No Matches
xfemPos.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2017 by Geomechanic group - Tecgraf/Puc-Rio
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
25#ifndef _GEMA_XFEM_POS_H_
26#define _GEMA_XFEM_POS_H_
27
28#include <assert.h>
29#include "xfemTools.h"
30
32class XfemPos : public XfemTools
33{
34public:
35 //XfemPos(XfemMesh* _xmesh, XfemOptions& xfemOptions, GmLogCategory& logger);
36 XfemPos(XfemMesh* _xmesh, XfemOptions& xfemOptions, GmSimulationData* simulation, QVector<GmpFemPhysics*>& physics, const GmLogCategory& logger);
37
38 virtual ~XfemPos();
39
41 virtual bool checkFractureTips(XfemMesh* xmesh) const;
42 //set regions to check fracture propagation
43 virtual bool setRegionsToCheck(XfemMesh* xmesh) const;
44 //set regions to check fracture propagation
45 virtual bool setRegionsToCheck3D(XfemMesh* xmesh) const;
46 //check fracture propagation at the crack front
47 bool setFrontToCheck3D(XfemMesh * xmesh) const;
48 //Treatment for No inital cracks in the model
49 virtual bool noInitialCracks(XfemMesh* xmesh) const;
50 //set nonLocal Quad region
51 virtual bool nonLocalQuad(XfemMesh* xmesh, XfemFracture* fracture, QList<GmVector>& headIp, QList<GmVector>& tailIp, int idCrack) const;
52 //set nonLocal Circle region
53 virtual bool nonLocalCircle(XfemMesh* xmesh, XfemFracture* fracture, QList<GmVector>& headIp, QList<GmVector>& tailIp) const;
54 //get polygon coords
55 virtual bool createPolygon(XfemMesh* xmesh, GmVector Crk, GmMatrix& pCoords) const;
56 //get centroid
57 //virtual bool createCentroid(XfemMesh * xmesh, GmVector Crk, GmMatrix & polygonVert) const;
58 //get circle coords
59 //virtual bool createCircle(XfemMesh* xmesh, GmVector Crk, GmMatrix& polygonVert) const;
60 //get polygon Area
61 virtual bool polygonArea(GmMatrix Xnodes, double& S) const;
62 //get circle Area
63 //virtual bool circleArea(GmMatrix Xnodes, double& S) const;
64 //check propagation of fracture in integration points inside a region
65 virtual bool checkPropagation(XfemMesh* xmesh) const;
66 //check propagation of fracture in integration points inside a region
67 virtual bool checkPropagation3D(XfemMesh* xmesh) const;
68 virtual bool testPropagation3D(XfemMesh* xmesh) const;
69 //check propagation of fracture in integration points inside this element
70 virtual bool checkCrackReactivation(XfemMesh* xmesh, GmVector crackPath, XfemEnrichedElementData* exData) const;
71 //get average stress or strain field according to propagation criteria and weight function
72 virtual bool averageStressStrainField(XfemMesh* xmesh, XfemFracture* fracture, GmVector& fieldValue, double& strength, bool isHead) const;
73 //get average stress or strain field according to propagation criteria and weight function
74 virtual bool averageStressStrainField3D(XfemMesh* xmesh, XfemFracture* fracture, int index, GmMatrix ROT2, GmVector& fieldValue, GmMatrix& fieldDir, bool& next) const;
75 virtual bool testAverageStressStrainField3D(XfemMesh* xmesh, XfemFracture* fracture, GmCell* e, int index, GmMatrix ROT2, GmVector& fieldValue, GmMatrix& fieldDir, bool& next) const;
76 //get average stress or strain field according to propagation criteria and weight function
77 virtual bool averageUnitVectors3D(XfemMesh* xmesh, XfemFracture* fracture, int index, GmMatrix& ROT2) const;
78 //extend Crack Plane 3D
79 virtual bool extendCrackPlane3D(XfemMesh* xmesh, XfemFracture* fracture, XfemElement* xe, GmCell* e, int index, GmMatrix ROT2, GmVector& fieldValue, GmMatrix& fieldDir, GmMatrix& Xg, GmVector& v_n, GmMatrix& planeCoord, QList<int>& crackNodeId) const;
80 //extend Crack Plane 3D
81 virtual bool testExtendCrackPlane3D(XfemMesh* xmesh, XfemFracture* fracture, XfemElement* xe, GmCell* e, int index, GmMatrix ROT2, GmVector& fieldValue, GmMatrix& fieldDir, GmMatrix& Xg, GmVector& v_n, GmMatrix& planeCoord, QList<int>& crackNodeId, bool & next) const;
82 //get stress or strain field according to propagation criteria and weight function
83 virtual bool stressStrainField(XfemMesh* xmesh, XfemFracture* fracture, GmVector& fieldValue, double& strength, bool isHead) const;
84 //average stress/strain field for uniform weight function
85 virtual bool weightFunction(XfemMesh* xmesh, XfemFracture* fracture, GmVector Xip, double& w, bool isHead) const;
86 //Allow to update crack geometry after propagation
87 virtual bool updateGeomEnrich(XfemMesh* xmesh) const;
88 //Allow to update crack geometry after propagation
89 virtual bool updateGeomEnrich3D(XfemMesh* xmesh) const;
90 //Allow to update crack geometry after propagation
91 virtual bool updateCrackData3D(XfemMesh* xmesh, GmMatrix& planeCoord, QList<GmVector> aCrack, int index, int iCr, QList<int>& crackNodeId, int& nodeIndex, GmVector& pathData, bool& next, QList<GmVector>& ghostList) const;
92 //treat propagation of fractures
93 virtual bool crackPropagation(XfemMesh* xmesh, XfemFracture* Fr, int index, int secondaryCrack, bool isHead, GmVector crackInfo, GmVector stress, GmVector B, QList<GmVector>& aCrack, int& nInterElem, bool& noCrossingNFReactivation) const;
94 //check if this crack segment cuts other crack to restrict propagation until this other crack is touched not crossed
95 virtual bool updateElmentIntersection(XfemMesh* xmesh, GmCell* e, XfemElement* xe, GmVector Xg, XfemEnrichedElementData* exData, QList<GmVector>& aCrack, int secondaryCrack) const;
96 //Get Crack propagation direction
97 virtual bool crackPropDirection(XfemMesh* xmesh, XfemElement* xe, GmVector stress, GmVector aPStress, int nPS, bool isHead, GmVector crackInfo, GmMatrix& XGhost, GmVector& uPs, int index, bool& noCrossingNFReactivation) const;
98 //update Crack Geometry coordinates
99 virtual bool updateCrackGeom(XfemMesh* xmesh, XfemFracture* fracture, int index, int iNodePath, GmVector B, GmVector Xhtcoord, GmVector& mElemCutPos) const;
100 //Update ghost nodes in Xmesh
101 virtual bool updateGhostNodes(XfemMesh* xmesh, XfemFracture* fracture, int nodeIndex, GmVector coord, GmVector pathData, int iCr) const;
102 //Update ghost nodes in Xmesh
103 virtual bool updateGhostNodes3D(XfemMesh* xmesh, int nodeIndex, QList<GmVector> aCrack, QList<GmVector>& ghostList, GmVector pathData, int iCr) const;
104 //Update subelements division in Xmesh
105 virtual bool updatesubElemDiv(XfemMesh* xmesh, QList<int> enrichList) const;
106 //Update subelements division in Xmesh
107 virtual bool updatesubElemDiv3D(XfemMesh* xmesh, QList<int> enrichList) const;
108 //treat propagation of a fracture in a cross type intersection
109 virtual bool crossTypeCrackProp(XfemMesh* xmesh, XfemFracture* fracture, GmVector crackInfo, GmVector B, QList<GmVector> aCrack, bool isHead, int& iCr, int& nCracks) const;
111 virtual bool setUpdateAssembler(XfemMesh* xmesh) const;
112 // update Enrichment Functions
113 virtual bool updateEnrichmentFunctions(XfemMesh* xmesh)const;
114 //upadate elemCutInfo based on the number of fractures
115 virtual bool upadateElemCutInfo(XfemMesh* xmesh, QList<int> enrichList) const;
116 // Define DOF sets for intersected fractures
117 virtual bool upadateDofSets(XfemMesh* xmesh) const;
118 //update Crack Front Data
119 bool updateCrackFrontData(XfemMesh * xmesh, QList<int> enrichList) const;
120 // set data for integration points for each subelement
121 virtual bool setInterEnrichedData(XfemMesh* xmesh, GmCell* e, int numRegularSubElements, int numFractureSubElements) const;
122};
123
124#endif
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
Basic class for a XFEM mesh. This is the basic mesh interface for xfem problems adding enrichment cap...
Definition xfemMesh.h:50
Definition xfemOptions.h:30
A simple class to represent a natural fracture.
Definition xfemPos.h:33
virtual bool setUpdateAssembler(XfemMesh *xmesh) const
returns TRUE, if at least one fracture is propagated
Definition xfemPos.cpp:213
virtual bool extendCrackPlane3D(XfemMesh *xmesh, XfemFracture *fracture, XfemElement *xe, GmCell *e, int index, GmMatrix ROT2, GmVector &fieldValue, GmMatrix &fieldDir, GmMatrix &Xg, GmVector &v_n, GmMatrix &planeCoord, QList< int > &crackNodeId) const
extend Crack Plane 3D
Definition xfemPos.cpp:4155
virtual bool nonLocalQuad(XfemMesh *xmesh, XfemFracture *fracture, QList< GmVector > &headIp, QList< GmVector > &tailIp, int idCrack) const
set region to check for nonLocal quadrangular polygon
Definition xfemPos.cpp:805
virtual bool crackPropagation(XfemMesh *xmesh, XfemFracture *Fr, int index, int secondaryCrack, bool isHead, GmVector crackInfo, GmVector stress, GmVector B, QList< GmVector > &aCrack, int &nInterElem, bool &noCrossingNFReactivation) const
treat propagation of fractures
Definition xfemPos.cpp:2123
virtual bool setRegionsToCheck3D(XfemMesh *xmesh) const
set regions to check fracture propagation
Definition xfemPos.cpp:332
virtual bool updateGeomEnrich(XfemMesh *xmesh) const
Allow to update crack geometry after propagation.
Definition xfemPos.cpp:982
virtual bool averageStressStrainField(XfemMesh *xmesh, XfemFracture *fracture, GmVector &fieldValue, double &strength, bool isHead) const
computes the average stress/strain field according to the defined propagation criteria and weight fun...
Definition xfemPos.cpp:3454
virtual bool crackPropDirection(XfemMesh *xmesh, XfemElement *xe, GmVector stress, GmVector aPStress, int nPS, bool isHead, GmVector crackInfo, GmMatrix &XGhost, GmVector &uPs, int index, bool &noCrossingNFReactivation) const
Get Crack propagation direction.
Definition xfemPos.cpp:1915
virtual bool updateGhostNodes3D(XfemMesh *xmesh, int nodeIndex, QList< GmVector > aCrack, QList< GmVector > &ghostList, GmVector pathData, int iCr) const
Update ghost nodes in Xmesh.
Definition xfemPos.cpp:4798
virtual bool testExtendCrackPlane3D(XfemMesh *xmesh, XfemFracture *fracture, XfemElement *xe, GmCell *e, int index, GmMatrix ROT2, GmVector &fieldValue, GmMatrix &fieldDir, GmMatrix &Xg, GmVector &v_n, GmMatrix &planeCoord, QList< int > &crackNodeId, bool &next) const
extend Crack Plane 3D
Definition xfemPos.cpp:4322
virtual bool updateCrackGeom(XfemMesh *xmesh, XfemFracture *fracture, int index, int iNodePath, GmVector B, GmVector Xhtcoord, GmVector &mElemCutPos) const
update Crack Geometry
Definition xfemPos.cpp:2025
virtual bool setInterEnrichedData(XfemMesh *xmesh, GmCell *e, int numRegularSubElements, int numFractureSubElements) const
set data for integration points for each subelement
Definition xfemPos.cpp:5209
virtual bool checkPropagation3D(XfemMesh *xmesh) const
check propagation of fractures in integration points inside a region around its front nodes
Definition xfemPos.cpp:2508
virtual bool checkPropagation(XfemMesh *xmesh) const
check propagation of fractures in integration points inside a region around both head and tail tips
Definition xfemPos.cpp:2447
virtual bool testAverageStressStrainField3D(XfemMesh *xmesh, XfemFracture *fracture, GmCell *e, int index, GmMatrix ROT2, GmVector &fieldValue, GmMatrix &fieldDir, bool &next) const
computes the average stress/strain field according to the defined propagation criteria
Definition xfemPos.cpp:3731
virtual bool testPropagation3D(XfemMesh *xmesh) const
check propagation of fractures in integration points inside a region around its front nodes
Definition xfemPos.cpp:2698
virtual bool updateGhostNodes(XfemMesh *xmesh, XfemFracture *fracture, int nodeIndex, GmVector coord, GmVector pathData, int iCr) const
Update ghost nodes in Xmesh.
Definition xfemPos.cpp:4752
virtual bool updateElmentIntersection(XfemMesh *xmesh, GmCell *e, XfemElement *xe, GmVector Xg, XfemEnrichedElementData *exData, QList< GmVector > &aCrack, int secondaryCrack) const
check if this crack segment cuts other crack to restrict propagation until this other crack is touche...
Definition xfemPos.cpp:2249
virtual bool stressStrainField(XfemMesh *xmesh, XfemFracture *fracture, GmVector &fieldValue, double &strength, bool isHead) const
computes stress/strain field according to the defined propagation criteria and weight function
Definition xfemPos.cpp:3324
bool setFrontToCheck3D(XfemMesh *xmesh) const
check fracture propagation at the crack front
Definition xfemPos.cpp:564
virtual bool checkCrackReactivation(XfemMesh *xmesh, GmVector crackPath, XfemEnrichedElementData *exData) const
Definition xfemPos.cpp:2933
virtual bool updateGeomEnrich3D(XfemMesh *xmesh) const
Allow to update crack geometry after propagation.
Definition xfemPos.cpp:1443
virtual bool polygonArea(GmMatrix Xnodes, double &S) const
get polygon Area
Definition xfemPos.cpp:956
virtual ~XfemPos()
Destructor.
Definition xfemPos.cpp:64
virtual bool createPolygon(XfemMesh *xmesh, GmVector Crk, GmMatrix &pCoords) const
get polygon coords
Definition xfemPos.cpp:903
virtual bool updatesubElemDiv3D(XfemMesh *xmesh, QList< int > enrichList) const
Update subelements division in Xmesh.
Definition xfemPos.cpp:5023
virtual bool upadateDofSets(XfemMesh *xmesh) const
upadate elemCutInfo based on the number of fractures
Definition xfemPos.cpp:5682
virtual bool averageUnitVectors3D(XfemMesh *xmesh, XfemFracture *fracture, int index, GmMatrix &ROT2) const
get average stress or strain field according to propagation criteria and weight function
Definition xfemPos.cpp:3883
XfemPos(XfemMesh *_xmesh, XfemOptions &xfemOptions, GmSimulationData *simulation, QVector< GmpFemPhysics * > &physics, const GmLogCategory &logger)
Constructor for a Xfem pos-processor used in Xfem process.
Definition xfemPos.cpp:57
virtual bool nonLocalCircle(XfemMesh *xmesh, XfemFracture *fracture, QList< GmVector > &headIp, QList< GmVector > &tailIp) const
set region to check for nonLocal semi circle
Definition xfemPos.cpp:867
virtual bool updatesubElemDiv(XfemMesh *xmesh, QList< int > enrichList) const
Update subelements division in Xmesh.
Definition xfemPos.cpp:4953
virtual bool averageStressStrainField3D(XfemMesh *xmesh, XfemFracture *fracture, int index, GmMatrix ROT2, GmVector &fieldValue, GmMatrix &fieldDir, bool &next) const
computes the average stress/strain field according to the defined propagation criteria
Definition xfemPos.cpp:3546
virtual bool checkFractureTips(XfemMesh *xmesh) const
check crack heads if it can propagate or it's at the boundary of the model
Definition xfemPos.cpp:72
virtual bool crossTypeCrackProp(XfemMesh *xmesh, XfemFracture *fracture, GmVector crackInfo, GmVector B, QList< GmVector > aCrack, bool isHead, int &iCr, int &nCracks) const
treat propagation of fracture in a cross type intersection
Definition xfemPos.cpp:5528
virtual bool updateEnrichmentFunctions(XfemMesh *xmesh) const
update Enrichment Functions
Definition xfemPos.cpp:5613
virtual bool updateCrackData3D(XfemMesh *xmesh, GmMatrix &planeCoord, QList< GmVector > aCrack, int index, int iCr, QList< int > &crackNodeId, int &nodeIndex, GmVector &pathData, bool &next, QList< GmVector > &ghostList) const
Update Crack Data 3D.
Definition xfemPos.cpp:1693
virtual bool noInitialCracks(XfemMesh *xmesh) const
Treatment for No inital cracks in the model.
Definition xfemPos.cpp:3036
virtual bool setRegionsToCheck(XfemMesh *xmesh) const
set regions to check fracture propagation
Definition xfemPos.cpp:240
virtual bool upadateElemCutInfo(XfemMesh *xmesh, QList< int > enrichList) const
upadate elemCutInfo based on the number of fractures
Definition xfemPos.cpp:5499
A simple class to provide xfem tools.
Definition xfemTools.h:40
arma::mat GmMatrix
arma::vec GmVector
Declaration of the xfemTools classes.