Xfem
The Xfem Plugin
xfemPre.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_PRE_H_
26 #define _GEMA_XFEM_PRE_H_
27 
28 #include <assert.h>
29 #include "xfemTools.h"
30 #include "xfemMesh.h"
31 #include "gmElementMesh.h"
32 #include "xfemGaussAccessor.h"
33 #include "gmDiscontinuitySet.h"
35 
37 class XfemPre: public XfemTools
38 {
39 public:
40  //XfemPre(XfemMesh* _xmesh, XfemOptions& xfemOptions, GmSimulationData* simulation, const QList<GmpFemPhysics*>& physics, GmLogCategory& logger);
41  XfemPre(XfemMesh* _xmesh, XfemOptions& xfemOptions, GmSimulationData* simulation, QList<GmpFemPhysics*>& physics, const GmLogCategory& logger);
42 
43  virtual ~XfemPre();
44 
46  //int numPoints() const { return _npoints; }
47 
49  int pointDimension() const { return _ndim; }
50  // Returns a crack paths for each fracture intersecting the elements
51  virtual bool linesToFracPath(XfemMesh* xmesh) const;
52  // Define initial enrichment of the mesh
53  virtual bool InitEnrichedMesh(XfemMesh* xmesh, QList<GmpFemPhysics*>& physics) const;
54  // Initialize the enrichment in an element
55  virtual bool InitializeEnrichedElement(XfemMesh* xmesh, GmCell* e, GmDiscontinuitySet* dset) const;
56  // Initialize the enrichment in an element
57  virtual bool Add2DGhostNodes(XfemMesh* xmesh, GmDiscontinuitySet* dset) const;
58  //Check and remove repeated values in the ghost nodes list
59  virtual bool checkAndRemoveRepeatedValuesGhostNodesLists(QList<GmVector>& ghostNodesCoord, QList<int>& ghostNodesIndex) const;
60  // Fill the 2D ghost nodes coordinate list
61  virtual bool fill2DGhostNodesCoordList(const GmDiscontinuitySet* dset, QList<GmVector>& ghostNodesCoord, QList<int>& ghostNodesIndex) const;
62  // Link the 2D ghost nodes to the elements
63  virtual bool link2DGhostNodesWithElements(XfemMesh* xmesh, const GmDiscontinuitySet* dset, QList<int>& ghostNodesIndex) const;
64  // Define initial enrichment
65  virtual bool GeomEnrich(XfemMesh* xmesh, QList<GmpFemPhysics*>& physics) const;
66  // return crack with material information
67  virtual bool CutCracksAndDefineElemMat(XfemMesh* xmesh)const;
68  // Define strong and weak fractures coordinates
69  virtual bool CutCracks(XfemMesh* xmesh)const;
70  // Define elements intersections information
71  virtual bool defElementIntersections(XfemMesh* xmesh, QList<GmpFemPhysics*>& physics)const;
72  // create gauss Attributes to store wetting fluid saturation for multiphasic analysis
73  virtual bool createGaussAttributes(XfemMesh* xmesh) const;
74  // fill Enrichment Functions
75  //virtual bool fillEnrichmentFunctions(XfemMesh* xmesh, GmValueAccessor* HNodeAcc, XfemGaussAccessor* HGaussAcc)const;
76  virtual bool fillEnrichmentFunctions(XfemMesh* xmesh)const;
77  //Add enrichment functions to adjacent elements to an intersection
78  virtual bool correctEnrichmentFunctions(XfemMesh* xmesh)const;
79  //check DOFs to adjacent elements to an intersection
80  virtual bool verifyDOF(XfemMesh* xmesh) const;
81  //create topological map
82  virtual bool topologicalMap(XfemMesh* xmesh) const;
83 
84 
85 //protected:
86  //GmValueAccessor* _HNodeAcc; //!< Node accessor
87  //XfemGaussAccessor* _HGaussAcc; //!< Sets enriched gauss accessor for stress
88  //const GmLogCategory& _logger; //!< The logger object used to emmit messages
89 
90 };
91 
92 #endif
virtual bool defElementIntersections(XfemMesh *xmesh, QList< GmpFemPhysics * > &physics) const
Define elements intersections information fill Vector with information about id of intersected fractu...
Definition: xfemPre.cpp:864
virtual bool linesToFracPath(XfemMesh *xmesh) const
Compute the intersection between the initial fractures and xfemMesh to find the additional nodes (so ...
Definition: xfemPre.cpp:80
virtual bool fillEnrichmentFunctions(XfemMesh *xmesh) const
fill Enrichment Functions
Definition: xfemPre.cpp:1556
virtual bool link2DGhostNodesWithElements(XfemMesh *xmesh, const GmDiscontinuitySet *dset, QList< int > &ghostNodesIndex) const
link the ghost nodes to the enriched elements
Definition: xfemPre.cpp:377
Definition: xfemOptions.h:29
virtual bool InitializeEnrichedElement(XfemMesh *xmesh, GmCell *e, GmDiscontinuitySet *dset) const
Set initial enrichment of a 2d cell.
Definition: xfemPre.cpp:177
virtual bool GeomEnrich(XfemMesh *xmesh, QList< GmpFemPhysics * > &physics) const
Set initial enrichment.
Definition: xfemPre.cpp:462
Basic class for a XFEM mesh. This is the basic mesh interface for xfem problems adding enrichment cap...
Definition: xfemMesh.h:49
Declaration of the XfemMesh class.
int pointDimension() const
Returns the number of points in the fracture definition.
Definition: xfemPre.h:49
virtual bool topologicalMap(XfemMesh *xmesh) const
create topological map for every node and element
Definition: xfemPre.cpp:621
Declaration of the XfemGaussAccessor class.
A simple class to represent a natural fracture.
Definition: xfemPre.h:37
virtual bool InitEnrichedMesh(XfemMesh *xmesh, QList< GmpFemPhysics * > &physics) const
Initialize the enriched mesh TODO: Generalize to 3D problems. The discontinuity set it is currently b...
Definition: xfemPre.cpp:115
virtual bool CutCracks(XfemMesh *xmesh) const
Define strong and weak fractures coordinates.
Definition: xfemPre.cpp:1405
virtual bool correctEnrichmentFunctions(XfemMesh *xmesh) const
Add enrichment functions to adjacent elements to an intersection.
Definition: xfemPre.cpp:1584
A simple class to provide xfem tools.
Definition: xfemTools.h:39
int _ndim
The dimension of each coordinate.
Definition: xfemTools.h:212
virtual bool CutCracksAndDefineElemMat(XfemMesh *xmesh) const
Define elements cut by each fracture and define element DOF sets.
Definition: xfemPre.cpp:829
virtual bool createGaussAttributes(XfemMesh *xmesh) const
create gauss Attributes to store wetting fluid saturation for multiphasic analysis
Definition: xfemPre.cpp:1506
virtual bool checkAndRemoveRepeatedValuesGhostNodesLists(QList< GmVector > &ghostNodesCoord, QList< int > &ghostNodesIndex) const
check and remove repeated values in the ghost nodes lists. When discontinuities intersect with each o...
Definition: xfemPre.cpp:306
virtual bool verifyDOF(XfemMesh *xmesh) const
Define elements cut by each fracture and define element DOF sets.
Definition: xfemPre.cpp:570
virtual ~XfemPre()
Destructor.
Definition: xfemPre.cpp:73
virtual bool Add2DGhostNodes(XfemMesh *xmesh, GmDiscontinuitySet *dset) const
Set initial enrichment of a 2d cell TODO: special treatment of the intersections.
Definition: xfemPre.cpp:217
Declaration of the xfemTools classes.
XfemPre(XfemMesh *_xmesh, XfemOptions &xfemOptions, GmSimulationData *simulation, QList< GmpFemPhysics * > &physics, const GmLogCategory &logger)
Constructor for a Xfem pre-processor used in Xfem process.
Definition: xfemPre.cpp:68