24 #ifndef _GEMA_XFEM_MESH_COPIER_H_ 25 #define _GEMA_XFEM_MESH_COPIER_H_ 55 bool copy(
bool splitFractures);
57 bool createMissingAttributes,
bool splitFractures);
61 bool createMissingAttributes,
bool splitFractures);
XfemSolver * _solver
The xfem solver, needed for interpolations.
Definition: xfemMeshCopier.h:168
QList< GmGaussAccessor * > _newGaussAcList
The set of Gauss accessors in the destination mesh.
Definition: xfemMeshCopier.h:178
QList< GmCellAccessor * > _cellAcList
The set of cell accessors in the source mesh.
Definition: xfemMeshCopier.h:175
bool splitMesh(const int *typeIndexMap)
Splits the destination mesh along fractures.
Definition: xfemMeshCopier.cpp:1125
bool setNodeData(const QList< NewNodesData > &newNodesList, bool updateGhostNodes)
Copy node coordinates & values from one mesh to the other. It also initializes values for newlly crea...
Definition: xfemMeshCopier.cpp:683
int _fractureIndex
If this edge is a fracture edge, stores the index in SplitNodeData._fractures of the fracture....
Definition: xfemMeshCopier.h:106
void fillInteractingCraksGaussLevelSets(const XfemElement *e, XfemEnrichedElementData *exData, int nEnrich, int nCracks, QList< double >crackIndex, QList< GmMatrix > &gaussLevelSet) const
computation of Additional enrichment fuctions for cracks intersection considering element nodes and i...
Definition: xfemMeshCopier.cpp:2655
bool setupElementAccessors(const QStringList &elementAttributes, bool createMissingAttributes)
Aux function to setupAccessors to grab/create if needed node data caessors.
Definition: xfemMeshCopier.cpp:412
virtual ~XfemMeshCopier()
Destructor.
Definition: xfemMeshCopier.cpp:71
void interpolateInternalNodeValue(const XfemElement *e, GmValueAccessor *ac, QList< GmValueAccessor * > eacList, const GmVector &naturalCoord, GmVector &result) const
Fills result with the interpolated value for the ac attribute on the given new splitted node.
Definition: xfemMeshCopier.cpp:2357
QList< SplitEdgeData > _edgeList
The list of edges in the new mesh that include this node as a vertex.
Definition: xfemMeshCopier.h:117
QPair< const XfemFracture *, int > FractureEdgeId
Type stroring a reference for a fracture segment.
Definition: xfemMeshCopier.h:98
void fillInteractingCraksNodalLevelSets(const XfemElement *e, XfemEnrichedElementData *exData, int nEnrich, int nCracks, QList< double >crackIndex, QList< GmMatrix > &nodalLevelSet) const
computation of Additional enrichment fuctions for cracks intersection considering element nodes and i...
Definition: xfemMeshCopier.cpp:2576
Type storing per node data for the splitting operation.
Definition: xfemMeshCopier.h:112
void fillEdgeList(int node, const QList< SubElementId > &elements, const QList< FractureEdgeId > &fractures, const QMap< SubElementId, int > &elementTranslationMap, QList< SplitEdgeData > &edges) const
Builds the list of incident edges to the given node, filling 'edges'.
Definition: xfemMeshCopier.cpp:1303
bool setupPropertyMap(QList< int > &psIndex)
Setup psIndex, an index storing for each property set in the destination mesh its index in the source...
Definition: xfemMeshCopier.cpp:596
bool buildSubElementNodeLists(QList< SubElementNodeData > &nodeDataList, QList< NewNodesData > &newNodesList)
Traverses sub-elements building a list with its nodes + any needed new nodes.
Definition: xfemMeshCopier.cpp:625
Aux structure to store coordinates for newly created nodes.
Definition: xfemMeshCopier.h:81
GmVector _naturalCoord
The node natural coordinate in the father reference.
Definition: xfemMeshCopier.h:84
void replaceElementNode(int node, int newNode, const QList< int > &elements)
Replaces node by newNode in the mesh node list of the given elements.
Definition: xfemMeshCopier.cpp:1427
QList< GmCellAccessor * > _newCellAcList
The set of cell accessors in the destination mesh.
Definition: xfemMeshCopier.h:176
int _elem
The father element for the new node.
Definition: xfemMeshCopier.h:83
Basic interface for an XFEM element.
Definition: xfemElement.h:43
QList< FractureEdgeId > _fractures
The list of src mesh fracture segments that are incident to this node.
Definition: xfemMeshCopier.h:115
Basic class for a XFEM mesh. This is the basic mesh interface for xfem problems adding enrichment cap...
Definition: xfemMesh.h:49
GmValueAccessor * _newCoordAc
The accessor used to get node coordinates in the destination mesh.
Definition: xfemMeshCopier.h:181
int _srcNode
The other node of the edge, different from 'n'.
Definition: xfemMeshCopier.h:103
void fillGaussLevelSetMatrix(GmMatrix X, GmMatrix Xg, GmMatrix &H) const
Compute levelset function (H) The minimum distance between a point(nodes or integration point) and a ...
Definition: xfemMeshCopier.cpp:2798
bool setupAccessors(const QStringList &nodeAttributes, const QStringList &elementAttributes, bool createMissingAttributes)
Grab needed accessors, filling the object accessor lists (_nodeAcList, newNodeAcList,...
Definition: xfemMeshCopier.cpp:301
int sortEdgeList(int node, QList< SplitEdgeData > &edges, int *lastEdge) const
Sorts the edge list according to CCW angles between adges and the first list fracture....
Definition: xfemMeshCopier.cpp:1344
QVector< int > _nodes
The sub-element node list.
Definition: xfemMeshCopier.h:75
void fillSplitInfoMaps(const int *typeIndexMap, QMap< int, SplitNodeData > &nodeInfo, QMap< SubElementId, int > &elementTranslationMap) const
Build info maps described in steps 1 & 2 for the splitMesh() function.
Definition: xfemMeshCopier.cpp:1238
XfemMeshCopier(const XfemMesh *srcMesh, GmElementMesh *newMesh, XfemSolver *solver, const GmLogCategory &logger)
Creates the mesh copier object. Copies will be made with calls to copy().
Definition: xfemMeshCopier.cpp:56
A simple class to represent a natural fracture.
Definition: xfemFracture.h:34
void addNodeInfo(QMap< int, SplitNodeData > &nodeInfo, QMap< SubElementId, int > &elementTranslationMap, const XfemFracture *f, int fractureSegment, const XfemElement *e, int node, int nodeEdge) const
Aux function used by fillSplitInfoMaps() to add information about a node in a fracture segment to the...
Definition: xfemMeshCopier.cpp:1505
bool _borderNode
Does this node belong to the mesh border?
Definition: xfemMeshCopier.h:114
bool copyAux(const QStringList &nodeAttributes, const QStringList &elementAttributes, bool createMissingAttributes, bool splitFractures)
Helper function for copy() to allow for easier mesh cleanup on errors.
Definition: xfemMeshCopier.cpp:161
QList< GmValueAccessor * > _newNodeAcList
The set of node accessors in the destination mesh.
Definition: xfemMeshCopier.h:174
QPair< int, int > SubElementId
Type storing an element Id + sub-element Id (or -1 for a whole element reference)
Definition: xfemMeshCopier.h:95
Extension of the FEM linear solver for the XFEM method.
Definition: xfemSolver.h:34
QList< GmGaussAccessor * > _gaussAcList
The set of Gauss accessors in the source mesh.
Definition: xfemMeshCopier.h:177
bool setElementData(const QList< SubElementNodeData > &nodeDataList, const QList< int > &psIndex, const int *typeIndexMap)
Copy node coordinates & values from one mesh to the other. It also initializes values for newlly crea...
Definition: xfemMeshCopier.cpp:993
QList< GmValueAccessor * > _nodeAcList
The set of node accessors in the source mesh.
Definition: xfemMeshCopier.h:171
int _subElem
The sub-element number.
Definition: xfemMeshCopier.h:74
Declaration of the XfemEnrichedElementData class.
int _inElementIndex
The element in the incoming side (_srcNode to 'n') in the element orientation. -1 if nonexistant....
Definition: xfemMeshCopier.h:104
void updateNodeAttributes(int srcNode, int newNode, const FractureEdgeId &fracture, const SubElementId *nodeElement, const SubElementId *otherElement)
Calculates and fills all node values associated with the given newNode.
Definition: xfemMeshCopier.cpp:1645
bool copy(bool splitFractures)
Overload of XfemMeshCopier::copy(const QStringList&, const QStringList&, bool) passing as first and s...
Definition: xfemMeshCopier.cpp:94
QList< QList< GmValueAccessor * > > _enrichedAcList
The set of corresponding enriched node accessors for each entrie in _nodeAcList (or NULL)
Definition: xfemMeshCopier.h:172
void addEdgeInfo(int node, int srcNode, bool incoming, int elemIndex, const QList< FractureEdgeId > &fractures, QList< SplitEdgeData > &edges) const
Aux function to add a new edge or update an exsting edge in the 'edges' list.
Definition: xfemMeshCopier.cpp:1457
const XfemMesh * _srcMesh
The source mesh storing the elements to be copied.
Definition: xfemMeshCopier.h:165
Aux structure to store a node list for each sub-element in the mesh.
Definition: xfemMeshCopier.h:71
const GmLogCategory & _logger
The logger used to produce error messages.
Definition: xfemMeshCopier.h:169
GmElementMesh * _newMesh
The empty destination mesh.
Definition: xfemMeshCopier.h:167
void fillNodalLevelSetMatrix(GmMatrix X, GmMatrix Xg, GmMatrix &H) const
Compute levelset function (H) The minimum distance between a point(nodes or integration point) and a ...
Definition: xfemMeshCopier.cpp:2739
void interpolateSplittedNodeValue(GmValueAccessor *ac, QList< GmValueAccessor * > eacList, int srcNode, int newNode, const FractureEdgeId &fracture, const SubElementId *nodeElement, const SubElementId *otherElement, GmVector &result) const
Calculates and fills all node values associated with the given newNode.
Definition: xfemMeshCopier.cpp:1796
QList< SubElementId > _elements
The list of src mesh elements/subelements that include this node in their geometry.
Definition: xfemMeshCopier.h:116
int _elem
The element number.
Definition: xfemMeshCopier.h:73
A class used to store per element data needed only in enriched elements.
Definition: xfemEnrichedElementData.h:37
bool setupNodeAccessors(const QStringList &nodeAttributes, bool createMissingAttributes)
Aux function to setupAccessors to grab/create if needed node data accessors.
Definition: xfemMeshCopier.cpp:332
bool setupEnrichedAccessors()
Setup enriched data acessors corresponding to node accessors.
Definition: xfemMeshCopier.cpp:509
Basic class for copying an XFEM mesh into an empty element mesh, transforming sub-elements into eleme...
Definition: xfemMeshCopier.h:48
int _outElementIndex
The element in the outgoing side ('n' to _srcNode) in the element orientation. -1 if nonexistant....
Definition: xfemMeshCopier.h:105
GmValueAccessor * _coordAc
The accessor used to get node coordinates in the source mesh.
Definition: xfemMeshCopier.h:180
const XfemElement * segmentInfo(const XfemFracture *f, int segment, int *n1, int *n2, int *e1=NULL, int *e2=NULL) const
Returns element, first node and second node information about the given fracture segment.
Definition: xfemMeshCopier.cpp:1581
Type storing data for an edge incident to a node 'n'.
Definition: xfemMeshCopier.h:101