NeoPZ
Public Member Functions | Protected Attributes | List of all members
TPZRefPatternDataBase Class Reference

Defines data base of patterns. Refine. More...

#include <TPZRefPatternDataBase.h>

Public Member Functions

 TPZRefPatternDataBase ()
 
 ~TPZRefPatternDataBase ()
 
int ReturnUniqueId ()
 
void ReadRefPatternDBase (const std::string &filename)
 Read all refpatterns available in the given file. More...
 
void ReadRefPatternDBase (std::ifstream &filein)
 
void WriteRefPatternDBase (std::ofstream &fileout)
 
int ImportRefPatterns (int maxdim=3)
 Import a library of refinement patterns from the install directory. More...
 
int ImportRefPatterns (std::string &Path, int maxdim=3)
 Import a library of refinement patterns from the given directory. More...
 
TPZAutoPointer< TPZRefPatternGetUniformRefPattern (MElementType type)
 Retrieves the uniform refinement pattern for given element type. More...
 
void InitializeUniformRefPattern (MElementType elType)
 Initialize the uniform refinement pattern from hard coaded data for an specific geometric element. More...
 
void InitializeRefPatterns (int maxdim=3)
 
void InitializeAllUniformRefPatterns ()
 Initialize the uniform refinement pattern from hard coaded data for all linear geometric elements. More...
 
void InsertRefPattern (TPZAutoPointer< TPZRefPattern > &refpat)
 Insert the refinement pattern in the list of availabe refinement patterns assigns an Id to refPattern. More...
 
TPZAutoPointer< TPZRefPatternFindRefPattern (TPZAutoPointer< TPZRefPattern > &refpat)
 Check whether the refinement pattern already exists. More...
 
TPZAutoPointer< TPZRefPatternFindRefPattern (int id)
 
TPZAutoPointer< TPZRefPatternFindRefPattern (std::string name)
 
const std::list< TPZAutoPointer< TPZRefPattern > > & RefPatternList (MElementType eltype)
 Return the complete set of refinement patterns availabe. More...
 
int NRefPatterns ()
 
void Print (std::ostream &out=std::cout)
 
void clear ()
 

Protected Attributes

std::map< MElementType, std::list< TPZAutoPointer< TPZRefPattern > > > fElTypeRefPatterns
 Maps all refinement pattern objects in the mesh, indexed by refpattern element type. More...
 
std::map< int, TPZAutoPointer< TPZRefPattern > > fIdRefPatterns
 Maps all refinement pattern objects in the mesh, indexed by refpattern Id. More...
 

Detailed Description

Defines data base of patterns. Refine.

Definition at line 29 of file TPZRefPatternDataBase.h.

Constructor & Destructor Documentation

◆ TPZRefPatternDataBase()

TPZRefPatternDataBase::TPZRefPatternDataBase ( )

Definition at line 33 of file TPZRefPatternDataBase.cpp.

◆ ~TPZRefPatternDataBase()

TPZRefPatternDataBase::~TPZRefPatternDataBase ( )

Definition at line 39 of file TPZRefPatternDataBase.cpp.

Member Function Documentation

◆ clear()

void TPZRefPatternDataBase::clear ( )
inline

Definition at line 85 of file TPZRefPatternDataBase.h.

References fElTypeRefPatterns, and fIdRefPatterns.

◆ FindRefPattern() [1/3]

TPZAutoPointer< TPZRefPattern > TPZRefPatternDataBase::FindRefPattern ( TPZAutoPointer< TPZRefPattern > &  refpat)

◆ FindRefPattern() [2/3]

TPZAutoPointer< TPZRefPattern > TPZRefPatternDataBase::FindRefPattern ( int  id)

Definition at line 652 of file TPZRefPatternDataBase.cpp.

◆ FindRefPattern() [3/3]

TPZAutoPointer< TPZRefPattern > TPZRefPatternDataBase::FindRefPattern ( std::string  name)

Definition at line 668 of file TPZRefPatternDataBase.cpp.

◆ GetUniformRefPattern()

TPZAutoPointer< TPZRefPattern > TPZRefPatternDataBase::GetUniformRefPattern ( MElementType  type)

Retrieves the uniform refinement pattern for given element type.

Definition at line 201 of file TPZRefPatternDataBase.cpp.

References ECube, EOned, EPiramide, EPoint, EPrisma, EQuadrilateral, ETetraedro, ETriangle, and TPZRefPattern::Name().

Referenced by TPZGeoElRefPattern< TGeo >::Divide(), and TPZRefPatternTools::RefineUniformIfNeighMat().

◆ ImportRefPatterns() [1/2]

int TPZRefPatternDataBase::ImportRefPatterns ( int  maxdim = 3)

Import a library of refinement patterns from the install directory.

Returns
Return the number of refpatterns imported

Definition at line 121 of file TPZRefPatternDataBase.cpp.

◆ ImportRefPatterns() [2/2]

int TPZRefPatternDataBase::ImportRefPatterns ( std::string &  Path,
int  maxdim = 3 
)

Import a library of refinement patterns from the given directory.

Returns
Return the number of refpatterns imported

Definition at line 132 of file TPZRefPatternDataBase.cpp.

References TPZGeoMesh::Dimension(), TPZRefPattern::fRefPatternMesh, and TPZRefPattern::InsertPermuted().

◆ InitializeAllUniformRefPatterns()

void TPZRefPatternDataBase::InitializeAllUniformRefPatterns ( )

Initialize the uniform refinement pattern from hard coaded data for all linear geometric elements.

Definition at line 580 of file TPZRefPatternDataBase.cpp.

References ECube, EOned, EPiramide, EPrisma, EQuadrilateral, ETetraedro, and ETriangle.

Referenced by main().

◆ InitializeRefPatterns()

void TPZRefPatternDataBase::InitializeRefPatterns ( int  maxdim = 3)

Definition at line 592 of file TPZRefPatternDataBase.cpp.

◆ InitializeUniformRefPattern()

void TPZRefPatternDataBase::InitializeUniformRefPattern ( MElementType  elType)

Initialize the uniform refinement pattern from hard coaded data for an specific geometric element.

Definition at line 273 of file TPZRefPatternDataBase.cpp.

References DebugStop, TPZRefPattern::InsertPermuted(), LOGPZ_DEBUG, TPZRefPattern::Name(), TPZRefPattern::PrintMore(), and TPZRefPattern::SetName().

Referenced by TPZGeoElRefPattern< TGeo >::Divide().

◆ InsertRefPattern()

void TPZRefPatternDataBase::InsertRefPattern ( TPZAutoPointer< TPZRefPattern > &  refpat)

◆ NRefPatterns()

int TPZRefPatternDataBase::NRefPatterns ( )

Definition at line 692 of file TPZRefPatternDataBase.cpp.

Referenced by ReturnUniqueId().

◆ Print()

void TPZRefPatternDataBase::Print ( std::ostream &  out = std::cout)

Definition at line 700 of file TPZRefPatternDataBase.cpp.

References MElementType_Name().

◆ ReadRefPatternDBase() [1/2]

void TPZRefPatternDataBase::ReadRefPatternDBase ( const std::string &  filename)

Read all refpatterns available in the given file.

Definition at line 78 of file TPZRefPatternDataBase.cpp.

◆ ReadRefPatternDBase() [2/2]

void TPZRefPatternDataBase::ReadRefPatternDBase ( std::ifstream &  filein)

◆ RefPatternList()

const std::list< TPZAutoPointer< TPZRefPattern > > & TPZRefPatternDataBase::RefPatternList ( MElementType  eltype)

Return the complete set of refinement patterns availabe.

Definition at line 686 of file TPZRefPatternDataBase.cpp.

Referenced by TPZRefPatternTools::GetCompatibleRefPatterns(), TPZRefPatternTools::ModelRefPattern(), and TPZGeoElRefPattern< TGeo >::Read().

◆ ReturnUniqueId()

int TPZRefPatternDataBase::ReturnUniqueId ( )

Definition at line 45 of file TPZRefPatternDataBase.cpp.

References TPZRefPattern::fNonInitializedId, and NRefPatterns().

◆ WriteRefPatternDBase()

void TPZRefPatternDataBase::WriteRefPatternDBase ( std::ofstream &  fileout)

Definition at line 103 of file TPZRefPatternDataBase.cpp.

References TPZRefPattern::WritePattern().

Member Data Documentation

◆ fElTypeRefPatterns

std::map< MElementType , std::list< TPZAutoPointer<TPZRefPattern> > > TPZRefPatternDataBase::fElTypeRefPatterns
protected

Maps all refinement pattern objects in the mesh, indexed by refpattern element type.

Definition at line 94 of file TPZRefPatternDataBase.h.

Referenced by clear().

◆ fIdRefPatterns

std::map< int , TPZAutoPointer<TPZRefPattern> > TPZRefPatternDataBase::fIdRefPatterns
protected

Maps all refinement pattern objects in the mesh, indexed by refpattern Id.

Definition at line 97 of file TPZRefPatternDataBase.h.

Referenced by clear().


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