NeoPZ
|
Defines the topology of the current refinement pattern to a mesh. Refine. More...
#include <TPZRefPattern.h>
Classes | |
struct | SPZFatherSideInfo |
Data structure for storage of refinement information for a father's side. More... | |
class | TPZRefPatternPermute |
Auxiliar structure to permute nodes. More... | |
Public Member Functions | |
TPZRefPattern () | |
TPZRefPattern (std::istream &file) | |
Constructor whose argument is the name of the file with the definition of the refinement pattern. More... | |
TPZRefPattern (const std::string &file) | |
Constructor whose argument is a string containing the definition of the refinement pattern. More... | |
TPZRefPattern (const TPZRefPattern ©) | |
Copy constructor. More... | |
TPZRefPattern (TPZGeoMesh &gmesh) | |
TPZRefPattern (const TPZRefPattern ©, const TPZPermutation &permute) | |
Create a copy of the TPZRefPattern applying the permutation on the first element. More... | |
int | operator== (const TPZAutoPointer< TPZRefPattern > compare) const |
virtual | ~TPZRefPattern ()=default |
void | PrintMore (std::ostream &out=std::cout) const |
void | ShortPrint (std::ostream &out=std::cout) const |
void | Print (std::ostream &out=std::cout) const |
Prints the useful information of a Refinement Pattern in a ostream file. More... | |
void | PrintVTK (std::ofstream &file, bool matColor=false) const |
void | ExportPattern (std::ostream &out) const |
void | WritePattern (std::ofstream &out) const |
int | ClassId () const override |
Define the class id associated with the class. More... | |
void | Read (TPZStream &buf, void *context) override |
read objects from the stream More... | |
void | Write (TPZStream &buf, int withclassid) const override |
Writes this object to the TPZStream buffer. Include the classid if withclassid = true. More... | |
int | NSubElements () const |
int | FatherSide (int side, int sub) const |
Returns the father side associated with a given side of a certain sub element. More... | |
int | NSideSubGeoElSides (int fatherSide) const |
Returns the number of TPZGeoElSides associated with a father's side. More... | |
void | SideSubGeoElSide (int fatherSide, int subElPos, TPZGeoElSide &subGeoEl) const |
Gives information about the ith subelement contained in a given father's side. More... | |
TPZTransform | Transform (int subElSide, int sub) |
It returns the TPZTransform associated with a certain sub-element's side to the father's coordinates. More... | |
void | SideNodes (int fatherSide, TPZVec< int > &vecNodes) |
It returns a TPZVec containing the nodes contained in a given father's side. More... | |
int | NSideNodes (int fatherSide) const |
Returns the number of internal nodes of side. More... | |
int | NNodes () const |
Returns the number of nodes of the mesh. More... | |
bool | IsFatherNeighbour (TPZGeoElSide fatherSide, TPZGeoEl *son) const |
Verifies the neighbouring relationship between a son and a father's side. More... | |
TPZGeoEl * | Element (int iel) |
It returns the element number iel from the stack of elements of the geometric mesh. More... | |
void | InternalNodesIndexes (int side, TPZVec< TPZGeoElSideIndex > &nodeIndexes) |
void | InternalSidesIndexes (int side, TPZVec< TPZGeoElSideIndex > &sideIndexes) |
Fill a vector with TPZGeoElSideIndex_s with respect to internal subelements of a given side. More... | |
int | Id () const |
Return the id of the refinement pattern. More... | |
bool | IdInitialized () |
void | SetId (int id) |
Set the id of the refinement pattern. More... | |
bool | NameInitialized () |
void | SetName (std::string name) |
Sets the name associated with the refinement pattern. More... | |
std::string | Name () |
Returns the refinement pattern identifier. More... | |
int | SidePartition (TPZVec< TPZGeoElSide > &gelvec, int side) |
It returns a stack from sub-elements and its sides. This stack partitions side of the element father. More... | |
void | CreateNewNodes (TPZGeoEl *gel, TPZVec< int64_t > &newnodeindexes) |
This method is used to create / identify the nodes of the refined elements. More... | |
void | CreateMidSideNodes (TPZGeoEl *gel, int side, TPZVec< int64_t > &newnodeindexes) |
This method is used to create / identify the midside nodes for element elindex in its division process. More... | |
TPZAutoPointer< TPZRefPattern > | SideRefPattern (int side) |
void | GenerateSideRefPatterns () |
Generate the refinement patterns associated with the sides of the father element. More... | |
void | InsertPermuted () |
Generate all permuted partitions and insert them in the mesh. More... | |
TPZAutoPointer< TPZRefPattern > | SideRefPattern (int side, TPZTransform<> &trans) |
Find the side refinement pattern corresponding to the parameter transformation. More... | |
TPZAutoPointer< TPZRefPattern > | FindRefPattern (TPZTransform<> &trans) |
TPZGeoMesh & | RefPatternMesh () |
MElementType | Type () |
Public Member Functions inherited from TPZSavable | |
TPZSavable () | |
virtual | ~TPZSavable () |
virtual std::list< std::map< std::string, uint64_t > > | VersionHistory () const |
virtual std::pair< std::string, uint64_t > | Version () const |
virtual bool | Compare (TPZSavable *copy, bool override=false) |
Compares the object for identity with the object pointed to, eventually copy the object. More... | |
virtual bool | Compare (TPZSavable *copy, bool override=false) const |
Compares the object for identity with the object pointed to, eventually copy the object. More... | |
Public Member Functions inherited from TPZRegisterClassId | |
template<typename T > | |
TPZRegisterClassId (int(T::*)() const) | |
TPZRegisterClassId ()=default | |
Protected Member Functions | |
int | FindSubEl (TPZGeoEl *) const |
bool | CheckSideConsistency (const int fatherSide) const |
bool | CheckSideAndSubElConsistency (const int fatherSide, const int subEl) const |
void | SetRefPatternMeshToMasterDomain () |
Sets the RefPatternMesh in (x,y,z)_coordinates to (qsi,eta,zeta)_coordinates, always respecting the R3 dimension. More... | |
void | GeneratePermutations (TPZGeoEl *gel) |
Automatically generate all permuted numberings for the father element of RefPatternMesh. More... | |
void | ComputeTransforms () |
Calculates the transforms between the parametric coordinates of the sides of the son to the father's coords. More... | |
void | ComputePartition () |
It computers the partition of the sides of the father element using the sides of the children. More... | |
void | BuildSideMesh (int side, TPZGeoMesh &SideRefPatternMesh) |
Build a geometric mesh associated with the side of the refinement pattern. More... | |
void | BuildName () |
void | PermuteMesh (const TPZPermutation &permute) |
Copy the mesh structure applying the permutation on the nodenumbers of the first element. More... | |
void | ReadAndCreateRefinementPattern (std::istream &file) |
void | CreateRefinementPattern () |
TPZTransform | ComputeParamTransform (TPZGeoEl *geoElFrom, TPZGeoEl *geoElTo, int sideFrom, int sideTo) |
Protected Attributes | |
TPZVec< TPZVec< std::pair< int, TPZTransform< REAL > > > > | fSubElSideInfo |
Data structure with sub element info. More... | |
TPZVec< SPZFatherSideInfo > | fFatherSideInfo |
Data structure for storage of refinement information for each father's side fFatherSideInfo[i] will contain a tuple made of three entities, stored in SPZFatherSideInfo. More... | |
std::string | fName |
int | fId |
id of the refinement pattern More... | |
TPZVec< int > | fSideRefPattern |
Refinement for elements associated with a certain side of the current element. Usually, this is used for boundary/interface elements. More... | |
TPZVec< int > | fPermutedRefPatterns |
Vector containing refinement patterns for each permutation of the master element. More... | |
TPZGeoMesh | fRefPatternMesh |
Geometric mesh which defines the topology of the current refinement pattern. More... | |
int | fNSubEl |
Number of subelements. Must be available before the mesh is generated. More... | |
Static Protected Attributes | |
static const int | fNonInitializedId |
Id for identifying a non initialized pattern. More... | |
static const std::string | fNonInitializedName |
Name for identifying a non initialized pattern. More... | |
static std::map< MElementType, std::list< TPZRefPatternPermute > > | fPermutations |
Map of all valid permutations. More... | |
Friends | |
class | TPZRefPatternDataBase |
class | TPZRefPatternTools |
Additional Inherited Members | |
Static Public Member Functions inherited from TPZSavable | |
static std::set< TPZRestoreClassBase * > & | RestoreClassSet () |
This static function guarantees that the gMap object is available when needed. More... | |
static std::map< int, TPZRestore_t > & | ClassIdMap () |
This static function guarantees that the gMap object is available when needed. More... | |
static std::pair< std::string, uint64_t > | NeoPZVersion () |
static void | Register (TPZRestoreClassBase *restore) |
static void | RegisterClassId (int classid, TPZRestore_t fun) |
static TPZSavable * | CreateInstance (const int &classId) |
Defines the topology of the current refinement pattern to a mesh. Refine.
***************************************** !!! @@ READ ME @@ !!! *****************************************
The archive to be imported (of an Refinement Pattern) reffers to an geoMesh that contains the father element and its sub-elements. Its format data is the following one:
begin of file ....................................
//block 1 int(nNodes) int(nElements) int(Id) string(refName)
//block 2 - [the line above repeat for each node] double(nodeCoordinates)
//block 3 - [the line above repeat for each element] int(elType) int(matId) int(topologySequence)
................................................................. end of file
Obs.:
***************************************** !!! @@ THANKS @@ !!! *****************************************
Definition at line 77 of file TPZRefPattern.h.
TPZRefPattern::TPZRefPattern | ( | ) |
Definition at line 39 of file TPZRefPattern.cpp.
Referenced by FindRefPattern(), GenerateSideRefPatterns(), and InsertPermuted().
TPZRefPattern::TPZRefPattern | ( | std::istream & | file | ) |
Constructor whose argument is the name of the file with the definition of the refinement pattern.
Definition at line 73 of file TPZRefPattern.cpp.
References ReadAndCreateRefinementPattern().
TPZRefPattern::TPZRefPattern | ( | const std::string & | file | ) |
Constructor whose argument is a string containing the definition of the refinement pattern.
Definition at line 78 of file TPZRefPattern.cpp.
References input, and ReadAndCreateRefinementPattern().
TPZRefPattern::TPZRefPattern | ( | const TPZRefPattern & | copy | ) |
Copy constructor.
Definition at line 44 of file TPZRefPattern.cpp.
References fFatherSideInfo, fId, fName, fNSubEl, fPermutedRefPatterns, fRefPatternMesh, fSideRefPattern, and fSubElSideInfo.
|
explicit |
Create a refinement pattern based on a geometrical mesh. The first element is expected to be the father element, and the remaining elements should describe a partition of the father element.
gmesh |
Definition at line 68 of file TPZRefPattern.cpp.
References CreateRefinementPattern(), and fRefPatternMesh.
TPZRefPattern::TPZRefPattern | ( | const TPZRefPattern & | copy, |
const TPZPermutation & | permute | ||
) |
Create a copy of the TPZRefPattern applying the permutation on the first element.
calcula as transformacoes entre filhos e pai
efetua a particao do elemento pai de acordo com os lados dos sub-elementos
Definition at line 55 of file TPZRefPattern.cpp.
References ComputePartition(), ComputeTransforms(), fNSubEl, GenerateSideRefPatterns(), PermuteMesh(), and SetRefPatternMeshToMasterDomain().
|
virtualdefault |
|
protected |
Definition at line 1122 of file TPZRefPattern.cpp.
References TPZRefPatternTools::BuildRefPatternModelName(), and fName.
Referenced by GenerateSideRefPatterns(), and InsertPermuted().
|
protected |
Build a geometric mesh associated with the side of the refinement pattern.
Definition at line 1055 of file TPZRefPattern.cpp.
References TPZGeoMesh::BuildConnectivity(), TPZGeoMesh::CreateGeoElement(), TPZGeoEl::Dimension(), TPZGeoMesh::ElementVec(), fRefPatternMesh, TPZGeoEl::LowerDimensionSides(), TPZGeoEl::MaterialId(), TPZVec< T >::NElements(), TPZChunkVector< T, EXP >::NElements(), TPZGeoMesh::NodeVec(), TPZGeoEl::NSideNodes(), NSideNodes(), nsub, TPZStack< T, NumExtAlloc >::Push(), TPZAdmChunkVector< T, EXP >::Resize(), TPZManVector< T, NumExtAlloc >::Resize(), TPZGeoEl::SetFather(), TPZGeoEl::SideNodeIndex(), SideNodes(), SidePartition(), and TPZGeoEl::Type().
Referenced by GenerateSideRefPatterns().
|
protected |
This simple method checks both if the side is valid, and if the sub-element exists
fatherSide | side |
subEl | sub-el |
Definition at line 1042 of file TPZRefPattern.cpp.
References TPZGeoMesh::ElementVec(), fRefPatternMesh, NSideSubGeoElSides(), and PZError.
Referenced by SideSubGeoElSide().
|
protected |
This simple method just checks if the side exists in the father element
fatherSide | side |
Definition at line 1031 of file TPZRefPattern.cpp.
References TPZGeoMesh::ElementVec(), fRefPatternMesh, and PZError.
Referenced by InternalNodesIndexes(), InternalSidesIndexes(), NSideNodes(), NSideSubGeoElSides(), SideNodes(), and SidePartition().
|
overridevirtual |
Define the class id associated with the class.
This id has to be unique for all classes A non unique id is flagged at the startup of the program
Implements TPZSavable.
Definition at line 368 of file TPZRefPattern.cpp.
References Hash().
Referenced by TPZRefPattern::TPZRefPatternPermute::operator=().
|
protected |
This method computes the transformation between the parametric coordinates of one element to another's. In order to work properly, the elements should be related either by a father/son relationship or by a permutation
geoElFrom | element from which the transformation will be applied |
geoElTo | element to which the transformation corresponds |
sideFrom | side of the from element |
sideTo | side of the to element |
There is no transformation defined to the element's nodes
basta repassar sendo ik>ij
Definition at line 1212 of file TPZRefPattern.cpp.
References TPZTransform< T >::Apply(), TPZGeoEl::CreateSideIntegrationRule(), DebugStop, TPZGeoEl::Dimension(), ELU, TPZIntPoints::NPoints(), TPZGeoEl::NSides(), TPZIntPoints::Point(), PZError, TPZTransform< T >::SetMatrix(), TPZIntPoints::SetOrder(), TPZGeoEl::SideDimension(), TPZGeoEl::SideToSideTransform(), TPZMatrix< TVar >::SolveDirect(), TPZGeoEl::X(), and ZeroTolerance().
Referenced by ComputeTransforms(), and GeneratePermutations().
|
protected |
It computers the partition of the sides of the father element using the sides of the children.
elemento pai da divisco
Definition at line 949 of file TPZRefPattern.cpp.
References TPZGeoElSide::Element(), Element(), FatherSide(), fFatherSideInfo, TPZGeoEl::Id(), TPZGeoElSide::Neighbour(), TPZGeoEl::NodeIndex(), TPZGeoEl::NSideNodes(), TPZGeoEl::NSides(), NSubElements(), TPZStack< T, NumExtAlloc >::push_back(), TPZGeoEl::SideDimension(), TPZGeoEl::SideNodeIndex(), and TPZVec< T >::size().
Referenced by CreateRefinementPattern(), TPZRefPatternTools::DragModelPatNodes(), GenerateSideRefPatterns(), and TPZRefPattern().
|
protected |
Calculates the transforms between the parametric coordinates of the sides of the son to the father's coords.
total filhos
percorre todos os lados do elemento filho
lado do pai contendo o lado do filho
Definition at line 913 of file TPZRefPattern.cpp.
References TPZGeoEl::CenterPoint(), ComputeParamTransform(), DebugStop, TPZGeoEl::Dimension(), TPZGeoMesh::Element(), Element(), fRefPatternMesh, fSubElSideInfo, TPZGeoMesh::NElements(), TPZGeoEl::NSides(), PZError, TPZVec< T >::Resize(), TPZGeoEl::WhichSide(), TPZGeoEl::X(), and ZeroTolerance().
Referenced by CreateRefinementPattern(), TPZRefPatternTools::DragModelPatNodes(), GenerateSideRefPatterns(), and TPZRefPattern().
void TPZRefPattern::CreateMidSideNodes | ( | TPZGeoEl * | gel, |
int | side, | ||
TPZVec< int64_t > & | newnodeindexes | ||
) |
This method is used to create / identify the midside nodes for element elindex in its division process.
gel | - pointer to the element which is being divided. It is ALWAYS assumed to be the father element. |
side | - Side along which the nodes will be identified/created |
newnodeindexes | - return all midside node indexes for the element division. The method verify if the nodes are already created by the self element or by some neighbour. |
Definition at line 591 of file TPZRefPattern.cpp.
References TPZAdmChunkVector< T, EXP >::AllocateNewElement(), DebugStop, TPZGeoEl::Dimension(), Element(), fRefPatternMesh, LOGPZ_ERROR, TPZGeoEl::Mesh(), TPZGeoElSide::Neighbour(), TPZVec< T >::NElements(), TPZGeoMesh::NodeVec(), TPZGeoEl::Print(), SideNodes(), and TPZGeoEl::X().
Referenced by CreateNewNodes(), and NameInitialized().
This method is used to create / identify the nodes of the refined elements.
The method verify if the nodes are already created by the self element or by some neighbour.
gel | - pointer to the element which is being divided. It is ALWAYS assumed to be the father element. |
newnodeindexes | - return all midside node indexes for the element division. |
Definition at line 573 of file TPZRefPattern.cpp.
References CreateMidSideNodes(), fRefPatternMesh, TPZGeoEl::HasSubElement(), TPZGeoEl::NCornerNodes(), TPZGeoMesh::NNodes(), TPZGeoEl::NSides(), and TPZVec< T >::Resize().
Referenced by TPZGeoElRefPattern< TGeo >::Divide(), and NameInitialized().
|
protected |
Creates a refinement pattern based on the data structure geometrical mesh
gmesh |
Definition at line 1189 of file TPZRefPattern.cpp.
References TPZGeoMesh::BuildConnectivity(), ComputePartition(), ComputeTransforms(), TPZGeoMesh::Element(), fNSubEl, fRefPatternMesh, GeneratePermutations(), GenerateSideRefPatterns(), TPZGeoMesh::NElements(), TPZGeoEl::SetFather(), TPZGeoEl::SetFatherIndex(), SetRefPatternMeshToMasterDomain(), and TPZGeoEl::Type().
Referenced by ReadAndCreateRefinementPattern(), and TPZRefPattern().
TPZGeoEl * TPZRefPattern::Element | ( | int | iel | ) |
It returns the element number iel from the stack of elements of the geometric mesh.
Definition at line 515 of file TPZRefPattern.cpp.
References DebugStop, TPZGeoMesh::ElementVec(), fRefPatternMesh, NSubElements(), and PZError.
Referenced by TPZRefPatternTools::BuildRefPatternModelName(), TPZGeoEl::CheckSubelDataStructure(), ComputePartition(), ComputeTransforms(), CreateMidSideNodes(), TPZGeoElRefPattern< TGeo >::Divide(), TPZGeoElRefPattern< TGeo >::GetSubElements2(), TPZRefPatternDataBase::InsertRefPattern(), TPZRefPatternDataBase::ReadRefPatternDBase(), Transform(), TPZRefPatternTools::TransformationTest(), and Type().
void TPZRefPattern::ExportPattern | ( | std::ostream & | out | ) | const |
Exports refpattern in the same format it is expected to be read in the future.
out | ostream in which the ref pattern will be written |
Definition at line 319 of file TPZRefPattern.cpp.
References TPZGeoMesh::ElementVec(), fId, fName, fRefPatternMesh, TPZGeoMesh::NElements(), TPZGeoMesh::NNodes(), and TPZGeoMesh::NodeVec().
Referenced by WritePattern().
int TPZRefPattern::FatherSide | ( | int | side, |
int | sub | ||
) | const |
Returns the father side associated with a given side of a certain sub element.
side | side of the sub element |
sub | index of the sub element |
Definition at line 433 of file TPZRefPattern.cpp.
References DebugStop, TPZGeoMesh::ElementVec(), fRefPatternMesh, fSubElSideInfo, NSubElements(), and PZError.
Referenced by ComputePartition(), and TPZGeoElRefPattern< TGeo >::FatherSide().
TPZAutoPointer< TPZRefPattern > TPZRefPattern::FindRefPattern | ( | TPZTransform<> & | trans | ) |
Definition at line 789 of file TPZRefPattern.cpp.
References TPZTransform< T >::CompareTransform(), TPZGeoMesh::ElementVec(), TPZRefPatternDataBase::FindRefPattern(), fPermutations, TPZRefPattern::TPZRefPatternPermute::fPermute, fRefPatternMesh, TPZRefPattern::TPZRefPatternPermute::fTransform, gRefDBase, TPZChunkVector< T, EXP >::NElements(), tmp, pzgeom::tol, and TPZRefPattern().
Referenced by SideRefPattern().
|
protected |
Given a certain geometric element corresponding to a sub-element, this method will return its index
Definition at line 1016 of file TPZRefPattern.cpp.
References DebugStop, TPZGeoMesh::ElementVec(), fRefPatternMesh, NSubElements(), and PZError.
Referenced by Print().
|
protected |
Automatically generate all permuted numberings for the father element of RefPatternMesh.
Definition at line 847 of file TPZRefPattern.cpp.
References ComputeParamTransform(), TPZGeoMesh::CreateGeoElement(), TPZGeoEl::Dimension(), fPermutations, TPZRefPattern::TPZRefPatternPermute::fPermute, TPZRefPattern::TPZRefPatternPermute::fTransform, TPZGeoEl::GetPermutation(), TPZPermutation::IsFirst(), TPZGeoEl::MaterialId(), TPZGeoEl::Mesh(), TPZGeoEl::NNodes(), TPZGeoEl::NodeIndex(), TPZGeoMesh::NodeVec(), TPZGeoEl::NPermutations(), TPZGeoEl::NSides(), TPZPermutation::Permute(), PZError, TPZAdmChunkVector< T, EXP >::Resize(), and TPZGeoEl::Type().
Referenced by CreateRefinementPattern(), and InsertPermuted().
void TPZRefPattern::GenerateSideRefPatterns | ( | ) |
Generate the refinement patterns associated with the sides of the father element.
calcula as transformacoes entre filhos e pai
efetua a particao do elemento pai de acordo com os lados dos
Definition at line 679 of file TPZRefPattern.cpp.
References BuildName(), BuildSideMesh(), ComputePartition(), ComputeTransforms(), TPZGeoMesh::ElementVec(), TPZVec< T >::Fill(), TPZRefPatternDataBase::FindRefPattern(), fNSubEl, fRefPatternMesh, fSideRefPattern, GenerateSideRefPatterns(), gRefDBase, Id(), InsertPermuted(), TPZRefPatternDataBase::InsertRefPattern(), NameInitialized(), TPZGeoMesh::NElements(), TPZChunkVector< T, EXP >::NElements(), TPZGeoEl::NSides(), NSideSubGeoElSides(), TPZVec< T >::Resize(), SetRefPatternMeshToMasterDomain(), TPZGeoEl::SideDimension(), and TPZRefPattern().
Referenced by CreateRefinementPattern(), TPZRefPatternTools::DragModelPatNodes(), GenerateSideRefPatterns(), InsertPermuted(), NameInitialized(), and TPZRefPattern().
|
inline |
Return the id of the refinement pattern.
Definition at line 410 of file TPZRefPattern.h.
Referenced by GenerateSideRefPatterns(), InsertPermuted(), TPZRefPatternDataBase::InsertRefPattern(), and TPZRefPatternDataBase::ReadRefPatternDBase().
|
inline |
Check if the refinement pattern has an initiatlized Id
Definition at line 418 of file TPZRefPattern.h.
Referenced by TPZRefPatternDataBase::InsertRefPattern().
void TPZRefPattern::InsertPermuted | ( | ) |
Generate all permuted partitions and insert them in the mesh.
Definition at line 730 of file TPZRefPattern.cpp.
References BuildName(), TPZGeoMesh::ElementVec(), TPZRefPatternDataBase::FindRefPattern(), fPermutations, fPermutedRefPatterns, fRefPatternMesh, GeneratePermutations(), GenerateSideRefPatterns(), gRefDBase, Id(), TPZRefPatternDataBase::InsertRefPattern(), LOGPZ_DEBUG, NameInitialized(), TPZChunkVector< T, EXP >::NElements(), Print(), TPZVec< T >::resize(), TPZRefPattern(), and TPZGeoEl::Type().
Referenced by TPZRefPatternTools::DragModelPatNodes(), GenerateSideRefPatterns(), TPZRefPatternDataBase::ImportRefPatterns(), TPZRefPatternDataBase::InitializeUniformRefPattern(), and NameInitialized().
void TPZRefPattern::InternalNodesIndexes | ( | int | side, |
TPZVec< TPZGeoElSideIndex > & | nodeIndexes | ||
) |
Definition at line 524 of file TPZRefPattern.cpp.
References CheckSideConsistency(), DebugStop, fFatherSideInfo, NSideNodes(), and TPZVec< T >::Resize().
Referenced by TPZGeoElRefPattern< TGeo >::MidSideNodeIndices().
void TPZRefPattern::InternalSidesIndexes | ( | int | side, |
TPZVec< TPZGeoElSideIndex > & | sideIndexes | ||
) |
Fill a vector with TPZGeoElSideIndex_s with respect to internal subelements of a given side.
side | side of father element that will be searched for internal sides (generated from subelements) |
sideIndexes | vector of subelement index/sides (stored as TPZGeoElSideIndex objects) that belongs to the interior of given side of father element. |
Definition at line 541 of file TPZRefPattern.cpp.
References CheckSideConsistency(), DebugStop, fFatherSideInfo, and TPZVec< T >::Resize().
Referenced by TPZGeoElRefPattern< TGeo >::GetSubElements2().
bool TPZRefPattern::IsFatherNeighbour | ( | TPZGeoElSide | fatherSide, |
TPZGeoEl * | son | ||
) | const |
Verifies the neighbouring relationship between a son and a father's side.
fatherSide | TPZGeoElSide corresponding to the father's side |
son | the sub-element |
Definition at line 506 of file TPZRefPattern.cpp.
References fFatherSideInfo, and TPZGeoElSide::Side().
Referenced by TPZRefPatternTools::TransformationTest().
|
inline |
Returns the refinement pattern identifier.
Definition at line 448 of file TPZRefPattern.h.
Referenced by TPZRefPatternDataBase::GetUniformRefPattern(), TPZRefPatternDataBase::InitializeUniformRefPattern(), and NameInitialized().
|
inline |
Definition at line 433 of file TPZRefPattern.h.
References CreateMidSideNodes(), CreateNewNodes(), fName, GenerateSideRefPatterns(), InsertPermuted(), Name(), SetName(), SidePartition(), and SideRefPattern().
Referenced by GenerateSideRefPatterns(), and InsertPermuted().
int TPZRefPattern::NNodes | ( | ) | const |
Returns the number of nodes of the mesh.
Definition at line 502 of file TPZRefPattern.cpp.
References fRefPatternMesh, and TPZGeoMesh::NNodes().
Referenced by TPZGeoElRefPattern< TGeo >::Divide().
int TPZRefPattern::NSideNodes | ( | int | fatherSide | ) | const |
Returns the number of internal nodes of side.
Definition at line 493 of file TPZRefPattern.cpp.
References CheckSideConsistency(), DebugStop, and fFatherSideInfo.
Referenced by TPZRefPatternTools::BuildRefPatternModelName(), BuildSideMesh(), InternalNodesIndexes(), and ShortPrint().
int TPZRefPattern::NSideSubGeoElSides | ( | int | fatherSide | ) | const |
Returns the number of TPZGeoElSides associated with a father's side.
Definition at line 451 of file TPZRefPattern.cpp.
References CheckSideConsistency(), DebugStop, and fFatherSideInfo.
Referenced by CheckSideAndSubElConsistency(), GenerateSideRefPatterns(), and TPZGeoElRefPattern< TGeo >::NSideSubElements().
int TPZRefPattern::NSubElements | ( | ) | const |
Gives the number of sub elements of this refinement pattern
Definition at line 419 of file TPZRefPattern.cpp.
References DebugStop, fNSubEl, fSubElSideInfo, PZError, and TPZVec< T >::size().
Referenced by TPZRefPatternTools::CompareTopologies(), ComputePartition(), TPZGeoElRefPattern< TGeo >::Divide(), Element(), FatherSide(), FindSubEl(), TPZGeoElRefPattern< TGeo >::NSubElements(), TPZRefPatternTools::PerfectMatchRefPattern(), TPZGeoElRefPattern< TGeo >::SetRefPattern(), TPZGeoElRefPattern< TGeo >::SetSubElement(), TPZGeoElRefPattern< TGeo >::SubElement(), Transform(), and TPZRefPatternTools::TransformationTest().
int TPZRefPattern::operator== | ( | const TPZAutoPointer< TPZRefPattern > | compare | ) | const |
Definition at line 90 of file TPZRefPattern.cpp.
References TPZGeoEl::Dimension(), TPZGeoMesh::ElementVec(), fRefPatternMesh, TPZGeoMesh::NElements(), TPZGeoMesh::NNodes(), TPZGeoEl::NNodes(), TPZGeoEl::NodeIndex(), TPZGeoMesh::NodeVec(), sqrt, TPZGeoEl::Type(), and ZeroTolerance().
|
protected |
Copy the mesh structure applying the permutation on the nodenumbers of the first element.
Definition at line 1127 of file TPZRefPattern.cpp.
References TPZGeoMesh::BuildConnectivity(), TPZGeoMesh::ElementVec(), fRefPatternMesh, TPZGeoEl::NNodes(), TPZGeoEl::NodeIndex(), TPZPermutation::Permute(), TPZGeoMesh::ResetConnectivities(), and TPZGeoEl::SetNodeIndex().
Referenced by TPZRefPattern().
void TPZRefPattern::Print | ( | std::ostream & | out = std::cout | ) | const |
Prints the useful information of a Refinement Pattern in a ostream file.
Definition at line 198 of file TPZRefPattern.cpp.
References TPZGeoMesh::ElementVec(), fFatherSideInfo, FindSubEl(), fName, fRefPatternMesh, TPZRefPattern::SPZFatherSideInfo::fSideNodes, TPZRefPattern::SPZFatherSideInfo::fSideSons, fSubElSideInfo, TPZVec< T >::Print(), and TPZVec< T >::size().
Referenced by InsertPermuted(), PrintMore(), and TPZRefPatternTools::SidesToRefine().
void TPZRefPattern::PrintMore | ( | std::ostream & | out = std::cout | ) | const |
detailed information regarding the Refinement Pattern, including mesh information.
out |
Definition at line 241 of file TPZRefPattern.cpp.
References fRefPatternMesh, Print(), and TPZGeoMesh::PrintTopologicalInfo().
Referenced by TPZRefPatternDataBase::InitializeUniformRefPattern().
void TPZRefPattern::PrintVTK | ( | std::ofstream & | file, |
bool | matColor = false |
||
) | const |
Definition at line 272 of file TPZRefPattern.cpp.
References TPZGeoMesh::BuildConnectivity(), TPZGeoMesh::CreateGeoElement(), TPZGeoMesh::ElementVec(), fRefPatternMesh, TPZGeoEl::Id(), TPZGeoEl::MaterialId(), TPZGeoMesh::NElements(), TPZGeoMesh::NNodes(), TPZGeoEl::NNodes(), TPZGeoEl::NodeIndex(), TPZGeoMesh::NodeVec(), TPZVTKGeoMesh::PrintGMeshVTK(), TPZAdmChunkVector< T, EXP >::Resize(), and TPZGeoEl::Type().
|
overridevirtual |
read objects from the stream
Reimplemented from TPZSavable.
Definition at line 372 of file TPZRefPattern.cpp.
References fFatherSideInfo, fId, substruct_tst15.test::first, fName, fNSubEl, fPermutedRefPatterns, fRefPatternMesh, fSideRefPattern, fSubElSideInfo, TPZTransform< T >::Read(), TPZGeoMesh::Read(), TPZStream::Read(), and TPZVec< T >::Resize().
|
protected |
Reads the definition of a refinement pattern and creates it.
pattern |
Definition at line 1144 of file TPZRefPattern.cpp.
References TPZGeoMesh::CreateGeoElement(), CreateRefinementPattern(), TPZGeoEl::Dimension(), fId, fName, fRefPatternMesh, TPZGeoEl::Index(), MElementType_NNodes(), TPZGeoMesh::NodeVec(), TPZAdmChunkVector< T, EXP >::Resize(), TPZGeoMesh::SetDimension(), TPZGeoEl::SetFather(), and TPZGeoEl::SetFatherIndex().
Referenced by TPZRefPatternDataBase::ReadRefPatternDBase(), and TPZRefPattern().
|
inline |
Definition at line 498 of file TPZRefPattern.h.
Referenced by TPZRefPatternTools::CompareTopologies(), TPZRefPatternTools::DragModelPatNodes(), and TPZRefPatternTools::ModifyElementsBasedOnRefpFound().
|
inline |
Set the id of the refinement pattern.
Definition at line 425 of file TPZRefPattern.h.
Referenced by TPZRefPatternDataBase::InsertRefPattern().
|
inline |
Sets the name associated with the refinement pattern.
name | a string containing the name to be set |
Definition at line 441 of file TPZRefPattern.h.
Referenced by TPZRefPatternDataBase::InitializeUniformRefPattern(), and NameInitialized().
|
protected |
Sets the RefPatternMesh in (x,y,z)_coordinates to (qsi,eta,zeta)_coordinates, always respecting the R3 dimension.
Definition at line 811 of file TPZRefPattern.cpp.
References TPZGeoEl::ComputeXInverse(), TPZGeoEl::Dimension(), TPZGeoMesh::ElementVec(), fRefPatternMesh, TPZChunkVector< T, EXP >::NElements(), TPZGeoMesh::NodeVec(), TPZGeoEl::ProjectInParametricDomain(), and ZeroTolerance().
Referenced by CreateRefinementPattern(), GenerateSideRefPatterns(), and TPZRefPattern().
void TPZRefPattern::ShortPrint | ( | std::ostream & | out = std::cout | ) | const |
Definition at line 246 of file TPZRefPattern.cpp.
References TPZGeoMesh::ElementVec(), fId, fRefPatternMesh, TPZChunkVector< T, EXP >::NElements(), TPZGeoMesh::NodeVec(), NSideNodes(), TPZGeoEl::NSides(), TPZGeoEl::SideDimension(), and TPZGeoEl::TypeName().
Referenced by TPZGeoElRefPattern< TGeo >::Print().
void TPZRefPattern::SideNodes | ( | int | fatherSide, |
TPZVec< int > & | vecNodes | ||
) |
It returns a TPZVec containing the nodes contained in a given father's side.
fatherSide | father's side from which we want to know information about a sub element |
vecNodes | vector containing the nodes of side fatherSide |
Definition at line 484 of file TPZRefPattern.cpp.
References CheckSideConsistency(), DebugStop, and fFatherSideInfo.
Referenced by BuildSideMesh(), CreateMidSideNodes(), and TPZRefPatternTools::SidesToRefine().
int TPZRefPattern::SidePartition | ( | TPZVec< TPZGeoElSide > & | gelvec, |
int | side | ||
) |
It returns a stack from sub-elements and its sides. This stack partitions side of the element father.
It returns the number from elements of the partition of the side
side | - side of father element that will be searched for internal sides (generated from subelements) |
gelvec | - vector of sides (stored as TPZGeoElSide objects) that belongs to given side of father element. |
Definition at line 555 of file TPZRefPattern.cpp.
References CheckSideConsistency(), DebugStop, fFatherSideInfo, and TPZVec< T >::size().
Referenced by BuildSideMesh(), and NameInitialized().
TPZAutoPointer< TPZRefPattern > TPZRefPattern::SideRefPattern | ( | int | side | ) |
Definition at line 566 of file TPZRefPattern.cpp.
References TPZRefPatternDataBase::FindRefPattern(), fSideRefPattern, and gRefDBase.
Referenced by TPZMHMeshControl::DivideWrap(), TPZRefPatternTools::DragModelPatNodes(), TPZRefPatternTools::GetCompatibleRefPatterns(), TPZRefPatternTools::ModelRefPattern(), NameInitialized(), SideRefPattern(), and TPZRefPatternTools::SidesToRefine().
TPZAutoPointer< TPZRefPattern > TPZRefPattern::SideRefPattern | ( | int | side, |
TPZTransform<> & | trans | ||
) |
Find the side refinement pattern corresponding to the parameter transformation.
Definition at line 781 of file TPZRefPattern.cpp.
References FindRefPattern(), and SideRefPattern().
void TPZRefPattern::SideSubGeoElSide | ( | int | fatherSide, |
int | subElPos, | ||
TPZGeoElSide & | subGeoEl | ||
) | const |
Gives information about the ith subelement contained in a given father's side.
fatherSide | father's side from which we want to know information about a sub element |
subElPos | the information regards the subElPos-th sub element of the fatherSide |
subGeoEl | TPZGeoElSide of the (sub-element,side) associated with the father's side |
Definition at line 461 of file TPZRefPattern.cpp.
References CheckSideAndSubElConsistency(), DebugStop, and fFatherSideInfo.
Referenced by TPZGeoElRefPattern< TGeo >::SideSubElement().
TPZTransform TPZRefPattern::Transform | ( | int | subElSide, |
int | sub | ||
) |
It returns the TPZTransform associated with a certain sub-element's side to the father's coordinates.
subElSide | subElement side |
sub | the information regards the sub-th sub element of the fatherSide |
Definition at line 470 of file TPZRefPattern.cpp.
References DebugStop, Element(), fSubElSideInfo, TPZGeoEl::NSides(), and NSubElements().
Referenced by TPZGeoElRefPattern< TGeo >::GetTransform(), and TPZRefPatternTools::TransformationTest().
|
inline |
Definition at line 502 of file TPZRefPattern.h.
References Element(), and TPZGeoEl::Type().
Referenced by TPZRefPatternTools::CompareTopologies().
|
overridevirtual |
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
Writes this object to the TPZStream buffer. Include the classid if withclassid = true
Reimplemented from TPZSavable.
Definition at line 397 of file TPZRefPattern.cpp.
References fFatherSideInfo, fId, substruct_tst15.test::first, fName, fNSubEl, fPermutedRefPatterns, fRefPatternMesh, fSideRefPattern, fSubElSideInfo, TPZVec< T >::size(), TPZStream::Write(), and TPZGeoMesh::Write().
void TPZRefPattern::WritePattern | ( | std::ofstream & | out | ) | const |
Definition at line 346 of file TPZRefPattern.cpp.
References TPZGeoMesh::ElementVec(), ExportPattern(), fPermutedRefPatterns, fRefPatternMesh, fSideRefPattern, TPZGeoEl::NSides(), and TPZVec< T >::size().
Referenced by TPZRefPatternDataBase::WriteRefPatternDBase().
|
friend |
Definition at line 183 of file TPZRefPattern.h.
|
friend |
Definition at line 185 of file TPZRefPattern.h.
|
protected |
Data structure for storage of refinement information for each father's side fFatherSideInfo[i] will contain a tuple made of three entities, stored in SPZFatherSideInfo.
Definition at line 115 of file TPZRefPattern.h.
Referenced by ComputePartition(), InternalNodesIndexes(), InternalSidesIndexes(), IsFatherNeighbour(), NSideNodes(), NSideSubGeoElSides(), Print(), Read(), SideNodes(), SidePartition(), SideSubGeoElSide(), TPZRefPattern(), and Write().
|
protected |
id of the refinement pattern
Definition at line 124 of file TPZRefPattern.h.
Referenced by ExportPattern(), Read(), ReadAndCreateRefinementPattern(), ShortPrint(), TPZGeoEl::TPZGeoEl(), TPZRefPattern(), Write(), and TPZGeoEl::~TPZGeoEl().
|
protected |
other stuff/////////////// name of the refinement pattern
Definition at line 121 of file TPZRefPattern.h.
Referenced by BuildName(), ExportPattern(), NameInitialized(), Print(), Read(), ReadAndCreateRefinementPattern(), TPZRefPattern(), and Write().
|
staticprotected |
Id for identifying a non initialized pattern.
Definition at line 80 of file TPZRefPattern.h.
Referenced by TPZRefPatternDataBase::ReturnUniqueId().
|
staticprotected |
Name for identifying a non initialized pattern.
Definition at line 82 of file TPZRefPattern.h.
Referenced by TPZRefPatternTools::BuildRefPatternModelName().
|
protected |
Number of subelements. Must be available before the mesh is generated.
Definition at line 147 of file TPZRefPattern.h.
Referenced by CreateRefinementPattern(), GenerateSideRefPatterns(), NSubElements(), Read(), TPZRefPattern(), and Write().
|
staticprotected |
Map of all valid permutations.
Definition at line 180 of file TPZRefPattern.h.
Referenced by FindRefPattern(), GeneratePermutations(), and InsertPermuted().
|
protected |
Vector containing refinement patterns for each permutation of the master element.
The vector stores the id correspondent to the refinement pattern vector in fRefPatternMesh
Definition at line 137 of file TPZRefPattern.h.
Referenced by InsertPermuted(), Read(), TPZRefPattern(), Write(), and WritePattern().
|
protected |
Geometric mesh which defines the topology of the current refinement pattern.
Definition at line 142 of file TPZRefPattern.h.
Referenced by BuildSideMesh(), CheckSideAndSubElConsistency(), CheckSideConsistency(), ComputeTransforms(), CreateMidSideNodes(), CreateNewNodes(), CreateRefinementPattern(), Element(), ExportPattern(), FatherSide(), FindRefPattern(), FindSubEl(), GenerateSideRefPatterns(), TPZRefPatternDataBase::ImportRefPatterns(), InsertPermuted(), NNodes(), operator==(), PermuteMesh(), Print(), PrintMore(), PrintVTK(), Read(), ReadAndCreateRefinementPattern(), SetRefPatternMeshToMasterDomain(), ShortPrint(), TPZRefPattern(), Write(), and WritePattern().
|
protected |
Refinement for elements associated with a certain side of the current element. Usually, this is used for boundary/interface elements.
Definition at line 130 of file TPZRefPattern.h.
Referenced by GenerateSideRefPatterns(), Read(), SideRefPattern(), TPZRefPattern(), Write(), and WritePattern().
|
protected |
Data structure with sub element info.
fSubElSideInfo[i][j] contains a pair (int,TPZTransform) related to the j-th side of the i-th son. the pair consists of a) the side of the father in which the son is contained b) the parametric transformation to the father's coordinates
Definition at line 90 of file TPZRefPattern.h.
Referenced by ComputeTransforms(), FatherSide(), NSubElements(), Print(), Read(), TPZRefPattern(), Transform(), and Write().