38 PZError <<
"TPZIdentifyRefPattern::GetRefPattern ERROR : point partition detected!" << endl;
45 PZError <<
"TPZIdentifyRefPattern::GetRefPattern ERROR : wrong linear partition detected!" << endl;
53 if (nelem == UniformSubElem(eltype)) {
54 rp = GetUniform(father);
57 int side = IdentifySide(father,subelem);
58 rp = GetSideRefPattern(father,side);
65 return mesh_rp.operator->();
79 for (iside=0;iside<father->
NSides();iside++){
82 TSide sidefat(gelside);
83 Father.insert(sidefat);
85 for (isub=0;isub<subelem.
NElements();isub++) {
86 for (iside=0;iside<subelem[isub]->NSides();iside++) {
87 if (subelem[isub]->SideDimension(iside) != 1)
continue;
89 TSide sideson(gelside);
94 set_difference(Father.begin(),Father.end(),Sons.begin(),Sons.end(),inserter(Result,Result.begin()));
95 if (Result.size() != 1)
return -1;
97 TSide side_result = *Result.begin();
98 int side = side_result.
fSide;
106 case (
EPoint) :
return TPZRefPoint::NSubEl;
107 case (
EOned) :
return TPZRefLinear::NSubEl;
108 case (
ETriangle) :
return TPZRefTriangle::NSubEl;
110 case (
ETetraedro) :
return TPZRefTetrahedra::NSubEl;
111 case (
EPiramide) :
return TPZRefPyramid::NSubEl;
112 case (
EPrisma) :
return TPZRefPrism::NSubEl;
113 case (
ECube) :
return TPZRefCube::NSubEl;
115 PZError <<
"TPZIdentifyRefPattern::UniformSubElem ERROR unknown eltype : " << eltype << endl;
121 string fullfilename = fPath;
125 fullfilename +=
"Point_";
129 fullfilename +=
"Linear_";
133 fullfilename +=
"Triang_";
137 fullfilename +=
"Quad_";
141 fullfilename +=
"Tetra_";
145 fullfilename +=
"Piram_";
149 fullfilename +=
"Prism_";
153 fullfilename +=
"Hexa_";
157 PZError <<
"TPZIdentifyRefPattern::GetUniform ERROR unknown eltype : " << eltype << endl;
161 fullfilename +=
"Unif.rpt";
168 string fullfilename = fPath;
172 fullfilename +=
"Point_";
176 fullfilename +=
"Linear_";
180 fullfilename +=
"Triang_";
184 fullfilename +=
"Quad_";
188 fullfilename +=
"Tetra_";
192 fullfilename +=
"Piram_";
196 fullfilename +=
"Prism_";
200 fullfilename +=
"Hexa_";
204 PZError <<
"TPZIdentifyRefPattern::GetUniform ERROR unknown eltype : " << eltype << endl;
208 fullfilename +=
"Unif.rpt";
int IdentifySide(TPZGeoEl *father, TPZVec< TPZGeoEl *> subelem)
Identify the side of the refinement pattern.
void InsertRefPattern(TPZAutoPointer< TPZRefPattern > &refpat)
Insert the refinement pattern in the list of availabe refinement patterns assigns an Id to refPattern...
Contains the TPZRefQuad class which implements the uniform refinement of a geometric quadrilateral el...
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
Defines enum MElementType and contains the implementation of MElementType_NNodes(...) functions.
This class implements a simple vector storage scheme for a templated class T. Utility.
Contains the TPZIdentifyRefPattern class which identifies the refinement pattern given the father ele...
virtual int NSides() const =0
Returns the number of connectivities of the element.
virtual int SideDimension(int side) const =0
Return the dimension of side.
TPZAutoPointer< TPZRefPattern > FindRefPattern(TPZAutoPointer< TPZRefPattern > &refpat)
Check whether the refinement pattern already exists.
Contains the TPZRefPyramid class which implements the uniform refinement of a geometric hexahedral el...
TPZRefPatternDataBase gRefDBase
External variable to data base of patterns.
TPZAutoPointer< TPZRefPattern > GetUniform(TPZGeoEl *gel)
Contains the TPZRefPrism class which implements the uniform refinement of a geometric prism element...
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
int UniformSubElem(int eltype)
Returns the number of subelements of a uniform refinement \ pattern for the specified element type...
#define DebugStop()
Returns a message to user put a breakpoint in.
virtual MElementType Type() const =0
Returns the element type acording to pzeltype.h.
Contains declaration of the TPZAutoPointer class which has Increment and Decrement actions are mutexe...
Groups all classes which model the h refinement These classes are used as template arguments of...
Contains the TPZRefTriangle class which implements the uniform refinement of a geometric triangular e...
Contains the TPZRefTetrahedra class which implements the uniform refinement of a geometric tetrahedra...
Contains the TPZRefPatternDataBase class which defines data base of patterns.
Defines the topology of the current refinement pattern to a mesh. Refine.
MElementType
Define the element types.
To store a side and its nodes indexes. Getting data.
TPZIdentifyRefPattern(std::string &path)
Contains the TPZRefLinear class which implements the uniform refinement of a geometric linear element...
int64_t NElements() const
Returns the number of elements of the vector.
Contains the TPZRefCube class which implements the uniform refinement of a geometric hexahedral eleme...
Contains the TPZRefPoint class which implements the uniform refinement of a geometric point element...
#define PZError
Defines the output device to error messages and the DebugStop() function.
TPZAutoPointer< TPZRefPattern > GetRefPattern(TPZGeoEl *father, TPZVec< TPZGeoEl *> subelem)
Returns the refinement pattern that generates the given refinement.
TPZAutoPointer< TPZRefPattern > GetSideRefPattern(TPZGeoEl *gel, int side)