NeoPZ
TPZRefPatternTools.h
Go to the documentation of this file.
1 
6 #ifndef TPZREFPATTERNTOOLSH
7 #define TPZREFPATTERNTOOLSH
8 
9 /*
10  * TPZRefPatternTools.h
11  * Crack
12  *
13  * Created by Cesar Lucci on 10/03/10.
14  * Copyright 2010 LabMeC. All rights reserved.
15  */
16 
17 
18 #include <set>
19 
20 #include "pzgeoel.h"
21 #include "tpzintpoints.h"
22 
23 class TPZRefPattern;
29 {
30 
31 public:
32 
35 
41  static void GetCompatibleRefPatterns(TPZGeoEl *gel,
42  std::list<TPZAutoPointer<TPZRefPattern> > &refs);
43 
53  std::map<int, std::pair<TPZGeoEl *, std::map<int,int> > > &neighCorresp);
54 
62  TPZVec<int> &sidestorefine);
63 
70 
77 
78 
79  static void GenerateGMeshFromElementVec(const TPZVec<TPZGeoEl *> & elementVec, TPZGeoMesh & refGMesh);
80 
86  TPZVec<TPZGeoEl *> &elementVec);
87 
96  std::map<int, std::pair<TPZGeoEl *, std::map<int,int> > > &neighCorresp);
97 
108  TPZTransform<> &fromAtoB,
109  std::map<int, int> &pairNodes);
110 
123  TPZGeoMesh &meshB,
124  TPZTransform<> &fromAtoB,
125  std::map<int, int> &pairedNodes);
126 
137  TPZGeoMesh &meshB,
138  TPZTransform<> &fromAtoB,
139  std::map<int, int> &pairedNodes);
140 
146  static std::string BuildRefPatternModelName(TPZRefPattern &refp);
148  static std::string BuildRefPatternModelName(TPZGeoEl *gel);
149 
155  static bool SidesToRefine(TPZGeoEl *gel, TPZVec<int> &sidestoref);
156 
158  static void RefineDirectional(TPZGeoEl *gel, std::set<int> &matids);
159  static void RefineDirectional(TPZGeoEl *gel, std::set<int> &matids, int gelMat);
160 
161  static void RefineDirectional(TPZGeoMesh *gmesh, std::set<int> &matids);
162  static void RefineDirectional(TPZGeoMesh *gmesh, std::set<int> &matids, int gelmat);
163 
164 
165  static void RefineUniformIfNeighMat(TPZGeoEl *gel, std::set<int> &matids);
166 
168  static bool ConstJacobian(TPZGeoElSide gelside, REAL tol = 1.e-6);
169 
180  static void TransformationTest(TPZRefPattern * refp);
181 
186  static void NodesHunter(TPZGeoMesh &gMesh,
187  TPZVec<int>& NodesHunted,
188  int IdIni,
189  int IdFin,
190  double Tol = 1.E-1);
191 
196  static void GetGelPermutations(TPZGeoEl * gel,
197  TPZVec< TPZManVector<int,8> > &permutation);
198 
200  static void GetElTypePermutations(MElementType elType,
201  TPZVec< TPZManVector<int, 8> > &permutation);
202 };
203 
204 #endif
static void NodesHunter(TPZGeoMesh &gMesh, TPZVec< int > &NodesHunted, int IdIni, int IdFin, double Tol=1.E-1)
NodesHunted vector is the sequential nodesIds that belongs (i.e.: "Tol" far) to InitialNode(IdIni)~Fi...
Implements a vector class which allows to use external storage provided by the user. Utility.
Definition: pzquad.h:16
static std::string BuildRefPatternModelName(TPZRefPattern &refp)
Returns the the name of refpattern model.
Defines tools of pattern. Refine.
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
Definition: pzgeoelside.h:83
static void GenerateGMeshFromElementVec(const TPZVec< TPZGeoEl *> &elementVec, TPZGeoMesh &refGMesh)
static void GetCompatibleRefPatterns(TPZGeoEl *gel, std::list< TPZAutoPointer< TPZRefPattern > > &refs)
Search for refpatterns that could be used by a given element with respect to their neighbours...
static TPZAutoPointer< TPZRefPattern > GetRefPatternBasedOnRealMeshElements(TPZVec< TPZGeoEl *> &realMeshElementVec)
static void PairMeshesNodesMatchingCoordinates(TPZGeoMesh &meshA, TPZGeoMesh &meshB, TPZTransform<> &fromAtoB, std::map< int, int > &pairedNodes)
This method pair nodes from refA->mesh to refB->mesh, using the givem transformation from refA->mesh ...
static const double tol
Definition: pzgeoprism.cpp:23
static TPZAutoPointer< TPZRefPattern > DragModelPatNodes(TPZGeoEl *gel, TPZAutoPointer< TPZRefPattern > modelPat, std::map< int, std::pair< TPZGeoEl *, std::map< int, int > > > &neighCorresp)
Return an refpattern based on a gived one (modelPat), whose midnodes was dragged to match with a geoe...
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
static bool SidesToRefine(TPZGeoEl *gel, TPZVec< int > &sidestoref)
Returns if there is any neigbour already refined.
static void RefineUniformIfNeighMat(TPZGeoEl *gel, std::set< int > &matids)
static void GetElTypePermutations(MElementType elType, TPZVec< TPZManVector< int, 8 > > &permutation)
Fill the TPZVec "permutation" with the valid permutations of a given element type.
static bool ConstJacobian(TPZGeoElSide gelside, REAL tol=1.e-6)
Method to test if the jacobian of a TPZGeoElSide element is constant.
static void RefineDirectional(TPZGeoEl *gel, std::set< int > &matids)
Refines the element if it touches an element with a material id included in matids.
static TPZAutoPointer< TPZRefPattern > PerfectMatchRefPattern(TPZGeoEl *gel, TPZVec< int > &sidestorefine)
Returns the refpattern that matches the sides refinement intensity and midnodes coordinates with resp...
static void PairMeshesCornerNodesMatchingCoordinates(TPZGeoMesh &meshA, TPZGeoMesh &meshB, TPZTransform<> &fromAtoB, std::map< int, int > &pairedNodes)
This method pair CORNER nodes from refA->mesh.father to refB->mesh.father, using the givem transforma...
Defines the topology of the current refinement pattern to a mesh. Refine.
Definition: TPZRefPattern.h:77
static void GetGelPermutations(TPZGeoEl *gel, TPZVec< TPZManVector< int, 8 > > &permutation)
Fill the TPZVec "permutation" with the valid permutations of "gel".
This class implements a geometric mesh for the pz environment. Geometry.
Definition: pzgmesh.h:48
MElementType
Define the element types.
Definition: pzeltype.h:52
static void ModifyElementsBasedOnRefpFound(TPZAutoPointer< TPZRefPattern > &refpFound, TPZAutoPointer< TPZRefPattern > &refp, TPZVec< TPZGeoEl *> &elementVec)
static bool CompareTopologies(TPZAutoPointer< TPZRefPattern > refA, TPZAutoPointer< TPZRefPattern > refB, TPZTransform<> &fromAtoB, std::map< int, int > &pairNodes)
Returns if the given refPatterns (refA and refB) are topologicaly compatibles.
static void TransformationTest(TPZRefPattern *refp)
Algorithm that evaluates the veracity of the hashings between sides of the elements children and corr...
Contains the TPZIntPoints class which defines integration rules.
static TPZAutoPointer< TPZRefPattern > ModelRefPattern(TPZGeoEl *gel, std::map< int, std::pair< TPZGeoEl *, std::map< int, int > > > &neighCorresp)
Returns the refpattern that matches the sides refinement by neighbours.
Implements an affine transformation between points in parameter space. Topology Utility.
Definition: pzmganalysis.h:14