NeoPZ
pzidentifyrefpattern.h
Go to the documentation of this file.
1 
7 #ifndef PZIDENTIFYREFPATTERN_H
8 #define PZIDENTIFYREFPATTERN_H
9 
10 #include "pzvec.h"
11 #include "pzgeoelside.h"
12 #include <set>
13 #include <string>
14 class TPZRefPattern;
15 
27 public:
28  TPZIdentifyRefPattern(std::string &path);
32 
33 protected: // Protected methods
35  int IdentifySide(TPZGeoEl *father, TPZVec<TPZGeoEl *> subelem);
36 
40  int UniformSubElem(int eltype) ;
43 
44 protected:
45  std::string fPath;
46 };
47 
52 struct TSide {
53  std::set<int64_t> fNodes;
54  int fSide;
55  bool operator<(const TSide &other) const{
56  return fNodes < other.fNodes;
57  }
58  TSide &operator=(const TSide &copy) {
59  fSide = copy.fSide;
60  fNodes = copy.fNodes;
61  return *this;
62  }
63  TSide &operator=(const TPZGeoElSide &gelside) {
64  fSide = gelside.Side();
65  int i;
66  for (i=0;i<gelside.NSideNodes();i++){
67  fNodes.insert(gelside.SideNodeIndex(i));
68  }
69  return *this;
70  }
71  TSide (const TPZGeoElSide &gelside) {
72  fSide = gelside.Side();
73  int i;
74  for (i=0;i<gelside.NSideNodes();i++){
75  fNodes.insert(gelside.SideNodeIndex(i));
76  }
77  }
78 };
79 
82 #endif
int NSideNodes() const
int IdentifySide(TPZGeoEl *father, TPZVec< TPZGeoEl *> subelem)
Identify the side of the refinement pattern.
Contains declaration of TPZGeoElSide class which represents an element and its side, and TPZGeoElSideIndex class which represents an TPZGeoElSide index.
Templated vector implementation.
TSide(const TPZGeoElSide &gelside)
Identifies the refinement pattern given the father element and their sons. Getting Data...
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
Definition: pzgeoelside.h:83
This class implements a simple vector storage scheme for a templated class T. Utility.
Definition: pzgeopoint.h:19
TSide & operator=(const TPZGeoElSide &gelside)
TPZAutoPointer< TPZRefPattern > GetUniform(TPZGeoEl *gel)
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
int UniformSubElem(int eltype)
Returns the number of subelements of a uniform refinement \ pattern for the specified element type...
bool operator<(const TSide &other) const
TSide & operator=(const TSide &copy)
std::set< int64_t > fNodes
Defines the topology of the current refinement pattern to a mesh. Refine.
Definition: TPZRefPattern.h:77
To store a side and its nodes indexes. Getting data.
TPZIdentifyRefPattern(std::string &path)
int Side() const
Definition: pzgeoelside.h:169
int64_t SideNodeIndex(int nodenum) const
Returns the index of the nodenum node of side.
TPZAutoPointer< TPZRefPattern > GetRefPattern(TPZGeoEl *father, TPZVec< TPZGeoEl *> subelem)
Returns the refinement pattern that generates the given refinement.
TPZAutoPointer< TPZRefPattern > GetSideRefPattern(TPZGeoEl *gel, int side)