NeoPZ
tpzgeoelrefpattern.h
Go to the documentation of this file.
1 
6 #ifndef TPZGEOELREFPATTERN_H
7 #define TPZGEOELREFPATTERN_H
8 #include "pzgeoelrefless.h"
9 #include "TPZRefPattern.h"
10 #include "TPZRefPatternTools.h"
11 #include "TPZRefPatternDataBase.h"
12 #include "pzvec.h"
13 #include "pzlog.h"
14 
15 #ifdef LOG4CXX
16 static LoggerPtr loggerrefpattern(Logger::getLogger("pz.mesh.tpzgeoelrefpattern"));
17 #endif
18 
19 class TPZGeoElSide;
20 class TPZCompMesh;
21 class TPZCompEl;
22 template<class T,int N>
23 class TPZStack;
24 class TPZRefPattern;
25 
36 template <class TGeo>
37 class TPZGeoElRefPattern : public TPZGeoElRefLess<TGeo> {
38 
41 
42 public:
43  typedef TGeo Geo;
48 
50  TPZGeoElRefPattern(int64_t id,TPZVec<int64_t> &nodeindexes,int matind,TPZGeoMesh &mesh);
52  TPZGeoElRefPattern(TPZVec<int64_t> &nodeindices,int matind,TPZGeoMesh &mesh);
54  TPZGeoElRefPattern(TPZVec<int64_t> &nodeindices,int matind,TPZGeoMesh &mesh,int64_t &index);
55 
57  int HasSubElement() const override
58  {
59  return fSubEl.NElements() && fSubEl[0]!=-1;
60  }
61 
62  void SetSubElement(int id, TPZGeoEl *el) override;
63 
65  REAL RefElVolume() override;
66 
68  void MidSideNodeIndex(int side,int64_t &index) const override;
69 
71  void MidSideNodeIndices(int side,TPZVec<int64_t> &indices) const override;
72 
77  int NSubElements() const override;
78 
80  int NSideSubElements(int side) const override;
81 
83  TPZGeoEl *SubElement(int is) const override;
84 
87  TPZGeoElSide SideSubElement(int side,int position);
88 
89  TPZTransform<> GetTransform(int side,int son) override;
90 
91  virtual int FatherSide(int side, int son) override;
92 
94  virtual void Divide(TPZVec<TPZGeoEl *> &pv) override;
95 
96  virtual void GetSubElements2(int side, TPZStack<TPZGeoElSide> &subel) const override;
97 
99  virtual void SetRefPattern(TPZAutoPointer<TPZRefPattern> refpat ) override;
100 
103  {
104  return fRefPattern;
105  }
106 
107  virtual void Print(std::ostream & out) override;
108 
109  virtual void ResetSubElements() override;
110 
116  public:
117 int ClassId() const override;
118 
119  void Read(TPZStream &str, void *context) override;
120  void Write(TPZStream &str, int withclassid) const override;
121  virtual TPZGeoEl * Clone(TPZGeoMesh &DestMesh) const override;
122 
125  virtual TPZGeoEl * ClonePatchEl(TPZGeoMesh &DestMesh,
126  std::map<int64_t,int64_t> &gl2lcNdIdx,
127  std::map<int64_t,int64_t> &gl2lcElIdx) const override;
128 
129 
131 
139  TPZGeoElRefPattern ( TPZGeoMesh &DestMesh,
140  const TPZGeoElRefPattern<TGeo> &cp,
141  std::map<int64_t,int64_t> &gl2lcNdIdx,
142  std::map<int64_t,int64_t> &gl2lcElIdx );
143 
144 };
145 
146 template <class TGeo>
148  return Hash("TPZGeoElRefPattern") ^ TPZGeoElRefLess<TGeo>::ClassId() << 1;
149 }
150 
153  MElementType type,
154  TPZVec<int64_t>& nodeindexes,
155  int matid,
156  int64_t& index);
157 
158 //--| IMPLEMENTATION |----------------------------------------------------------
159 
160 template<class TGeo>
162  if (!fRefPattern){
163  PZError << "Error at " << __PRETTY_FUNCTION__ << " at line " << __LINE__ << " - this->GetRefPattern() is NULL\n";
164  return;
165  }//if
166  int nsubel = this->GetRefPattern()->NSubElements();
167  if (id<0 || id >nsubel){
168  PZError << "TPZGeoElRefPattern::Trying do define subelement :" << id << std::endl;
169  return;
170  }
171  if (el)
172  {
173  fSubEl[id] = el->Index();
174  }
175  else
176  {
177  fSubEl[id] = -1;
178  }
179  return;
180 }
181 
182 template<class TGeo>
184  return TGeo::RefElVolume();
185 }
186 
187 template<class TGeo>
188 void TPZGeoElRefPattern<TGeo>::MidSideNodeIndex(int side,int64_t &index) const {
189  index = -1;
190  int i,j;
191  if(side<0 || side>this->NSides()-1) {
192  PZError << "TPZGeoElRefPattern::MidSideNodeIndex. Bad parameter side = " << side << std::endl;
193  return;
194  }
195  //corner side
196  if(side<this->NCornerNodes()) {//o n�medio do lado 0 �o 0 etc.
197  index = this->NodeIndex(side);
198  return;
199  }
200  //o n�medio da face �o centro e o n�medio do centro �o centro
201  //como n�de algum filho se este existir
202  //caso tenha filhos �o canto de algum filho, se n� tiver filhos retorna -1
203  if(HasSubElement()) {
204  //side -= NCornerNodes();
205  //index =(gel->SubElement(MidSideNodes[side][0]))->NodeIndex(MidSideNodes[side][1]);
206  int nsubel = this->NSideSubElements(side);
208  GetSubElements2(side,subels);
209  // Nao sei porque deve se fazer esta execao
210  if (nsubel == 1) {
211  subels[0].Element()->MidSideNodeIndex(subels[0].Side(),index);
212  return;
213  }
214  TPZStack <int64_t> msnindex;
215  // este sidenodeindex pode nao existir. Normalmente o numero de nos de um elemento e igual
216  // NNodes. Quer dizer se o lado e maior igual NNodes, este metodo nao devolvera nada
217 
218  int64_t subnodeindex;
219  for (i=0;i<nsubel;i++){
220  if(subels[i].Side() >= subels[i].Element()->NCornerNodes()) continue;
221  subnodeindex = subels[i].SideNodeIndex(0);
222  msnindex.Push(subnodeindex);
223  }
224  if(msnindex.NElements() > 1) {
225  std::cout << "TPZGeoElRefPattern<TGeo>::MidSideNodeIndex element with more than one midsidenodeindex..." << std::endl;
226  }
227  if (msnindex.NElements() == 1) index = msnindex[0];
228  else if(msnindex.NElements() == 0) {
229  index = -1;
230  } else {
231  TPZVec<REAL> centerpt(this->Dimension(),0.);
232  TPZVec<REAL> auxpt(this->Dimension(),0.);
233  this->CenterPoint(side,auxpt);
234  this->X(auxpt,centerpt);
235 
236  REAL dif = 1e6;
237  REAL aux = 0;
238  index = msnindex[0];
239  for (i=0;i<msnindex.NElements();i++){
240  for (j=0;j<this->Dimension();j++)
241  aux += (this->Mesh()->NodeVec()[msnindex[i]].Coord(j) - centerpt[j]) *
242  (this->Mesh()->NodeVec()[msnindex[i]].Coord(j) - centerpt[j]);
243  if (aux < dif){
244  dif = aux;
245  index = msnindex[i];
246  }
247  }
248  }
249  }
250 }
251 
252 template<class TGeo>
254  if (!fRefPattern) return 0;
255  return this->GetRefPattern()->NSubElements();
256 }
257 
258 template<class TGeo>
260 {
261  int is;
262  for (is=0;is<NSubElements();is++)
263  {
264  TPZGeoEl *gel = SubElement(is);
265  if (gel) {
266  int64_t noFather = -1;
267  gel->SetFatherIndex(noFather);
268  }
269  fSubEl[is] = -1;
270  }
271  /* Delete and reset the fRefPattern.
272  Once the sons are removed, fRefPattern could be also deleted.
273  The user can keep the fRefPattern using Get and Set methods.*/
274  if(this->fRefPattern) this->fRefPattern=NULL;
275 }
276 
277 template<class TGeo>
279  if (!fRefPattern) return 0;
280  return this->GetRefPattern()->NSideSubGeoElSides(side);
281 }
282 
283 template<class TGeo>
285  if (!fRefPattern) return 0;
286  int nsubel = this->GetRefPattern()->NSubElements();
287  if(is<0 || is>= nsubel){
288  std::cout << "TPZGeoElRefPattern::SubElement index error is= " << is << std::endl;
289  DebugStop();
290  }
291  return (fSubEl[is] == -1) ? 0 : this->Mesh()->ElementVec()[fSubEl[is]];
292 }
293 
294 template<class TGeo>
297  if(!fRefPattern) return tmp;
298  TPZGeoElSide subGeoEl;
299  this->GetRefPattern()->SideSubGeoElSide(side,position,subGeoEl);
300  if (fSubEl[subGeoEl.Id()] == -1) {
301  PZError << "TPZGeoElRefPattern<TGeo>::SideSubElement : Error subelement not found for side "
302  << side << " position " << position << std::endl;
303  return TPZGeoElSide();
304  }
305  return TPZGeoElSide (SubElement(subGeoEl.Id()),subGeoEl.Side());
306 }
307 
308 template<class TGeo>
310  TPZTransform<> trf;
311  if(!fRefPattern) return trf;
312  return this->GetRefPattern()->Transform(side,son);
313 }
314 
315 template<class TGeo>
317 
318  if(!fRefPattern) return;
319 
320  //A classe TPZRefPattern nao esta contemplando os nos
321  TPZGeoEl * reffather = this->GetRefPattern()->Element(0);
322  if (side < reffather->NCornerNodes())
323  {
324  TPZGeoElSide thisside (reffather,side);
325  TPZGeoElSide neighbour = thisside.Neighbour();
326  if(!neighbour) DebugStop();
327  while(neighbour.Exists() && neighbour != thisside)
328  {
329  TPZGeoEl *gel = neighbour.Element();
330  TPZGeoEl *father = gel->Father();
331  if (father == reffather)
332  {
333  int64_t sonid = neighbour.Element()->Id()-1; //o id 0 e sempre do pai por definicao da classe
334  int sonside = neighbour.Side();
335  TPZGeoElSide sideson (SubElement(sonid),sonside);
336  subel.Push(sideson);
337  }
338  neighbour = neighbour.Neighbour();
339  }
340  return;
341  }
342 
343  TPZVec<TPZGeoElSideIndex> sideIndexes;
344  this->GetRefPattern()->InternalSidesIndexes(side, sideIndexes);
345  int64_t size = sideIndexes.NElements();
346  //subel.Resize(size);
347  for(int64_t el = 0; el < size; el++)
348  {
349  int64_t subelIndex = sideIndexes[el].ElementIndex() - 1;
350  int subelSide = sideIndexes[el].Side();
351  TPZGeoEl *mysub = SubElement(subelIndex);
352  subel.Push(TPZGeoElSide(mysub, subelSide));
353  }
354 }
355 
356 template<class TGeo>
358  if (!fRefPattern) {
359  MElementType typeel = this->Type();
360  if(typeel == EPoint)
361  return;
362  if(!gRefDBase.GetUniformRefPattern(typeel))
363  {
365  }
367  std::list<TPZAutoPointer<TPZRefPattern> > compat;
369  std::list<TPZAutoPointer<TPZRefPattern> >::iterator it = compat.begin();
370  while(it != compat.end()){
371  if(*it == uniform) break;
372  it++;
373  }
374  if(it != compat.end())
375  {
376  this->SetRefPattern(uniform);
377  }
378  else
379  {
380  PZError << "TPZGeoElRefPattern<TGeo>::Divide ERROR : Undefined Refinement Pattern!" << std::endl;
381  SubElVec.Resize(0);
382  return;
383  }
384  }
385  int i;
386  int NSubEl = this->GetRefPattern()->NSubElements();
387  if(HasSubElement()) {
388  SubElVec.Resize(NSubEl);
389  for(i=0;i<NSubEl;i++) SubElVec[i] = SubElement(i);
390 #ifdef LOG4CXX
391  {
392  std::stringstream sout;
393  sout << "Trying to divide element which has subelements " << this->Index() << std::endl;
394  sout << "Subelement indices ";
395  for(i=0; i<NSubEl; i++) sout << SubElVec[i]->Index() << " ";
396  LOGPZ_WARN(loggerrefpattern,sout.str());
397  }
398 #endif
399  return;//If exist fSubEl return this sons
400  }
401  int64_t index;
402  int j, k, sub, matid=this->MaterialId();
403 
404  int64_t totalnodes = this->GetRefPattern()->NNodes();
405  TPZManVector<int64_t,30> np(totalnodes,0);
406  int nnodes = this->NCornerNodes();
407 
408  for(j=0;j<nnodes;j++) {
409  np[this->GetRefPattern()->Element(0)->NodeIndex(j)] = this->NodeIndex(j);
410  }
411  this->GetRefPattern()->CreateNewNodes (this, np);
412  //std::cout << "NewNodeIndexes : " << np << std::endl;
413 
414  // creating new subelements
415  for(i=0;i<NSubEl;i++) {
416  int subcorner = this->GetRefPattern()->Element(i+1)->NCornerNodes();
417  TPZManVector<int64_t,30> cornerindexes(subcorner);
418  for(j=0;j<subcorner;j++) {
419  int64_t cornerid = this->GetRefPattern()->Element(i+1)->NodeIndex(j);
420  cornerindexes[j] = np[cornerid];
421  }
422  //std::cout << "Subel corner " << cornerindexes << std::endl;
423  TPZGeoEl *subel = this->CreateGeoElement((MElementType)this->GetRefPattern()->Element(i+1)->Type(),cornerindexes,matid,index);
424  SetSubElement(i,subel);
425  }
426 
427  SubElVec.Resize(NSubEl);
428  for(sub=0;sub<NSubEl;sub++) {
429  SubElVec[sub] = SubElement(sub);
430  SubElVec[sub]->SetFather(this);
431  SubElVec[sub]->SetFatherIndex(this->fIndex);
432  }
433 
434  for(i=0;i<NSubEl;i++) {
435  //std::cout << "SubElement " << i << std::endl;
436  TPZGeoEl *refsubel = this->GetRefPattern()->Element(i+1);
437  for (j=0;j<refsubel->NSides();j++){
438  //std::cout << "\t Side " << j << std::endl;
439  TPZGeoElSide thisside (refsubel,j);
440  TPZGeoElSide refneigh = refsubel->Neighbour(j);
441  if(refneigh.Exists() && refneigh != thisside) {
442  //como nao me deixam guardar o index do elemento geometrico...
443  for (k=0;k<NSubEl+1;k++){
444  if (this->GetRefPattern()->Element(k) == refneigh.Element() && k-1 != i){
445  // std::cout << "\t\t\tFound subel " << k << " side of subel " << refneigh.Side()
446  // << "For subelement " << i << " side " << j << std::endl;
447  TPZGeoElSide neighbour;
448  if(k) {
449  neighbour = TPZGeoElSide(SubElement(k-1),refneigh.Side());
450  } else {
451  neighbour = TPZGeoElSide(this, refneigh.Side());
452  }
453  TPZGeoElSide gs(SubElement(i),j);
454  if(!gs.NeighbourExists(neighbour)) gs.SetConnectivity(neighbour);
455  break;
456  }
457  }
458  if(k == NSubEl+1) {
459  //std::cout << "TPZGeoElRefPattern<TGeo>::Divide inconsistent datastructure subelement "
460  // << i << " Side " << j << std::endl;
461  }
462  } else {
464  }
465  }
466  }
467 
469 #ifdef LOG4CXX
470  {
471  if (loggerrefpattern->isDebugEnabled())
472  {
473  std::stringstream sout;
474  sout << "Dividing element " << this->Index() << std::endl;
475  sout << "Subelement indices ";
476  for(i=0; i<NSubEl; i++) sout << SubElVec[i]->Index() << " ";
477  LOGPZ_DEBUG(loggerrefpattern,sout.str())
478  }
479  }
480 #endif
481 }
482 
483 template<class TGeo> int TPZGeoElRefPattern<TGeo>::FatherSide(int side, int son){
484  int res = -1;
485  if(!fRefPattern) return res;
486  return this->GetRefPattern()->FatherSide(side,son);
487 
488 }
489 
490 template<class TGeo>
492  if(!fRefPattern || !HasSubElement() || side < this->NCornerNodes()) {
493  indices.Resize(0);
494  return;
495  }
497  TPZVec<TPZGeoElSideIndex> nodeIndexes;
498  this->GetRefPattern()->InternalNodesIndexes(side, nodeIndexes);
499 
500  int64_t nsub = nodeIndexes.NElements();
501  indices.Resize(nsub);
502  int64_t is;
503  int64_t counter = 0;
504  for(is=0; is<nsub; is++)
505  {
506  TPZGeoEl *subel = SubElement(nodeIndexes[is].ElementIndex() - 1);
507  indices[counter] = subel->NodeIndex(nodeIndexes[is].Side());
508  counter++;
509  }
510  indices.Resize(counter);
511 }
512 
514 template<class TGeo>
516 
517 #ifdef HUGE_DEBUG
518  if (!refpat) {
519  PZError << "Error trying to set a null refinement pattern objetct" << std::endl;
520  return;
521  }
522 #endif
523 
524  if(fRefPattern == refpat)
525  {
526  return;
527  }
528  else if(this->HasSubElement())
529  {
530  LOGPZ_ERROR ( loggerrefpattern, "\nTrying to set an refPattern to geoEl that is already refined!\nThis try was skipped!\n\n" );
531  std::cout << "Trying to set an refPattern to geoEl that is already refined!\nThis try was skipped!\n\n";
532 
533  return;
534  }
535  fRefPattern = refpat;
536  int i;
537  int nsubel = refpat->NSubElements();
538  fSubEl.Resize(nsubel);
539  for(i=0;i<nsubel;i++) fSubEl[i] = -1;
540 }
541 
542 template<class TGeo>
543 void TPZGeoElRefPattern<TGeo>::Print(std::ostream & out)
544 {
546 
547  if(fRefPattern)
548  {
549  fRefPattern->ShortPrint(out);
550  out << std::endl;
551  }
552 }
553 
554 #include "tpzgeoelrefpattern.h.h"
555 
556 #endif
virtual TPZGeoEl * CreateGeoElement(MElementType type, TPZVec< int64_t > &nodeindexes, int matid, int64_t &index) override
Creates a geometric element according to the type of the father element.
virtual int64_t NodeIndex(int node) const override
Returns the index of the ith node the index is the location of the node in the nodevector of the mesh...
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.
Contains declaration of TPZGeoElRefLess class which implements the mapping between the master element...
Implements a vector class which allows to use external storage provided by the user. Utility.
Definition: pzquad.h:16
virtual void Print(std::ostream &out) override
Print all relevant data of the element to cout.
int MaterialId() const
Returns the material index of the element.
Definition: pzgeoel.h:250
virtual void SetNeighbour(int side, const TPZGeoElSide &neighbour)=0
Fill in the data structure for the neighbouring information.
clarg::argInt nsub("-nsub", "number of substructs", 4)
virtual void SetRefPattern(TPZAutoPointer< TPZRefPattern > refpat) override
Defines the refinement pattern. It&#39;s used only in TPZGeoElRefPattern objects.
void InitializeUniformRefPattern(MElementType elType)
Initialize the uniform refinement pattern from hard coaded data for an specific geometric element...
Templated vector implementation.
TPZGeoEl * Element(int iel)
It returns the element number iel from the stack of elements of the geometric mesh.
virtual int NCornerNodes() const =0
Returns the number of corner nodes of the element.
REAL RefElVolume() override
Volume of the master element.
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
Definition: pzgeoelside.h:83
Implements the mapping between the master element and deformed element. Geometry. ...
#define LOGPZ_WARN(A, B)
Define log for warnings.
Definition: pzlog.h:91
TPZGeoElSide Neighbour() const
Definition: pzgeoel.h:754
AutoPointerMutexArrayInit tmp
virtual void Divide(TPZVec< TPZGeoEl *> &pv) override
Divides the element and puts the resulting elements in the vector.
TPZGeoMesh * Mesh() const
Returns the mesh to which the element belongs.
Definition: pzgeoel.h:220
virtual int NSides() const =0
Returns the number of connectivities of the element.
TPZTransform Transform(int subElSide, int sub)
It returns the TPZTransform associated with a certain sub-element&#39;s side to the father&#39;s coordinates...
virtual int64_t NodeIndex(int i) const =0
Returns the index of the ith node the index is the location of the node in the nodevector of the mesh...
void InternalNodesIndexes(int side, TPZVec< TPZGeoElSideIndex > &nodeIndexes)
TPZRefPatternDataBase gRefDBase
External variable to data base of patterns.
static void GetCompatibleRefPatterns(TPZGeoEl *gel, std::list< TPZAutoPointer< TPZRefPattern > > &refs)
Search for refpatterns that could be used by a given element with respect to their neighbours...
virtual TPZAutoPointer< TPZRefPattern > GetRefPattern() const override
Returns the refinement pattern associated with the element.
void CreateNewNodes(TPZGeoEl *gel, TPZVec< int64_t > &newnodeindexes)
This method is used to create / identify the nodes of the refined elements.
TPZVec< int64_t > fSubEl
virtual TPZGeoEl * ClonePatchEl(TPZGeoMesh &DestMesh, std::map< int64_t, int64_t > &gl2lcNdIdx, std::map< int64_t, int64_t > &gl2lcElIdx) const override
Creates a clone of this element into a new patch mesh.
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object reallocating the necessary storage, copying the existing objects to the new...
Definition: pzvec.h:373
void Write(TPZStream &str, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
void Read(TPZStream &str, void *context) override
read objects from the stream
virtual void CenterPoint(int side, TPZVec< REAL > &masscent) const override
It returns the coordinates of the center of the side of the element.
void Push(const T object)
Pushes a copy of the object on the stack.
Definition: pzstack.h:80
virtual int NSides() const override
Returns the number of connectivities of the element.
TPZAutoPointer< TPZRefPattern > GetUniformRefPattern(MElementType type)
Retrieves the uniform refinement pattern for given element type.
int HasSubElement() const override
Returns 1 if the element has subelements along side.
void InternalSidesIndexes(int side, TPZVec< TPZGeoElSideIndex > &sideIndexes)
Fill a vector with TPZGeoElSideIndex_s with respect to internal subelements of a given side...
virtual TPZGeoEl * Clone(TPZGeoMesh &DestMesh) const override
int NSideSubElements(int side) const override
Returns the number of subelements as returned by GetSubElements(side)
Implements a generic geometric element which is refined according to a generic refinement pattern...
Definition: pzgmesh.h:35
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
int FatherSide(int side, int sub) const
Returns the father side associated with a given side of a certain sub element.
virtual void SetFatherIndex(int64_t fatherindex)
Sets the father element index This method is not called SetFather in order to avoid implicit conversi...
Definition: pzgeoel.h:490
virtual void ResetSubElements() override
Reset all subelements to NULL.
virtual int Dimension() const override
Returns the dimension of the element.
int64_t Index() const
Returns the index of the element within the element vector of the mesh.
Definition: pzgeoel.h:730
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
Definition: pzlog.h:87
virtual void X(TPZVec< REAL > &coordinate, TPZVec< REAL > &result) const override
Returns the coordinate in real space of the point coordinate in the master element space...
TPZAdmChunkVector< TPZGeoNode > & NodeVec()
Definition: pzgmesh.h:140
int64_t fIndex
Index of the element in the element vector.
Definition: pzgeoel.h:63
string res
Definition: test.py:151
virtual MElementType Type() const override
Returns the type of the element acording to the definition in pzeltype.h.
virtual int NCornerNodes() const override
Returns the number of corner nodes of the element.
TPZGeoElRefPattern()
Default constructor.
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/...
void SideSubGeoElSide(int fatherSide, int subElPos, TPZGeoElSide &subGeoEl) const
Gives information about the ith subelement contained in a given father&#39;s side.
virtual TPZGeoElSide Neighbour(int side)=0
Returns a pointer to the neighbour and the neighbourside along side of the current element...
#define LOGPZ_ERROR(A, B)
Define log for errors (cout)
Definition: pzlog.h:93
void MidSideNodeIndex(int side, int64_t &index) const override
Returns the midside node index along a side of the element.
Contains the TPZRefPattern class which defines the topology of the current refinement pattern to a me...
virtual int ClassId() const override
Define the class id associated with the class.
int32_t Hash(std::string str)
Definition: TPZHash.cpp:10
int64_t Id()
TPZTransform GetTransform(int side, int son) override
TPZGeoEl * Element() const
Definition: pzgeoelside.h:162
int NSideSubGeoElSides(int fatherSide) const
Returns the number of TPZGeoElSides associated with a father&#39;s side.
~TPZGeoElRefPattern()
Default destructor.
virtual void Print(std::ostream &out) override
Print all relevant data of the element to cout.
Contains the TPZRefPatternDataBase class which defines data base of patterns.
Defines the topology of the current refinement pattern to a mesh. Refine.
Definition: TPZRefPattern.h:77
int64_t Id() const
Returns the Id of the element.
Definition: pzgeoel.h:223
int NSubElements() const
This class implements a geometric mesh for the pz environment. Geometry.
Definition: pzgmesh.h:48
MElementType
Define the element types.
Definition: pzeltype.h:52
This class implements a stack object. Utility.
Definition: pzcheckmesh.h:14
void MidSideNodeIndices(int side, TPZVec< int64_t > &indices) const override
Returns the midside node indices along a side of the element.
Implements computational mesh. Computational Mesh.
Definition: pzcmesh.h:47
int Side() const
Definition: pzgeoelside.h:169
int Exists() const
Definition: pzgeoelside.h:175
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
int64_t NElements() const
Returns the number of elements of the vector.
Definition: pzvec.h:190
Implements an affine transformation between points in parameter space. Topology Utility.
Definition: pzmganalysis.h:14
Contains the implementation of the TPZGeoElRefPattern methods.
void SetSubElement(int id, TPZGeoEl *el) override
Sets the subelement of index i.
int ClassId() const override
Define the class id associated with the class.
Defines the interface of a computational element. Computational Element.
Definition: pzcompel.h:59
virtual void SetSubElementConnectivities()
Initializes the external connectivities of the subelements.
Definition: pzgeoel.cpp:563
TPZGeoEl * Father() const
Computes the normal vectors needed for forming HDiv vector valued shape functions.
Definition: pzgeoel.cpp:2574
void ShortPrint(std::ostream &out=std::cout) const
int NSubElements() const override
Returns the number of subelements of the element independent of the fact whether the element has alr...
Contains the TPZRefPatternTools class which defines tools of pattern.
TPZGeoEl * SubElement(int is) const override
Returns a pointer to the subelement is.
TPZGeoElSide SideSubElement(int side, int position)
Returns a pointer and a side of the subelement of the element at the side and the indicated position...
#define PZError
Defines the output device to error messages and the DebugStop() function.
Definition: pzerror.h:15
TPZGeoEl * CreateGeoElementPattern(TPZGeoMesh &mesh, MElementType type, TPZVec< int64_t > &nodeindexes, int matid, int64_t &index)
Creates TPZGeoElRefPattern geometric element based over type.
virtual int FatherSide(int side, int son) override
TPZAdmChunkVector< TPZGeoEl * > & ElementVec()
Methods for handling pzlists.
Definition: pzgmesh.h:138
TPZAutoPointer< TPZRefPattern > fRefPattern
int NNodes() const
Returns the number of nodes of the mesh.