NeoPZ
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
TPZRefPattern Class Reference

Defines the topology of the current refinement pattern to a mesh. Refine. More...

#include <TPZRefPattern.h>

Inheritance diagram for TPZRefPattern:
[legend]
Collaboration diagram for TPZRefPattern:
[legend]

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)
 Copy constructor. More...
 
 TPZRefPattern (TPZGeoMesh &gmesh)
 
 TPZRefPattern (const TPZRefPattern &copy, 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...
 
TPZGeoElElement (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< TPZRefPatternSideRefPattern (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< TPZRefPatternSideRefPattern (int side, TPZTransform<> &trans)
 Find the side refinement pattern corresponding to the parameter transformation. More...
 
TPZAutoPointer< TPZRefPatternFindRefPattern (TPZTransform<> &trans)
 
TPZGeoMeshRefPatternMesh ()
 
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< SPZFatherSideInfofFatherSideInfo
 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 TPZSavableCreateInstance (const int &classId)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ TPZRefPattern() [1/6]

TPZRefPattern::TPZRefPattern ( )

Definition at line 39 of file TPZRefPattern.cpp.

Referenced by FindRefPattern(), GenerateSideRefPatterns(), and InsertPermuted().

◆ TPZRefPattern() [2/6]

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() [3/6]

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() [4/6]

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.

◆ TPZRefPattern() [5/6]

TPZRefPattern::TPZRefPattern ( TPZGeoMesh gmesh)
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.

Parameters
gmesh

Definition at line 68 of file TPZRefPattern.cpp.

References CreateRefinementPattern(), and fRefPatternMesh.

◆ TPZRefPattern() [6/6]

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().

◆ ~TPZRefPattern()

virtual TPZRefPattern::~TPZRefPattern ( )
virtualdefault

Member Function Documentation

◆ BuildName()

void TPZRefPattern::BuildName ( )
protected

◆ BuildSideMesh()

void TPZRefPattern::BuildSideMesh ( int  side,
TPZGeoMesh SideRefPatternMesh 
)
protected

◆ CheckSideAndSubElConsistency()

bool TPZRefPattern::CheckSideAndSubElConsistency ( const int  fatherSide,
const int  subEl 
) const
protected

This simple method checks both if the side is valid, and if the sub-element exists

Parameters
fatherSideside
subElsub-el
Returns
true if consistent

Definition at line 1042 of file TPZRefPattern.cpp.

References TPZGeoMesh::ElementVec(), fRefPatternMesh, NSideSubGeoElSides(), and PZError.

Referenced by SideSubGeoElSide().

◆ CheckSideConsistency()

bool TPZRefPattern::CheckSideConsistency ( const int  fatherSide) const
protected

This simple method just checks if the side exists in the father element

Parameters
fatherSideside
Returns
true if consistent

Definition at line 1031 of file TPZRefPattern.cpp.

References TPZGeoMesh::ElementVec(), fRefPatternMesh, and PZError.

Referenced by InternalNodesIndexes(), InternalSidesIndexes(), NSideNodes(), NSideSubGeoElSides(), SideNodes(), and SidePartition().

◆ ClassId()

int TPZRefPattern::ClassId ( ) const
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=().

◆ ComputeParamTransform()

TPZTransform TPZRefPattern::ComputeParamTransform ( TPZGeoEl geoElFrom,
TPZGeoEl geoElTo,
int  sideFrom,
int  sideTo 
)
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

Parameters
geoElFromelement from which the transformation will be applied
geoElToelement to which the transformation corresponds
sideFromside of the from element
sideToside of the to element
Returns
transformation

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().

◆ ComputePartition()

void TPZRefPattern::ComputePartition ( )
protected

◆ ComputeTransforms()

void TPZRefPattern::ComputeTransforms ( )
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().

◆ CreateMidSideNodes()

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.

Parameters
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().

◆ CreateNewNodes()

void TPZRefPattern::CreateNewNodes ( TPZGeoEl gel,
TPZVec< int64_t > &  newnodeindexes 
)

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.

Parameters
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().

◆ CreateRefinementPattern()

void TPZRefPattern::CreateRefinementPattern ( )
protected

◆ Element()

TPZGeoEl * TPZRefPattern::Element ( int  iel)

◆ ExportPattern()

void TPZRefPattern::ExportPattern ( std::ostream &  out) const

Exports refpattern in the same format it is expected to be read in the future.

Parameters
outostream 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().

◆ FatherSide()

int TPZRefPattern::FatherSide ( int  side,
int  sub 
) const

Returns the father side associated with a given side of a certain sub element.

Parameters
sideside of the sub element
subindex of the sub element
Returns
father's side

Definition at line 433 of file TPZRefPattern.cpp.

References DebugStop, TPZGeoMesh::ElementVec(), fRefPatternMesh, fSubElSideInfo, NSubElements(), and PZError.

Referenced by ComputePartition(), and TPZGeoElRefPattern< TGeo >::FatherSide().

◆ FindRefPattern()

TPZAutoPointer< TPZRefPattern > TPZRefPattern::FindRefPattern ( TPZTransform<> &  trans)

◆ FindSubEl()

int TPZRefPattern::FindSubEl ( TPZGeoEl geoEl) const
protected

Given a certain geometric element corresponding to a sub-element, this method will return its index

Returns
index of the sub-element

Definition at line 1016 of file TPZRefPattern.cpp.

References DebugStop, TPZGeoMesh::ElementVec(), fRefPatternMesh, NSubElements(), and PZError.

Referenced by Print().

◆ GeneratePermutations()

void TPZRefPattern::GeneratePermutations ( TPZGeoEl gel)
protected

◆ GenerateSideRefPatterns()

void TPZRefPattern::GenerateSideRefPatterns ( )

◆ Id()

int TPZRefPattern::Id ( ) const
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().

◆ IdInitialized()

bool TPZRefPattern::IdInitialized ( )
inline

Check if the refinement pattern has an initiatlized Id

Returns

Definition at line 418 of file TPZRefPattern.h.

Referenced by TPZRefPatternDataBase::InsertRefPattern().

◆ InsertPermuted()

void TPZRefPattern::InsertPermuted ( )

◆ InternalNodesIndexes()

void TPZRefPattern::InternalNodesIndexes ( int  side,
TPZVec< TPZGeoElSideIndex > &  nodeIndexes 
)

◆ InternalSidesIndexes()

void TPZRefPattern::InternalSidesIndexes ( int  side,
TPZVec< TPZGeoElSideIndex > &  sideIndexes 
)

Fill a vector with TPZGeoElSideIndex_s with respect to internal subelements of a given side.

Parameters
sideside of father element that will be searched for internal sides (generated from subelements)
sideIndexesvector 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().

◆ IsFatherNeighbour()

bool TPZRefPattern::IsFatherNeighbour ( TPZGeoElSide  fatherSide,
TPZGeoEl son 
) const

Verifies the neighbouring relationship between a son and a father's side.

Parameters
fatherSideTPZGeoElSide corresponding to the father's side
sonthe sub-element

Definition at line 506 of file TPZRefPattern.cpp.

References fFatherSideInfo, and TPZGeoElSide::Side().

Referenced by TPZRefPatternTools::TransformationTest().

◆ Name()

std::string TPZRefPattern::Name ( )
inline

Returns the refinement pattern identifier.

Definition at line 448 of file TPZRefPattern.h.

Referenced by TPZRefPatternDataBase::GetUniformRefPattern(), TPZRefPatternDataBase::InitializeUniformRefPattern(), and NameInitialized().

◆ NameInitialized()

bool TPZRefPattern::NameInitialized ( )
inline

◆ NNodes()

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().

◆ NSideNodes()

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().

◆ NSideSubGeoElSides()

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().

◆ NSubElements()

int TPZRefPattern::NSubElements ( ) const

◆ operator==()

int TPZRefPattern::operator== ( const TPZAutoPointer< TPZRefPattern compare) const

◆ PermuteMesh()

void TPZRefPattern::PermuteMesh ( const TPZPermutation permute)
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().

◆ Print()

void TPZRefPattern::Print ( std::ostream &  out = std::cout) const

◆ PrintMore()

void TPZRefPattern::PrintMore ( std::ostream &  out = std::cout) const

detailed information regarding the Refinement Pattern, including mesh information.

Parameters
out

Definition at line 241 of file TPZRefPattern.cpp.

References fRefPatternMesh, Print(), and TPZGeoMesh::PrintTopologicalInfo().

Referenced by TPZRefPatternDataBase::InitializeUniformRefPattern().

◆ PrintVTK()

void TPZRefPattern::PrintVTK ( std::ofstream &  file,
bool  matColor = false 
) const

◆ Read()

void TPZRefPattern::Read ( TPZStream buf,
void *  context 
)
overridevirtual

◆ ReadAndCreateRefinementPattern()

void TPZRefPattern::ReadAndCreateRefinementPattern ( std::istream &  file)
protected

◆ RefPatternMesh()

TPZGeoMesh& TPZRefPattern::RefPatternMesh ( )
inline

◆ SetId()

void TPZRefPattern::SetId ( int  id)
inline

Set the id of the refinement pattern.

Definition at line 425 of file TPZRefPattern.h.

Referenced by TPZRefPatternDataBase::InsertRefPattern().

◆ SetName()

void TPZRefPattern::SetName ( std::string  name)
inline

Sets the name associated with the refinement pattern.

Parameters
namea string containing the name to be set

Definition at line 441 of file TPZRefPattern.h.

Referenced by TPZRefPatternDataBase::InitializeUniformRefPattern(), and NameInitialized().

◆ SetRefPatternMeshToMasterDomain()

void TPZRefPattern::SetRefPatternMeshToMasterDomain ( )
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().

◆ ShortPrint()

void TPZRefPattern::ShortPrint ( std::ostream &  out = std::cout) const

◆ SideNodes()

void TPZRefPattern::SideNodes ( int  fatherSide,
TPZVec< int > &  vecNodes 
)

It returns a TPZVec containing the nodes contained in a given father's side.

Parameters
fatherSidefather's side from which we want to know information about a sub element
vecNodesvector 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().

◆ SidePartition()

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

Parameters
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().

◆ SideRefPattern() [1/2]

TPZAutoPointer< TPZRefPattern > TPZRefPattern::SideRefPattern ( int  side)

◆ SideRefPattern() [2/2]

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().

◆ SideSubGeoElSide()

void TPZRefPattern::SideSubGeoElSide ( int  fatherSide,
int  subElPos,
TPZGeoElSide subGeoEl 
) const

Gives information about the ith subelement contained in a given father's side.

Parameters
fatherSidefather's side from which we want to know information about a sub element
subElPosthe information regards the subElPos-th sub element of the fatherSide
subGeoElTPZGeoElSide 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().

◆ Transform()

TPZTransform TPZRefPattern::Transform ( int  subElSide,
int  sub 
)

It returns the TPZTransform associated with a certain sub-element's side to the father's coordinates.

Parameters
subElSidesubElement side
subthe 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().

◆ Type()

MElementType TPZRefPattern::Type ( )
inline

Definition at line 502 of file TPZRefPattern.h.

References Element(), and TPZGeoEl::Type().

Referenced by TPZRefPatternTools::CompareTopologies().

◆ Write()

void TPZRefPattern::Write ( TPZStream buf,
int  withclassid 
) const
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().

◆ WritePattern()

void TPZRefPattern::WritePattern ( std::ofstream &  out) const

Friends And Related Function Documentation

◆ TPZRefPatternDataBase

friend class TPZRefPatternDataBase
friend

Definition at line 183 of file TPZRefPattern.h.

◆ TPZRefPatternTools

friend class TPZRefPatternTools
friend

Definition at line 185 of file TPZRefPattern.h.

Member Data Documentation

◆ fFatherSideInfo

TPZVec<SPZFatherSideInfo> TPZRefPattern::fFatherSideInfo
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().

◆ fId

int TPZRefPattern::fId
protected

◆ fName

std::string TPZRefPattern::fName
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().

◆ fNonInitializedId

const int TPZRefPattern::fNonInitializedId
staticprotected

Id for identifying a non initialized pattern.

Definition at line 80 of file TPZRefPattern.h.

Referenced by TPZRefPatternDataBase::ReturnUniqueId().

◆ fNonInitializedName

const std::string TPZRefPattern::fNonInitializedName
staticprotected

Name for identifying a non initialized pattern.

Definition at line 82 of file TPZRefPattern.h.

Referenced by TPZRefPatternTools::BuildRefPatternModelName().

◆ fNSubEl

int TPZRefPattern::fNSubEl
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().

◆ fPermutations

std::map< MElementType, std::list< TPZRefPattern::TPZRefPatternPermute > > TPZRefPattern::fPermutations
staticprotected

Map of all valid permutations.

Definition at line 180 of file TPZRefPattern.h.

Referenced by FindRefPattern(), GeneratePermutations(), and InsertPermuted().

◆ fPermutedRefPatterns

TPZVec<int> TPZRefPattern::fPermutedRefPatterns
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().

◆ fRefPatternMesh

TPZGeoMesh TPZRefPattern::fRefPatternMesh
protected

◆ fSideRefPattern

TPZVec<int> TPZRefPattern::fSideRefPattern
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().

◆ fSubElSideInfo

TPZVec<TPZVec<std::pair<int,TPZTransform<REAL> > > > TPZRefPattern::fSubElSideInfo
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().


The documentation for this class was generated from the following files: