10 static LoggerPtr logger(Logger::getLogger(
"pz.mesh.tpzgeoelement"));
13 template<
class TGeo,
class TRef>
17 for(i=0;i<TRef::NSubEl;i++)
fSubEl[i] = -1;
20 template<
class TGeo,
class TRef>
24 for(i=0;i<TRef::NSubEl;i++)
fSubEl[i] = -1;
27 template<
class TGeo,
class TRef>
31 for(i=0;i<TRef::NSubEl;i++)
fSubEl[i] = -1;
34 template<
class TGeo,
class TRef>
38 for(i=0;i<TRef::NSubEl;i++)
fSubEl[i] = -1;
41 template<
class TGeo,
class TRef>
44 for(i=0;i<TRef::NSubEl;i++)
fSubEl[i] = -1;
47 template<
class TGeo,
class TRef>
50 if (id<0 || id >(TRef::NSubEl - 1)){
51 PZError <<
"TPZGeoElement::Trying do define subelement :" 52 <<
id <<
"Max Allowed = " << TRef::NSubEl - 1 << std::endl;
66 template<
class TGeo,
class TRef>
68 return TGeo::RefElVolume();
71 template<
class TGeo,
class TRef>
74 TRef::MidSideNodeIndex(
this,side,index);
78 template<
class TGeo,
class TRef>
84 template<
class TGeo,
class TRef>
87 return TRef::NSideSubElements(side);
90 template<
class TGeo,
class TRef>
93 if(is<0 || is>(TRef::NSubEl - 1)){
94 std::cout <<
"TPZGeoElement::SubElement index error is= " << is << std::endl;
96 if(
fSubEl[is] == -1)
return 0;
102 template<
class TGeo,
class TRef>
113 template<
class TGeo,
class TRef>
116 TRef::GetSubElements(
this,side,subs);
117 return subs[position];
120 template<
class TGeo,
class TRef>
122 return TRef::GetTransform(side,son);
125 template<
class TGeo,
class TRef>
128 TRef::Divide(
this,pv);
131 template<
class TGeo,
class TRef>
135 TRef::GetSubElements(
this,side,subel);
138 template<
class TGeo,
class TRef>
144 template<
class TGeo,
class TRef>
150 template<
class TGeo,
class TRef>
152 if(&DestMesh == this->
Mesh())
162 template<
class TGeo,
class TRef>
164 std::map<int64_t,int64_t> & gl2lcNdMap,
165 std::map<int64_t,int64_t> & gl2lcElMap)
const{
170 template<
class TGeo,
class TRef>
174 int i, n = TRef::NSubEl;
175 for(i = 0; i < n; i++){
180 template<
class TGeo,
class TRef>
183 std::map<int64_t,int64_t> &gl2lcNdMap,
184 std::map<int64_t,int64_t> &gl2lcElMap):
188 int i, n = TRef::NSubEl;
189 for(i = 0; i < n; i++)
196 if (gl2lcElMap.find(cp.
fSubEl[i]) == gl2lcElMap.end())
198 std::stringstream sout;
199 sout <<
"ERROR in - " << __PRETTY_FUNCTION__
200 <<
" subelement index is not in map from original to clone indexes! Son index = " TPZGeoEl * SubElement(int is) const override
Returns a pointer to the subelement is.
REAL RefElVolume() override
Volume of the master element.
virtual void ResetSubElements() override
Reset all subelements to NULL.
virtual void Read(TPZStream &str, void *context) override
read objects from the stream
TPZTransform GetTransform(int side, int son) override
Contains definitions to LOGPZ_DEBUG, LOGPZ_INFO, LOGPZ_WARN, LOGPZ_ERROR and LOGPZ_FATAL, and the implementation of the inline InitializePZLOG(string) function using log4cxx library or not. It must to be called out of "#ifdef LOG4CXX" scope.
void Read(TPZStream &str, void *context) override
read objects from the stream
Implements a generic geometric element with a uniform refinement pattern. Geometry.
void Write(TPZStream &str, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
Implements the mapping between the master element and deformed element. Geometry. ...
int NSubElements() const override
Returns the number of subelements of the element independent of the fact hether the element has alrea...
TPZGeoMesh * Mesh() const
Returns the mesh to which the element belongs.
virtual TPZGeoEl * ClonePatchEl(TPZGeoMesh &DestMesh, std::map< int64_t, int64_t > &gl2lcNdIdx, std::map< int64_t, int64_t > &gl2lcElIdx) const override
virtual void Write(const bool val)
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
virtual void SetFatherIndex(int64_t fatherindex)
Sets the father element index This method is not called SetFather in order to avoid implicit conversi...
int64_t Index() const
Returns the index of the element within the element vector of the mesh.
virtual void Divide(TPZVec< TPZGeoEl *> &pv) override
Divides the element and puts the resulting elements in the vector.
#define LOGPZ_ERROR(A, B)
Define log for errors (cout)
virtual TPZGeoEl * Clone(TPZGeoMesh &DestMesh) const override
void MidSideNodeIndex(int side, int64_t &index) const override
Returns the midside node index along a side of the element.
This class implements a geometric mesh for the pz environment. Geometry.
This class implements a stack object. Utility.
void SetSubElement(int id, TPZGeoEl *el) override
Sets the subelement of index i.
int64_t fSubEl[TRef::NSubEl]
TPZGeoElement()
Default constructor.
int ClassId() const override
Define the class id associated with the class.
Defines the interface for saving and reading data. Persistency.
Contains declaration of TPZGeoElement class which implements a generic geometric element with a unifo...
TPZGeoElSide SideSubElement(int side, int position)
Return a pointer and a side of the subelement of the element at the side and the indicated position...
virtual void Write(TPZStream &str, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
virtual void GetSubElements2(int side, TPZStack< TPZGeoElSide > &subel) const override
This method will return a partition of the side of the current element as the union of sub elements/...
#define PZError
Defines the output device to error messages and the DebugStop() function.
int NSideSubElements(int side) const override
Returns the number of subelements as returned by GetSubElements2(side)
virtual void Read(bool &val)
TPZAdmChunkVector< TPZGeoEl * > & ElementVec()
Methods for handling pzlists.