NeoPZ
pzgeoel.h
Go to the documentation of this file.
1 
6 #ifndef GEOELEMHPP
7 #define GEOELEMHPP
8 
9 #include <iostream>
10 
11 #include "TPZSavable.h"
12 #include "pzerror.h"
13 #include "pzreal.h"
14 #include "pzeltype.h"
15 #include "pztrnsform.h"
16 #include "doxmesh.h"
17 #include "pzfmatrix.h"
18 #include "Hash/TPZHash.h"
19 
20 #include "pzgeoelside.h"
21 #ifdef _AUTODIFF
22 #include "fadType.h"
23 #endif
24 
25 class TPZGeoNode;
26 class TPZCompMesh;
27 class TPZCompEl;
28 class TPZGeoMesh;
29 class TPZCompElSide;
30 class TPZIntPoints;
31 class TPZRefPattern;
32 template<class T>
33 class TPZVec;
34 template<class T, int N>
35 class TPZStack;
36 
43 class TPZGeoEl : public virtual TPZSavable {
44 
45 protected:
46 
49 
51  int64_t fId;
52 
54  int fMatId;
55 
58 
60  int64_t fFatherIndex;
61 
63  int64_t fIndex;
64 
67 
70 
71 public:
72 
74  TPZGeoEl * EldestAncestor() const;
75 
77 // virtual void Directions(int side,TPZVec<REAL> &pt, TPZFMatrix<REAL> &directions, TPZVec<int> &vectorsides) = 0;
78 
80  virtual void HDivDirectionsMaster(TPZFMatrix<REAL> &directions) = 0;
81 
83  virtual void HDivDirections(TPZVec<REAL> &pt, TPZFMatrix<REAL> &directions, int RestrainedFace) = 0;
84 
85 #ifdef _AUTODIFF
86 
87  virtual void HDivDirections(TPZVec<REAL> &pt, TPZFMatrix<Fad<REAL> > &directions, int RestrainedFace) = 0;
88 #endif
89 
91  virtual void SetNeighbourInfo(int side, TPZGeoElSide &neigh, TPZTransform<REAL> &trans) = 0;
92 
95  return this->fNumInterfaces;
96  }
97 
100  this->fNumInterfaces++;
101  return this->fNumInterfaces;
102  }
103 
106  this->fNumInterfaces--;
107  return this->fNumInterfaces;
108  }
109 
115  virtual void GetPermutation(const int& i, TPZVec<int> &permutation) const = 0;
116 
121  virtual TPZIntPoints * CreateSideIntegrationRule(int side, int order) =0;
122 
131  void Shape1d(REAL x,int num,TPZFMatrix<REAL> &phi,TPZFMatrix<REAL> &dphi);
132 
140  void ShapePhi1d(REAL x,int num,TPZFMatrix<REAL> &phi);
141 
148  TPZGeoEl(int64_t id,int materialindex,TPZGeoMesh &mesh);
154  TPZGeoEl(int materialindex,TPZGeoMesh &mesh);
155 
162  TPZGeoEl(int materialindex,TPZGeoMesh &mesh,int64_t &index);
163 
165  TPZGeoEl(const TPZGeoEl &el) ;
166 
168  TPZGeoEl(TPZGeoMesh & DestMesh, const TPZGeoEl &cp);
169 
171  TPZGeoEl(TPZGeoMesh & DestMesh, const TPZGeoEl &cp, std::map<int64_t,int64_t> &org2clnMap);
172 
173  TPZGeoEl() : TPZRegisterClassId(&TPZGeoEl::ClassId), fMesh(0), fId(-1), fMatId(0), fReference(NULL), fFatherIndex(-1), fIndex(-1), fNumInterfaces(0) {
174  }
175 
176  virtual void Initialize()
177  {
178  }
179 
180  static int StaticClassId();
181 
182  int ClassId() const override;
183 
184  void Read(TPZStream &str, void *context) override;
185 
186  void Write(TPZStream &str, int withclassid) const override;
187 
188  virtual TPZGeoEl * Clone(TPZGeoMesh &DestMesh) const = 0;
189 
190  void GetNodeIndices( TPZVec<int64_t> &nodeindices );
191 
192  void GetNodeIndices( std::set<int64_t> &nodeindices );
193 
204  virtual TPZGeoEl * ClonePatchEl(TPZGeoMesh &DestMesh,
205  std::map<int64_t,int64_t> &gl2lcNdIdx,
206  std::map<int64_t,int64_t> &gl2lcElIdx) const = 0;
207 
209  virtual ~TPZGeoEl();
210 
212  void RemoveConnectivities();
213 
218 
220  TPZGeoMesh *Mesh() const { return fMesh;}
221 
223  int64_t Id() const { return fId; }
224 
226  virtual int NNodes() const = 0;
227 
229  virtual int NCornerNodes() const = 0;
230 
235  virtual int NPermutations() const = 0;
236 
238  TPZGeoNode* NodePtr(int i) const;
239 
241  TPZGeoNode& Node(int i) const;
242 
247  virtual int64_t NodeIndex(int i) const = 0;
248 
250  int MaterialId() const { return fMatId; }
251 
253  TPZCompEl *Reference() const;
254 
255  virtual void GetHigherSubElements(TPZVec<TPZGeoEl*> &unrefinedSons);
256 
258  virtual MElementType Type() const = 0;
260  virtual MElementType Type(int side) const = 0;
262  virtual std::string TypeName() const
263  {
264  std::cout << "ElementType should never be called\n";
265  return "Notype";
266  }
267 
268  virtual bool IsLinearMapping() const
269  {
270  return IsLinearMapping(NSides()-1);
271  }
272 
273  virtual bool IsLinearMapping(int side) const = 0;
274 
275  virtual bool IsGeoBlendEl() const
276  {
277  return false;
278  }
279 
282  virtual bool IsGeoElMapped() const{
283  return false;
284  }
285 
287  virtual int NSides() const = 0;
288 
290  virtual int NSideNodes(int side) const = 0;
291 
293  virtual TPZGeoNode *SideNodePtr(int side,int nodenum) const;
294 
296  virtual void MidSideNodeIndex(int side,int64_t &index) const = 0;
297  //@TODOFran: this method should be removed, as it is misleading. there is only one midsidenode allowed
303  virtual void MidSideNodeIndices(int side,TPZVec<int64_t> &indices) const;
304 
306  virtual int64_t SideNodeIndex(int side,int nodenum) const = 0;
307 
309  virtual int SideNodeLocIndex(int side, int nodenum) const = 0;
310 
312  virtual void HDivPermutation(int side, TPZVec<int> &permutegather);
313 
319  virtual int SideIsUndefined(int side) = 0;
320 
325  virtual int NSubElements() const = 0;
326 
328  virtual int NSideSubElements(int side) const = 0;
329 
331 // virtual void VecHdiv(TPZFMatrix<REAL> &normalvec,TPZVec<int> &sidevector )=0;
332 
334  TPZGeoEl *Father() const;
335 
338  {
339  TPZGeoEl * lowFather(this);
340  while(lowFather->Father())
341  {
342  lowFather = lowFather->Father();
343  }
344 
345  return lowFather;
346  }
347 
348 
349  int64_t FatherIndex() { return fFatherIndex; }
350 
352  void BuildBlendConnectivity();
353 
362  virtual bool ResetBlendConnectivity(const int64_t &side, const int64_t &index) = 0;
368  void SetNeighbourForBlending(int side);
369 
371 
376  virtual TPZCompEl *CreateBCCompEl(int side, int bc, TPZCompMesh &cmesh);
377 
379  virtual TPZGeoEl *CreateGeoElement(MElementType type,
380  TPZVec<int64_t>& nodeindexes,
381  int matid,
382  int64_t& index) = 0;
383 
385  virtual TPZGeoEl *CreateBCGeoEl(int side, int bc) = 0;
386 
389  int WhichSide(TPZVec<int64_t> &SideNodeIds);
390 
392  int NeighbourExists(int side,const TPZGeoElSide &gel);
393 
395  void SetMaterialId(int id) { fMatId = id;}
396 
398  virtual void SetNodeIndex(int i,int64_t nodeindex) = 0;
399 
401  virtual void SetSideDefined(int side) = 0;
402 
404  virtual TPZGeoElSide Neighbour(int side) = 0;
405 
407  virtual int64_t NeighbourIndex(int side) const = 0;
408 
410  virtual void SetNeighbour(int side,const TPZGeoElSide &neighbour) = 0;
411 
413  virtual void Print(std::ostream & out = std::cout);
414 
419  virtual void PrintTopologicalInfo(std::ostream & out = std::cout);
420 
422  void SetReference(TPZCompEl *elp);
423 
425  virtual void SetSubElement(int i, TPZGeoEl* gel) = 0;
426 
428  virtual void SetSubElementConnectivities();
429 
431  void ResetReference() { this->fReference = NULL; }
432 
435  friend std::ostream& operator<<(std::ostream &s,TPZGeoEl &el);
436 
438  virtual void Divide(TPZVec<TPZGeoEl *> &pv);
439 
441  virtual void RandomPoint(TPZVec<REAL> &pt) = 0;
442 
444  virtual int HasSubElement() const = 0;
445 
450  virtual TPZTransform<REAL> SideToSideTransform(int sidefrom,int sideto)= 0;
451 
453  virtual void ProjectPoint(int sidefrom, TPZVec<REAL> &ptin, int sideto, TPZVec<REAL> &ptout)
454  {
455  TPZTransform<REAL> tr = SideToSideTransform(sidefrom, sideto);
456  tr.Apply(ptin, ptout);
457  }
458 
460  TPZTransform<REAL> Projection(int side);
461 
462  void SetIndex(int64_t index)
463  {
464  fIndex = index;
465  }
466 
467  void SetId(int64_t elId)
468  {
469  fId = elId;
470  }
471 
473  int GetTransformId2dQ(TPZVec<int> &idfrom,TPZVec<int> &idto);
474 
476  int GetTransformId2dT(TPZVec<int> &idfrom,TPZVec<int> &idto);
477 
478  virtual TPZTransform<REAL> GetTransform(int side,int son) = 0;
479 
481  void SetFather(TPZGeoEl *father)
482  {
483  if(!father) fFatherIndex = -1;
484  else fFatherIndex = father->Index();
485  }
486 
490  virtual void SetFatherIndex(int64_t fatherindex)
491  {
492  fFatherIndex = fatherindex;
493  }
494 
496  bool IsSibling(TPZGeoEl *gel)
497  {
498  if (!gel || fMesh != gel->fMesh) {
499  return false;
500  }
501  TPZGeoEl *father = Father();
502  if (father == gel) {
503  return true;
504  }
505  if (father) {
506  return father->IsSibling(gel);
507  }
508  else
509  {
510  return false;
511  }
512  }
513 
515  virtual TPZGeoEl *SubElement(int is) const = 0;
516 
518  virtual void ResetSubElements()=0;
519 
521  int Level();
522 
524  virtual int SideDimension(int side) const = 0;
525 
527  virtual int Dimension() const =0;
528 
530  virtual void AllHigherDimensionSides(int side,int targetdimension,TPZStack<TPZGeoElSide> &elsides) = 0;
531  virtual void LowerDimensionSides(int side,TPZStack<int> &smallsides) const = 0;
532 
534  void Jacobian(TPZVec<REAL> &qsi,TPZFMatrix<REAL> &jac,TPZFMatrix<REAL> &axes,REAL &detjac,TPZFMatrix<REAL> &jacinv) const;
535 
537  void JacobianXYZ(TPZVec<REAL> &qsi,TPZFMatrix<REAL> &jac,TPZFMatrix<REAL> &axes,REAL &detjac,TPZFMatrix<REAL> &jacinv) const;
538 
540  static void Jacobian(const TPZFMatrix<REAL> &gradx, TPZFMatrix<REAL> &jac,TPZFMatrix<REAL> &axes,REAL &detjac,TPZFMatrix<REAL> &jacinv);
541 
543  static void JacobianXYZ(const TPZFMatrix<REAL> &gradx, TPZFMatrix<REAL> &jac,TPZFMatrix<REAL> &axesXYZ,REAL &detjac,TPZFMatrix<REAL> &jacinv);
544 
546  virtual void X(TPZVec<REAL> &qsi,TPZVec<REAL> &result) const = 0;
547 
549  virtual void GradX(TPZVec<REAL> &qsi, TPZFMatrix<REAL> &gradx) const = 0;
550 
551 #ifdef _AUTODIFF
552 
553  virtual void X(TPZVec<Fad<REAL> > &qsi,TPZVec<Fad<REAL> > &result) const = 0;
554 
556  virtual void GradX(TPZVec<Fad<REAL> > &qsi, TPZFMatrix<Fad<REAL> > &gradx) const = 0;
557 #endif
558 
559 // void ComputeNormals(TPZMatrix<REAL> &normal);
560 
562  int ElementExists(TPZGeoEl *elem,int64_t id);
563 
571  virtual TPZGeoElSide Father2(int side) const;
572 
573  virtual int FatherSide(int side, int son);
574 
579  virtual TPZTransform<REAL> BuildTransform2(int side, TPZGeoEl *father, TPZTransform<REAL> &t);
580 
581 
587  int WhichSide(TPZVec<REAL> &pt);
588 
590  virtual void CenterPoint(int side, TPZVec<REAL> &masscent) const = 0;
591 
596  virtual void GetSubElements2(int side, TPZStack<TPZGeoElSide> &subel) const;
597 
601  virtual void GetAllSiblings(TPZStack<TPZGeoEl*> &unrefinedSons);
605  virtual void YoungestChildren(TPZStack<TPZGeoEl*> &unrefinedSons);
606 
612  void GetSubElements2(int side, TPZStack<TPZGeoElSide> &subel, int dimension) const;
613 
615  int WhichSubel() const;
616 
619 
624  void NodesCoordinates(TPZFMatrix<REAL > &cooridnates);
625 
630  bool ComputeXInverse(TPZVec<REAL> &XD, TPZVec<REAL> &ksi, REAL Tol);
631 
638  void TransformSonToFather(TPZGeoEl *ancestor, TPZVec<REAL> &ksiSon, TPZVec<REAL> &ksiAncestor);
639 
640  TPZTransform<REAL> ComputeParamTrans(TPZGeoEl *fat,int fatside, int sideson);
641 
643  REAL Volume();
644 
646  virtual REAL RefElVolume() = 0;
647 
649  virtual REAL SideArea(int side);
650 
652  static REAL QuadArea(TPZVec<TPZGeoNode *> &nodes);
653 
655  static REAL TriangleArea(TPZVec<TPZGeoNode *> &nodes);
656 
657  virtual REAL ElementRadius();
658 
659  static REAL Distance(TPZVec<REAL> &centel,TPZVec<REAL> &centface);
660 
669 // void ComputeNormals(TPZFMatrix<REAL> &normals, TPZVec<int> &vectorsides);
670 
672 // void ComputeNormalsDG(TPZVec<REAL> &pt, TPZFMatrix<REAL> &normals, TPZVec<int> &vectorsides);
673 
674 
675  virtual REAL CharacteristicSize();
676  virtual REAL SmallerEdge();
685 // void ComputeNormals(int side, TPZFMatrix<REAL> &normals, TPZVec<int> &vectorsides);
686 // void ComputeNormalsDG(int side, TPZVec<REAL> &pt, TPZFMatrix<REAL> &normals, TPZVec<int> &vectorsides);
692  void ComputePermutationNormals(int side, TPZVec<int> &indexfrom);
693 
695  int NormalOrientation(int side);
696 
699 
702 
708  bool VerifyNodeCoordinates(REAL tol = 1e-1);
709 
711  virtual bool IsInParametricDomain(const TPZVec<REAL> &pt, REAL tol = 1.e-2) = 0;
712 
720  virtual int ProjectInParametricDomain(TPZVec<REAL> &qsi, TPZVec<REAL> &qsiInDomain) = 0;
721 
727  virtual int ProjectBissectionInParametricDomain(TPZVec<REAL> &qsi, TPZVec<REAL> &qsiInDomain) = 0;
728 
730  int64_t Index() const
731  {
732  return fIndex;
733  }
734 
735 private:
738  void InitializeNeighbours();
739 };
740 
741 
743  PZError << "TPZGeoEl::Divide is called.\n";
744 }
745 
747  this->fReference = elp;
748 }
749 
751  return this->fReference;
752 }
753 
755  return fGeoEl ? fGeoEl->Neighbour(fSide) : TPZGeoElSide();
756 }
757 
758 
759 
760 #endif
virtual int64_t SideNodeIndex(int side, int nodenum) const =0
Returns the index of the nodenum node of side.
virtual REAL SmallerEdge()
Definition: pzgeoel.cpp:639
virtual void ProjectPoint(int sidefrom, TPZVec< REAL > &ptin, int sideto, TPZVec< REAL > &ptout)
Project the point from one side to another. The dimension of the points needs to be configured proper...
Definition: pzgeoel.h:453
virtual TPZGeoElSide Father2(int side) const
Returns the father/side of the father which contains the side of the sub element. ...
Definition: pzgeoel.cpp:376
REAL Volume()
Return the volume of the element.
Definition: pzgeoel.cpp:1052
Contains declaration of the TPZSavable class which defines the interface to save and restore objects ...
virtual TPZTransform< REAL > GetTransform(int side, int son)=0
virtual void LowerDimensionSides(int side, TPZStack< int > &smallsides) const =0
Implements computational element and a side. Computational Element.
Definition: pzcompel.h:632
TPZGeoNode * NodePtr(int i) const
Returns a pointer to the ith node of the element.
Definition: pzgeoel.cpp:2566
Contains declaration of TPZGeoElSide class which represents an element and its side, and TPZGeoElSideIndex class which represents an TPZGeoElSide index.
static REAL QuadArea(TPZVec< TPZGeoNode *> &nodes)
Returns the area from a quadrilateral face.
Definition: pzgeoel.cpp:1032
int MaterialId() const
Returns the material index of the element.
Definition: pzgeoel.h:250
clarg::argBool bc("-bc", "binary checkpoints", false)
virtual void SetNeighbourInfo(int side, TPZGeoElSide &neigh, TPZTransform< REAL > &trans)=0
virtual void SetNeighbour(int side, const TPZGeoElSide &neighbour)=0
Fill in the data structure for the neighbouring information.
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
static REAL TriangleArea(TPZVec< TPZGeoNode *> &nodes)
Returns the area from the triangular face.
Definition: pzgeoel.cpp:1009
virtual void RandomPoint(TPZVec< REAL > &pt)=0
Generates a random point in the master domain.
static REAL Distance(TPZVec< REAL > &centel, TPZVec< REAL > &centface)
Definition: pzgeoel.cpp:936
virtual bool IsGeoElMapped() const
Returns if is a TPZGeoElMapped< T > element.
Definition: pzgeoel.h:282
virtual TPZTransform< REAL > BuildTransform2(int side, TPZGeoEl *father, TPZTransform< REAL > &t)
Returns the transformation which maps the parameter side of the element/side into the parameter spac...
Definition: pzgeoel.cpp:386
TPZTransform< REAL > Projection(int side)
Compute the projection of the point within the interior of the element to the side of the element...
Definition: pzgeoel.cpp:1970
int64_t fFatherIndex
Index of the element from which the element is a subelement.
Definition: pzgeoel.h:60
Defines PZError.
virtual int NCornerNodes() const =0
Returns the number of corner nodes of the element.
void Write(TPZStream &str, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
Definition: pzgeoel.cpp:1663
virtual TPZGeoNode * SideNodePtr(int side, int nodenum) const
Returns the pointer to the nodenum node of side.
Definition: pzgeoel.cpp:2578
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
Definition: pzgeoelside.h:83
int64_t FatherIndex()
Definition: pzgeoel.h:349
Definition: fad.h:54
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.
Definition: pzgeopoint.h:19
TPZGeoElSide Neighbour() const
Definition: pzgeoel.h:754
virtual void Initialize()
Definition: pzgeoel.h:176
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.
virtual void Divide(TPZVec< TPZGeoEl *> &pv)
Divides the element and puts the resulting elements in the vector.
Definition: pzgeoel.h:742
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...
virtual int SideDimension(int side) const =0
Return the dimension of side.
int fMatId
Material index.
Definition: pzgeoel.h:54
void SetIndex(int64_t index)
Definition: pzgeoel.h:462
virtual void GetPermutation(const int &i, TPZVec< int > &permutation) const =0
int WhichSide(TPZVec< int64_t > &SideNodeIds)
Returns the side number which is connected to the SideNodes returns -1 if no side is found...
Definition: pzgeoel.cpp:165
virtual bool ResetBlendConnectivity(const int64_t &side, const int64_t &index)=0
void CheckSubelDataStructure()
Checks the structure of the Father() and GetSubelement2()
Definition: pzgeoel.cpp:503
Abstract class defining integration rules. Numerical Integration.
Definition: tpzintpoints.h:19
TPZTransform< REAL > ComputeParamTrans(TPZGeoEl *fat, int fatside, int sideson)
Definition: pzgeoel.cpp:845
virtual void CenterPoint(int side, TPZVec< REAL > &masscent) const =0
It returns the coordinates from the center of the side of the element in the element coordinate space...
void Read(TPZStream &str, void *context) override
read objects from the stream
Definition: pzgeoel.cpp:1652
virtual std::string TypeName() const
Returns the type of the element as a string.
Definition: pzgeoel.h:262
TPZGeoEl * EldestAncestor() const
Definition: pzgeoel.cpp:1981
virtual TPZGeoEl * SubElement(int is) const =0
Returns a pointer to the subelement is.
virtual TPZIntPoints * CreateSideIntegrationRule(int side, int order)=0
Creates an integration rule for the topology of the corresponding side and able to integrate a polyno...
TPZGeoEl * LowestFather()
Returns a pointer to the higher level father.
Definition: pzgeoel.h:337
virtual int NSideSubElements(int side) const =0
Returns the number of subelements as returned by GetSubElements2(side)
int64_t fId
Traditional element number or element id.
Definition: pzgeoel.h:51
friend std::ostream & operator<<(std::ostream &s, TPZGeoEl &el)
Equivalent to Print.
Definition: pzgeoel.cpp:314
virtual void GetAllSiblings(TPZStack< TPZGeoEl *> &unrefinedSons)
[deprecated] use YoungestChildren
Definition: pzgeoel.cpp:410
int ClassId() const override
Define the class id associated with the class.
Definition: pzgeoel.cpp:2562
void TransformSonToFather(TPZGeoEl *ancestor, TPZVec< REAL > &ksiSon, TPZVec< REAL > &ksiAncestor)
Compute the map of a paramenter point in the subelement to a parameter point in the super element...
Definition: pzgeoel.cpp:816
static const double tol
Definition: pzgeoprism.cpp:23
int Level()
Returns the number of ancestors.
Definition: pzgeoel.cpp:319
virtual TPZCompEl * CreateBCCompEl(int side, int bc, TPZCompMesh &cmesh)
Method which creates a computational boundary condition element based on the current geometric elemen...
Definition: pzgeoel.cpp:1092
int DecrementNumInterfaces()
Decrement number of TPZInterfaceElement pointing to this.
Definition: pzgeoel.h:105
virtual void SetNodeIndex(int i, int64_t nodeindex)=0
Initializes the node i of the element.
int ElementExists(TPZGeoEl *elem, int64_t id)
To test continuity.
Definition: pzgeoel.cpp:361
int WhichSubel() const
Returns the son number of the sub element gel.
Definition: pzgeoel.cpp:448
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
void SetId(int64_t elId)
Definition: pzgeoel.h:467
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
int64_t Index() const
Returns the index of the element within the element vector of the mesh.
Definition: pzgeoel.h:730
Contains TPZMatrixclass which implements full matrix (using column major representation).
virtual int FatherSide(int side, int son)
Definition: pzgeoel.cpp:381
virtual void MidSideNodeIndices(int side, TPZVec< int64_t > &indices) const
Returns the midside node indices along a side of the element.
Definition: pzgeoel.cpp:1137
void ShapePhi1d(REAL x, int num, TPZFMatrix< REAL > &phi)
Computes the values of the "num" one dimensional shapefunctions at point x, using lagrangian interpol...
Definition: pzgeoel.cpp:149
virtual void GetHigherSubElements(TPZVec< TPZGeoEl *> &unrefinedSons)
Definition: pzgeoel.cpp:2488
TPZCompEl * fReference
Reference to the element currently loaded. Pointer is given as this->Mesh()->Reference()->ElementVec(...
Definition: pzgeoel.h:57
int fNumInterfaces
A counter to indicate how many interface elements are pointing to it.
Definition: pzgeoel.h:69
int NumInterfaces()
Returns number of TPZInterfaceElement pointing to this.
Definition: pzgeoel.h:94
virtual void GetSubElements2(int side, TPZStack< TPZGeoElSide > &subel) const
This method will return a partition of the side of the current element as the union of sub elements/...
Definition: pzgeoel.cpp:392
virtual MElementType Type() const =0
Returns the element type acording to pzeltype.h.
void Jacobian(TPZVec< REAL > &qsi, TPZFMatrix< REAL > &jac, TPZFMatrix< REAL > &axes, REAL &detjac, TPZFMatrix< REAL > &jacinv) const
Compute a decomposition of the gradient of the mapping function, as a rotation matrix (Jacobian) and ...
Definition: pzgeoel.cpp:1144
virtual int SideNodeLocIndex(int side, int nodenum) const =0
Returns the local index of a node on a side.
TPZCompEl * Reference() const
Return a pointer to the element referenced by the geometric element.
Definition: pzgeoel.h:750
void BuildBlendConnectivity()
Set connectivity information elements with blend geometric map.
Definition: pzgeoel.cpp:1959
int NormalOrientation(int side)
Determine the orientation of the normal vector comparing the ids of the neighbouring elements...
Definition: pzgeoel.cpp:2370
int64_t fIndex
Index of the element in the element vector.
Definition: pzgeoel.h:63
virtual TPZGeoEl * CreateGeoElement(MElementType type, TPZVec< int64_t > &nodeindexes, int matid, int64_t &index)=0
Creates a geometric element according to the type of the father element.
virtual TPZGeoEl * CreateBCGeoEl(int side, int bc)=0
Method which creates a geometric element on the side of an existing element.
void InitializeNeighbours()
To be used after the buid connectivity. If some neighbour isn&#39;t initialized.
Definition: pzgeoel.cpp:1117
void ComputePermutationNormals(int side, TPZVec< int > &indexfrom)
Compute the set of normals along a side for defining HDiv approximation spaces.
virtual void HDivDirections(TPZVec< REAL > &pt, TPZFMatrix< REAL > &directions, int RestrainedFace)=0
virtual TPZGeoEl * ClonePatchEl(TPZGeoMesh &DestMesh, std::map< int64_t, int64_t > &gl2lcNdIdx, std::map< int64_t, int64_t > &gl2lcElIdx) const =0
Creates a clone of this element into a new patch mesh.
Creates interpolation, CompMesh and CompElement groups for Doxygen documentation. ...
virtual TPZGeoElSide Neighbour(int side)=0
Returns a pointer to the neighbour and the neighbourside along side of the current element...
void JacobianXYZ(TPZVec< REAL > &qsi, TPZFMatrix< REAL > &jac, TPZFMatrix< REAL > &axes, REAL &detjac, TPZFMatrix< REAL > &jacinv) const
Compute a decomposition of the gradient of the mapping function, as a rotation matrix (Jacobian) and ...
Definition: pzgeoel.cpp:1159
TPZGeoNode & Node(int i) const
Returns the ith node of the element.
Definition: pzgeoel.cpp:2570
void GetNodeIndices(TPZVec< int64_t > &nodeindices)
Definition: pzgeoel.cpp:2526
bool IsSibling(TPZGeoEl *gel)
return true is gel is an ancestor of the current element
Definition: pzgeoel.h:496
virtual int NSideNodes(int side) const =0
Returns the number of nodes for a particular side.
virtual int64_t NeighbourIndex(int side) const =0
Returns the neighbour index for a given side.
virtual void SetSubElement(int i, TPZGeoEl *gel)=0
Sets the subelement of index i.
virtual int HasSubElement() const =0
Return 1 if the element has subelements.
virtual bool IsInParametricDomain(const TPZVec< REAL > &pt, REAL tol=1.e-2)=0
Verifies if the parametric point pt is in the element parametric domain.
virtual int NNodes() const =0
Returns the number of nodes of the element.
virtual bool IsLinearMapping() const
Definition: pzgeoel.h:268
int NeighbourExists(int side, const TPZGeoElSide &gel)
Returns 1 if gel is a neighbour of the element along side.
Definition: pzgeoel.cpp:226
virtual void HDivDirectionsMaster(TPZFMatrix< REAL > &directions)=0
virtual void PrintTopologicalInfo(std::ostream &out=std::cout)
Prints the coordinates of all nodes (geometric)
Definition: pzgeoel.cpp:300
virtual void HDivPermutation(int side, TPZVec< int > &permutegather)
Computes the permutation for an HDiv side.
Definition: pzgeoel.cpp:2509
virtual void GradX(TPZVec< REAL > &qsi, TPZFMatrix< REAL > &gradx) const =0
Return the gradient of the transformation at the given coordinate.
virtual int SideIsUndefined(int side)=0
Returns 1 if the side has not been defined by buildconnectivity.
virtual void SetSideDefined(int side)=0
Flags the side as defined, this means no neighbouring element was found.
virtual ~TPZGeoEl()
Destructor.
Definition: pzgeoel.cpp:49
virtual int Dimension() const =0
Returns the dimension of the element.
virtual TPZTransform< REAL > SideToSideTransform(int sidefrom, int sideto)=0
Compute the transformation between the master element space of one side of an element to the master e...
Defines the topology of the current refinement pattern to a mesh. Refine.
Definition: TPZRefPattern.h:77
virtual void AllHigherDimensionSides(int side, int targetdimension, TPZStack< TPZGeoElSide > &elsides)=0
int64_t Id() const
Returns the Id of the element.
Definition: pzgeoel.h:223
bool ComputeXInverse(TPZVec< REAL > &XD, TPZVec< REAL > &ksi, REAL Tol)
Computes the XInverse and returns true if ksi belongs to master element domain.
Definition: pzgeoel.cpp:686
Implements a geometric node in the pz environment. Geometry.
Definition: pzgnode.h:31
virtual void X(TPZVec< REAL > &qsi, TPZVec< REAL > &result) const =0
Return the coordinate in real space of the point coordinate in the master element space...
virtual REAL RefElVolume()=0
Volume of the master element.
virtual REAL SideArea(int side)
Returns the area from the face.
Definition: pzgeoel.cpp:1064
This class implements a geometric mesh for the pz environment. Geometry.
Definition: pzgmesh.h:48
MElementType
Define the element types.
Definition: pzeltype.h:52
virtual int ProjectInParametricDomain(TPZVec< REAL > &qsi, TPZVec< REAL > &qsiInDomain)=0
Ortogonal projection from given qsi to a qsiInDomain (all in the element parametric domain) ...
virtual bool IsGeoBlendEl() const
Definition: pzgeoel.h:275
This class implements a stack object. Utility.
Definition: pzcheckmesh.h:14
void ResetReference()
Reset the element referenced by the geometric element to NULL.
Definition: pzgeoel.h:431
Implements computational mesh. Computational Mesh.
Definition: pzcmesh.h:47
virtual REAL CharacteristicSize()
Computes the set of normals for defining HDiv approximation spaces.
Definition: pzgeoel.cpp:604
void RemoveConnectivities()
It removes the connectivities of the element.
Definition: pzgeoel.cpp:1098
virtual TPZGeoEl * Clone(TPZGeoMesh &DestMesh) const =0
TPZGeoEl()
Definition: pzgeoel.h:173
int GetTransformId2dT(TPZVec< int > &idfrom, TPZVec< int > &idto)
Get the transform id the face to face.
Definition: pzgeoel.cpp:347
void SetReference(TPZCompEl *elp)
Make the current element reference to the computational element.
Definition: pzgeoel.h:746
virtual TPZAutoPointer< TPZRefPattern > GetRefPattern() const
Returns the refinement pattern associated with the element.
Definition: pzgeoel.cpp:1716
void SetFather(TPZGeoEl *father)
Sets the father element.
Definition: pzgeoel.h:481
void SetMaterialId(int id)
Sets the material index of the element.
Definition: pzgeoel.h:395
static TPZFMatrix< REAL > gGlobalAxes
3x3 unit matrix to be copied to the axes if the geometric element does not have a particular orientat...
Definition: pzgeoel.h:66
void Shape1d(REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Computes the values of the "num" one dimensional shapefunctions and derivatives at point x...
Definition: pzgeoel.cpp:128
virtual void SetRefPattern(TPZAutoPointer< TPZRefPattern >)
Defines the refinement pattern. It&#39;s used only in TPZGeoElRefPattern objects.
Definition: pzgeoel.cpp:1647
void NodesCoordinates(TPZFMatrix< REAL > &cooridnates)
Computes nodes coordinates of the element.
Definition: pzgeoel.cpp:2543
TPZGeoMesh * fMesh
Pointer to the mesh to which the element belongs.
Definition: pzgeoel.h:48
Contains the TPZTransform<> class which implements an affine transformation between points in paramet...
bool VerifyNodeCoordinates(REAL tol=1e-1)
Verify coordinate of element nodes checking if they are coincident to the X mapping of the corner nod...
Definition: pzgeoel.cpp:1722
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
Contains the declaration of TPZFlopCounter class and TPZCounter struct.
Implements an affine transformation between points in parameter space. Topology Utility.
Definition: pzmganalysis.h:14
virtual REAL ElementRadius()
Definition: pzgeoel.cpp:949
virtual int NPermutations() const =0
virtual void Print(std::ostream &out=std::cout)
Print all relevant data of the element to cout.
Definition: pzgeoel.cpp:238
static int StaticClassId()
Definition: pzgeoel.cpp:2558
void SetNeighbourForBlending(int side)
TPZGeoBlend need to find a non-linear neighbour.
Definition: pzgeoel.cpp:1913
This class defines the interface to save and restore objects from TPZStream objects. Persistency.
Definition: TPZSavable.h:67
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
int IncrementNumInterfaces()
Increments number of TPZInterfaceElement pointing to this.
Definition: pzgeoel.h:99
virtual int NSubElements() const =0
Returns the number of subelements of the element independent of the fact whether the element has alr...
TPZGeoEl * Father() const
Computes the normal vectors needed for forming HDiv vector valued shape functions.
Definition: pzgeoel.cpp:2574
virtual void ResetSubElements()=0
Reset all subelements to NULL.
int GetTransformId2dQ(TPZVec< int > &idfrom, TPZVec< int > &idto)
Get the transform id the face to face.
Definition: pzgeoel.cpp:330
virtual int ProjectBissectionInParametricDomain(TPZVec< REAL > &qsi, TPZVec< REAL > &qsiInDomain)=0
Projection from given qsi to a qsiInDomain (in the element boundary) using bissection method from giv...
void Apply(TPZVec< T > &vectorin, TPZVec< T > &vectorout)
Transforms the vector.
Definition: pztrnsform.cpp:121
#define PZError
Defines the output device to error messages and the DebugStop() function.
Definition: pzerror.h:15
virtual void MidSideNodeIndex(int side, int64_t &index) const =0
Returns the midside node index along a side of the element.
virtual void YoungestChildren(TPZStack< TPZGeoEl *> &unrefinedSons)
This method will return all children at the bottom of the refinement tree of the element. i.e. all children that have no subelements.
Definition: pzgeoel.cpp:431