NeoPZ
TPZRefPatternDataBase.h
Go to the documentation of this file.
1 
5 /*
6  * TPZRefPatternDataBase.h
7  * NeoPZ
8  *
9  * Created by caju on 12/17/09.
10  * Copyright 2009 LabMeC. All rights reserved.
11  */
12 
13 #ifndef TPZREFPATTERNDATABASEH
14 #define TPZREFPATTERNDATABASEH
15 
16 #include <iostream>
17 #include <string>
18 #include <map>
19 #include <list>
20 
21 #include "pzeltype.h"
22 #include "tpzautopointer.h"
23 #include "TPZRefPattern.h"
24 
30 {
31 public:
32 
35 
36  int ReturnUniqueId();
37 
39  void ReadRefPatternDBase(const std::string &filename);
40 
41  void ReadRefPatternDBase(std::ifstream &filein);
42 
43  void WriteRefPatternDBase(std::ofstream &fileout);
44 
49  int ImportRefPatterns(int maxdim = 3);
50 
55  int ImportRefPatterns(std::string &Path, int maxdim = 3);
56 
59 
62 
63  void InitializeRefPatterns(int maxdim = 3);
64 
67 
70 
73 
75 
77 
79  const std::list< TPZAutoPointer<TPZRefPattern> > &RefPatternList(MElementType eltype);
80 
81  int NRefPatterns();
82 
83  void Print(std::ostream &out = std::cout);
84 
85  void clear()
86  {
87  fElTypeRefPatterns.clear();
88  fIdRefPatterns.clear();
89  }
90 
91 protected:
92 
94  std::map< MElementType , std::list< TPZAutoPointer<TPZRefPattern> > > fElTypeRefPatterns;
95 
97  std::map< int , TPZAutoPointer<TPZRefPattern> > fIdRefPatterns;
98 
99 };
100 
103 
104 #endif
std::map< int, TPZAutoPointer< TPZRefPattern > > fIdRefPatterns
Maps all refinement pattern objects in the mesh, indexed by refpattern Id.
std::map< MElementType, std::list< TPZAutoPointer< TPZRefPattern > > > fElTypeRefPatterns
Maps all refinement pattern objects in the mesh, indexed by refpattern element type.
filename
Definition: stats.py:82
void InitializeAllUniformRefPatterns()
Initialize the uniform refinement pattern from hard coaded data for all linear geometric elements...
const std::list< TPZAutoPointer< TPZRefPattern > > & RefPatternList(MElementType eltype)
Return the complete set of refinement patterns availabe.
void InitializeUniformRefPattern(MElementType elType)
Initialize the uniform refinement pattern from hard coaded data for an specific geometric element...
void InsertRefPattern(TPZAutoPointer< TPZRefPattern > &refpat)
Insert the refinement pattern in the list of availabe refinement patterns assigns an Id to refPattern...
void Print(std::ostream &out=std::cout)
Defines enum MElementType and contains the implementation of MElementType_NNodes(...) functions.
void InitializeRefPatterns(int maxdim=3)
TPZAutoPointer< TPZRefPattern > FindRefPattern(TPZAutoPointer< TPZRefPattern > &refpat)
Check whether the refinement pattern already exists.
Defines data base of patterns. Refine.
TPZAutoPointer< TPZRefPattern > GetUniformRefPattern(MElementType type)
Retrieves the uniform refinement pattern for given element type.
Contains declaration of the TPZAutoPointer class which has Increment and Decrement actions are mutexe...
int ImportRefPatterns(int maxdim=3)
Import a library of refinement patterns from the install directory.
Contains the TPZRefPattern class which defines the topology of the current refinement pattern to a me...
void WriteRefPatternDBase(std::ofstream &fileout)
TPZRefPatternDataBase gRefDBase
External variable to data base of patterns.
void ReadRefPatternDBase(const std::string &filename)
Read all refpatterns available in the given file.
MElementType
Define the element types.
Definition: pzeltype.h:52