NeoPZ
|
Defines tools of pattern. Refine. More...
#include <TPZRefPatternTools.h>
Public Member Functions | |
TPZRefPatternTools () | |
~TPZRefPatternTools () | |
Static Public Member Functions | |
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. More... | |
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. More... | |
static TPZAutoPointer< TPZRefPattern > | PerfectMatchRefPattern (TPZGeoEl *gel, TPZVec< int > &sidestorefine) |
Returns the refpattern that matches the sides refinement intensity and midnodes coordinates with respect to sidestorefine vector. More... | |
static TPZAutoPointer< TPZRefPattern > | PerfectMatchRefPattern (TPZGeoEl *gel) |
Returns the refpattern that matches the sides refinement intensity and midnodes coordinates with respect to sideNeighbours. More... | |
static TPZAutoPointer< TPZRefPattern > | GetRefPatternBasedOnRealMeshElements (TPZVec< TPZGeoEl *> &realMeshElementVec) |
static void | GenerateGMeshFromElementVec (const TPZVec< TPZGeoEl *> &elementVec, TPZGeoMesh &refGMesh) |
static void | ModifyElementsBasedOnRefpFound (TPZAutoPointer< TPZRefPattern > &refpFound, TPZAutoPointer< TPZRefPattern > &refp, TPZVec< TPZGeoEl *> &elementVec) |
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 geoel neighbourhood refinement. More... | |
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. More... | |
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 transformation from refA->mesh to refB->mesh to match coordinates. More... | |
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 to refB->mesh to match coordinates. More... | |
static std::string | BuildRefPatternModelName (TPZRefPattern &refp) |
Returns the the name of refpattern model. More... | |
static std::string | BuildRefPatternModelName (TPZAutoPointer< TPZRefPattern > refp) |
static std::string | BuildRefPatternModelName (TPZGeoEl *gel) |
static bool | SidesToRefine (TPZGeoEl *gel, TPZVec< int > &sidestoref) |
Returns if there is any neigbour already refined. More... | |
static void | RefineDirectional (TPZGeoEl *gel, std::set< int > &matids) |
Refines the element if it touches an element with a material id included in matids. More... | |
static void | RefineDirectional (TPZGeoEl *gel, std::set< int > &matids, int gelMat) |
static void | RefineDirectional (TPZGeoMesh *gmesh, std::set< int > &matids) |
static void | RefineDirectional (TPZGeoMesh *gmesh, std::set< int > &matids, int gelmat) |
static void | RefineUniformIfNeighMat (TPZGeoEl *gel, std::set< int > &matids) |
static bool | ConstJacobian (TPZGeoElSide gelside, REAL tol=1.e-6) |
Method to test if the jacobian of a TPZGeoElSide element is constant. More... | |
static void | TransformationTest (TPZRefPattern *refp) |
Algorithm that evaluates the veracity of the hashings between sides of the elements children and corresponding sides of the father. More... | |
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)~FinalNode(IdFin) alignment of gMesh.NodeVec() More... | |
static void | GetGelPermutations (TPZGeoEl *gel, TPZVec< TPZManVector< int, 8 > > &permutation) |
Fill the TPZVec "permutation" with the valid permutations of "gel". More... | |
static void | GetElTypePermutations (MElementType elType, TPZVec< TPZManVector< int, 8 > > &permutation) |
Fill the TPZVec "permutation" with the valid permutations of a given element type. More... | |
Defines tools of pattern. Refine.
Definition at line 28 of file TPZRefPatternTools.h.
TPZRefPatternTools::TPZRefPatternTools | ( | ) |
Definition at line 18 of file TPZRefPatternTools.cpp.
TPZRefPatternTools::~TPZRefPatternTools | ( | ) |
Definition at line 23 of file TPZRefPatternTools.cpp.
|
static |
Returns the the name of refpattern model.
To do this, it starts with the 3 initial characters of element nametype, followed by the quantity of midnodes for each side of element.
Definition at line 817 of file TPZRefPatternTools.cpp.
References TPZRefPattern::Element(), TPZRefPattern::fNonInitializedName, TPZGeoEl::NCornerNodes(), TPZRefPattern::NSideNodes(), TPZGeoEl::NSides(), and TPZGeoEl::TypeName().
Referenced by TPZRefPattern::BuildName().
|
static |
Definition at line 859 of file TPZRefPatternTools.cpp.
References TPZRefPattern::Element(), TPZRefPattern::fNonInitializedName, TPZGeoEl::NCornerNodes(), TPZRefPattern::NSideNodes(), TPZGeoEl::NSides(), and TPZGeoEl::TypeName().
|
static |
Definition at line 900 of file TPZRefPatternTools.cpp.
References DebugStop, TPZRefPattern::fNonInitializedName, TPZGeoEl::NSides(), SidesToRefine(), and TPZGeoEl::TypeName().
|
static |
Returns if the given refPatterns (refA and refB) are topologicaly compatibles.
refA | - input data: first refpattern to be compared |
refB | - input data: second refpattern to be compared |
fromAtoB | - input data: Linear Transformation from refA->RefPatternMesh to refB->RefPatternMesh() (its needed to pair Nodes correctly in permuted cases) |
pairNodes | - output data: correspondence between refA and refB nodes, in case they are topologicaly compatibles |
Definition at line 540 of file TPZRefPatternTools.cpp.
References DebugStop, TPZGeoElSide::Dimension(), TPZGeoMesh::ElementVec(), GetGelPermutations(), TPZGeoMesh::NElements(), TPZVec< T >::NElements(), TPZGeoMesh::NNodes(), TPZGeoEl::NNodes(), TPZGeoEl::NodeIndex(), TPZGeoEl::NSides(), TPZRefPattern::NSubElements(), TPZRefPattern::RefPatternMesh(), TPZVec< T >::Resize(), TPZGeoElSide::SideNodeIndex(), TPZVec< T >::size(), TPZGeoEl::Type(), and TPZRefPattern::Type().
|
static |
Method to test if the jacobian of a TPZGeoElSide element is constant.
Definition at line 1331 of file TPZRefPatternTools.cpp.
References TPZGeoEl::CreateSideIntegrationRule(), TPZGeoElSide::Dimension(), TPZGeoElSide::Element(), fabs, TPZGeoElSide::Jacobian(), Norm(), TPZIntPoints::NPoints(), TPZIntPoints::Point(), and TPZGeoElSide::Side().
|
static |
Return an refpattern based on a gived one (modelPat), whose midnodes was dragged to match with a geoel neighbourhood refinement.
gel | - input data: geometric element for which the model refpattern nodes will be dragged |
modelPat | - input data: Model RefPattern that is topologicaly compatible with neighbourhood |
neighCorresp | - input data: map that group (neighbour geoelement) and nodes correspondences between (neighbour->SideRefpattern) and (gel->SideRefpattern), indexed by (gel->Side) |
Definition at line 466 of file TPZRefPatternTools.cpp.
References TPZTransform< T >::Apply(), TPZRefPattern::ComputePartition(), TPZRefPattern::ComputeTransforms(), TPZGeoElSide::Element(), TPZRefPatternDataBase::FindRefPattern(), TPZRefPattern::GenerateSideRefPatterns(), TPZGeoEl::GetRefPattern(), gRefDBase, TPZRefPattern::InsertPermuted(), TPZRefPatternDataBase::InsertRefPattern(), TPZGeoElSide::Neighbour(), TPZGeoElSide::NeighbourSideTransform(), TPZGeoEl::NNodes(), TPZGeoMesh::NodeVec(), TPZGeoEl::NSides(), TPZRefPattern::RefPatternMesh(), TPZGeoElSide::Side(), TPZRefPattern::SideRefPattern(), and TPZGeoEl::SideToSideTransform().
Referenced by PerfectMatchRefPattern().
|
static |
Definition at line 280 of file TPZRefPatternTools.cpp.
References TPZGeoEl::ClonePatchEl(), DebugStop, TPZGeoMesh::ElementVec(), TPZGeoNode::GetCoordinates(), TPZGeoEl::Index(), TPZGeoEl::NCornerNodes(), TPZVec< T >::NElements(), TPZGeoMesh::NNodes(), TPZGeoEl::NodeIndex(), TPZGeoEl::NodePtr(), TPZGeoMesh::NodeVec(), and TPZAdmChunkVector< T, EXP >::Resize().
|
static |
Search for refpatterns that could be used by a given element with respect to their neighbours.
gel | - input data: geometric element for which the list of compatible refpatterns will be filled |
refs | - output data: list of compatible refpatterns with respect to their neighbours |
Definition at line 28 of file TPZRefPatternTools.cpp.
References DebugStop, TPZGeoElSide::Element(), TPZGeoEl::GetRefPattern(), gRefDBase, TPZGeoEl::HasSubElement(), TPZGeoEl::NCornerNodes(), TPZGeoElSide::Neighbour(), TPZGeoElSide::NeighbourSideTransform(), TPZGeoEl::NSides(), TPZGeoElSide::NSubElements(), TPZRefPatternDataBase::RefPatternList(), TPZGeoElSide::Side(), TPZRefPattern::SideRefPattern(), and TPZGeoEl::Type().
Referenced by TPZGeoElRefPattern< TGeo >::Divide(), and PerfectMatchRefPattern().
|
static |
Fill the TPZVec "permutation" with the valid permutations of a given element type.
Definition at line 1581 of file TPZRefPatternTools.cpp.
References DebugStop, ECube, EOned, EPiramide, EPrisma, EQuadrilateral, ETetraedro, and ETriangle.
|
static |
Fill the TPZVec "permutation" with the valid permutations of "gel".
Definition at line 1567 of file TPZRefPatternTools.cpp.
References TPZGeoEl::NodeIndex(), and TPZGeoEl::Type().
Referenced by CompareTopologies().
|
static |
This method receives an vector of real mesh elements (index0=FATHER , index1...=SONS) and returns the corresponding refinement pattern. ONCE THE REFPATTERN COULD PRESENT PERMUTATIONS OF SONS, THIS METHOD FIX THE TOPOLOGICAL SEQUENCE OF REAL MESH ELEMENTS. This implies the call BuildConnectivity() method after this whole operation (which should be done by the programmer).
Definition at line 258 of file TPZRefPatternTools.cpp.
References TPZRefPatternDataBase::FindRefPattern(), gRefDBase, and TPZRefPatternDataBase::InsertRefPattern().
|
static |
Returns the refpattern that matches the sides refinement by neighbours.
gel | - input data: geometric element for which the model refpattern will be returned |
neighCorresp | - output data: map that group (neighbour geoelement) and nodes correspondences between (neighbour->SideRefpattern) and (gel->SideRefpattern), indexed by (gel->Side) |
Definition at line 98 of file TPZRefPatternTools.cpp.
References TPZGeoElSide::Dimension(), TPZGeoElSide::Element(), TPZGeoEl::GetRefPattern(), gRefDBase, TPZGeoElSide::Neighbour(), TPZGeoElSide::NeighbourSideTransform(), TPZGeoEl::NNodes(), TPZGeoEl::NSides(), TPZGeoElSide::NSubElements(), TPZRefPatternDataBase::RefPatternList(), TPZGeoElSide::Side(), TPZRefPattern::SideRefPattern(), TPZGeoEl::SideToSideTransform(), and TPZGeoEl::Type().
Referenced by PerfectMatchRefPattern().
|
static |
A partir de um padrao encontrado, corrige a sequencia topologica dos elementos originais
Definition at line 317 of file TPZRefPatternTools.cpp.
References DebugStop, TPZGeoMesh::ElementVec(), TPZGeoMesh::FindNode(), TPZGeoMesh::NElements(), TPZVec< T >::NElements(), TPZGeoMesh::NNodes(), TPZGeoMesh::NodeVec(), TPZRefPattern::RefPatternMesh(), and TPZVec< T >::size().
|
static |
NodesHunted vector is the sequential nodesIds that belongs (i.e.: "Tol" far) to InitialNode(IdIni)~FinalNode(IdFin) alignment of gMesh.NodeVec()
Although this method considers coordinates in R3, Coord-Z must be constant for all nodes
i.e., nodes coordinates belong to XY parallel plane
Changing NodesCoords from Cartesian Notation to Vectorial Notation
with respect to IniNode coordinate
Changing VectorialNotation from Canonic Base to NewBase
Hunting Nodes
Definition at line 1473 of file TPZRefPatternTools.cpp.
References DebugStop, fabs, TPZFMatrix< TVar >::GetVal(), h, TPZChunkVector< T, EXP >::NElements(), TPZGeoMesh::NodeVec(), TPZFMatrix< TVar >::PutVal(), TPZManVector< T, NumExtAlloc >::Resize(), TPZVec< T >::Resize(), sqrt, and val().
|
static |
This method pair CORNER nodes from refA->mesh.father to refB->mesh.father, using the givem transformation from refA->mesh to refB->mesh to match coordinates.
meshA | - input data: mesh of first refpattern that will be considered its nodes coordinates |
meshB | - input data: mesh of second refpattern that will be considered its nodes coordinates |
fromAtoB | - input data: Linear Transformation from refA->mesh to refB->mesh (its needed to pair Nodes correctly in permuted cases) |
pairedNodes | - output data: correspondence between refA->mesh and refB->mesh nodes that matches its coordinates in fathers elements The output is the map pairNodes, thar represents the A_nodeId paired with B_nodeId. Obs.: Be careful with the output interpretation! It contains the nodeIds, NOT the nodes positions in mesh.NodeVec()!!! |
Definition at line 747 of file TPZRefPatternTools.cpp.
References TPZTransform< T >::Apply(), TPZGeoMesh::ElementVec(), fabs, and TPZGeoMesh::NodeVec().
|
static |
This method pair nodes from refA->mesh to refB->mesh, using the givem transformation from refA->mesh to refB->mesh to match coordinates.
meshA | - input data: mesh of first refpattern that will be considered its nodes coordinates |
meshB | - input data: mesh of second refpattern that will be considered its nodes coordinates |
fromAtoB | - input data: Linear Transformation from refA->mesh to refB->mesh (its needed to pair Nodes correctly in permuted cases) |
pairedNodes | - output data: correspondence between refA->mesh and refB->mesh nodes that matches its coordinates |
Definition at line 782 of file TPZRefPatternTools.cpp.
References TPZTransform< T >::Apply(), fabs, TPZGeoMesh::NNodes(), and TPZGeoMesh::NodeVec().
|
static |
Returns the refpattern that matches the sides refinement intensity and midnodes coordinates with respect to sidestorefine vector.
gel | - input data: geometric element for which the perfect match refpattern will be returned |
sidestorefine | - input data: vector filled with sides refinement intensity |
Definition at line 181 of file TPZRefPatternTools.cpp.
References DebugStop, TPZGeoEl::Dimension(), GetCompatibleRefPatterns(), TPZGeoEl::NCornerNodes(), TPZGeoEl::NSides(), and TPZRefPattern::NSubElements().
Referenced by TPZMHMeshControl::DivideSkeletonElements(), and RefineDirectional().
|
static |
Returns the refpattern that matches the sides refinement intensity and midnodes coordinates with respect to sideNeighbours.
gel | - input data: geometric element for which the perfect match refpatterns will be returned |
Definition at line 425 of file TPZRefPatternTools.cpp.
References DebugStop, DragModelPatNodes(), TPZGeoEl::Index(), TPZGeoEl::Mesh(), ModelRefPattern(), TPZVTKGeoMesh::PrintGMeshVTKneighbourhood(), and SidesToRefine().
|
static |
Refines the element if it touches an element with a material id included in matids.
Definition at line 989 of file TPZRefPatternTools.cpp.
References DebugStop, TPZGeoElSide::Dimension(), TPZGeoEl::Divide(), TPZGeoElSide::Element(), EQuadrilateral, ETetraedro, TPZRefPatternDataBase::FindRefPattern(), gRefDBase, TPZGeoEl::HasSubElement(), TPZGeoEl::Id(), TPZGeoEl::Index(), TPZGeoEl::MaterialId(), TPZGeoEl::NCornerNodes(), TPZGeoElSide::Neighbour(), TPZGeoEl::NSides(), PerfectMatchRefPattern(), TPZGeoEl::Print(), TPZGeoEl::SetRefPattern(), TPZGeoElSide::Side(), TPZGeoEl::SideDimension(), TPZGeoEl::SideNodeLocIndex(), TPZGeoEl::Type(), and TPZGeoEl::TypeName().
|
static |
Definition at line 1179 of file TPZRefPatternTools.cpp.
References TPZGeoEl::Divide(), TPZGeoElSide::Element(), TPZGeoEl::HasSubElement(), TPZGeoEl::Index(), TPZGeoEl::MaterialId(), TPZGeoEl::NCornerNodes(), TPZGeoElSide::Neighbour(), TPZGeoEl::NSides(), PerfectMatchRefPattern(), TPZGeoEl::Print(), TPZGeoEl::SetMaterialId(), TPZGeoEl::SetRefPattern(), TPZGeoElSide::Side(), TPZGeoEl::SideDimension(), TPZGeoEl::SideNodeLocIndex(), to_string(), TPZGeoEl::Type(), and TPZGeoEl::TypeName().
|
static |
Definition at line 1153 of file TPZRefPatternTools.cpp.
References TPZGeoMesh::Element(), and TPZGeoMesh::NElements().
|
static |
Definition at line 1165 of file TPZRefPatternTools.cpp.
References TPZGeoMesh::Element(), and TPZGeoMesh::NElements().
|
static |
Definition at line 1298 of file TPZRefPatternTools.cpp.
References TPZGeoEl::Divide(), TPZRefPatternDataBase::GetUniformRefPattern(), gRefDBase, TPZGeoElSide::LowestFatherSide(), TPZGeoElSide::Neighbour(), TPZGeoEl::NSides(), TPZGeoEl::SetRefPattern(), and TPZGeoEl::Type().
Returns if there is any neigbour already refined.
gel | - input data: geometric element whose refinements of the neighbors will define the refinement of its sides |
sidestoref | - output data: vector whose positions mention the sides of gel, and its contents mention the intensity of refinement of the respective side |
Definition at line 939 of file TPZRefPatternTools.cpp.
References DebugStop, TPZGeoElSide::Element(), TPZGeoElSide::Exists(), TPZGeoEl::GetRefPattern(), TPZGeoEl::HasSubElement(), TPZGeoEl::NCornerNodes(), TPZGeoElSide::Neighbour(), TPZVec< T >::NElements(), TPZGeoEl::NSides(), TPZGeoEl::NSideSubElements(), TPZRefPattern::Print(), TPZVec< T >::Resize(), TPZGeoElSide::Side(), TPZRefPattern::SideNodes(), and TPZRefPattern::SideRefPattern().
Referenced by BuildRefPatternModelName(), and PerfectMatchRefPattern().
|
static |
Algorithm that evaluates the veracity of the hashings between sides of the elements children and corresponding sides of the father.
A point p in the parametric space of the side of the sub-element is overcome and is calculated
it mentioned hashing getting pf point in the element father.
One calculates for p and pf the corresponding deformed point.
Itself the hashing is consistent the deformed point must the same be.
Definition at line 1367 of file TPZRefPatternTools.cpp.
References TPZTransform< T >::Apply(), TPZGeoEl::ComputeXInverse(), TPZGeoEl::CreateSideIntegrationRule(), DebugStop, TPZGeoEl::Dimension(), TPZRefPattern::Element(), TPZGeoEl::Id(), TPZRefPattern::IsFatherNeighbour(), TPZIntPoints::NPoints(), TPZGeoEl::NSides(), TPZRefPattern::NSubElements(), TPZIntPoints::Point(), PZError, TPZIntPoints::SetOrder(), TPZGeoEl::SideDimension(), TPZGeoEl::SideToSideTransform(), sqrt, TPZRefPattern::Transform(), TPZGeoEl::WhichSide(), TPZGeoEl::X(), and ZeroTolerance().