NeoPZ
tpzchangeel.cpp
Go to the documentation of this file.
1 
5 #include "tpzchangeel.h"
6 
7 #ifdef HAVE_CONFIG_H
8 #include <pz_config.h>
9 #endif
10 #include <iostream>
11 #include <cstdlib>
12 
13 #include "tpzmathtools.h"
14 
15 #include "tpzquadraticline.h"
16 #include "tpzquadratictrig.h"
17 #include "tpzquadraticquad.h"
18 #include "tpzquadratictetra.h"
19 #include "tpzquadraticpyramid.h"
20 #include "tpzquadraticprism.h"
21 #include "tpzquadraticcube.h"
22 
23 #include "TPZGeoElement.h.h"
24 #include "pzgeoelside.h"
25 #include "pzstack.h"
26 #include "tpzgeoelrefpattern.h"
27 
28 #include <sstream>
29 using namespace std;
30 using namespace pzgeom;
31 using namespace pztopology;
32 
33 
35 {
36 }
37 //------------------------------------------------------------------------------------------------------------
38 
40 {
41 }
42 //------------------------------------------------------------------------------------------------------------
43 
44 //#define verifyNeighbourhood
46 {
47  TPZGeoEl * OldElem = Mesh->ElementVec()[ElemIndex];
48 
50 #ifdef verifyNeighbourhood
51  std::ofstream before("before.txt");
52  for(int s = 0; s < OldElem->NSides(); s++)
53  {
54  TPZGeoElSide oldSide(OldElem,s);
55  TPZGeoElSide neighSide(oldSide.Neighbour());
56  while(oldSide != neighSide)
57  {
58  before << s << "\t" << neighSide.Element()->Id() << "\t" << neighSide.Side() << "\n";
59  neighSide = neighSide.Neighbour();
60  }
61  }
62  before.close();
63  TPZGeoEl * oldFather = OldElem->Father();
64  int oldMePosition = -1;
65  if(oldFather)
66  {
67  for(int s = 0; s < oldFather->NSubElements(); s++)
68  {
69  if(oldFather->SubElement(s) == OldElem)
70  {
71  oldMePosition = s;
72  break;
73  }
74  }
75  }
76 #endif
77 
79 #ifdef PZDEBUG
80  if(!OldElem)
81  {
82  std::cout << "Null geoel on " << __PRETTY_FUNCTION__ << std::endl;
83  DebugStop();
84  }
85 #endif
86 
87  TPZGeoEl * father = OldElem->Father();
88  int which_subel = -1;
89  if (father){
90  which_subel = OldElem->WhichSubel();
91  }
92 
93  int64_t midN;
94  int nsides = OldElem->NSides();
95 
96  //backingup oldElem neighbourhood
97  TPZVec< std::vector<TPZGeoElSide> > neighbourhood(nsides);
98  TPZVec<int64_t> NodesSequence(0);
99  for(int s = 0; s < nsides; s++)
100  {
101  neighbourhood[s].resize(0);
102  TPZGeoElSide mySide(OldElem,s);
103  TPZGeoElSide neighS = mySide.Neighbour();
104  if(mySide.Dimension() == 0)
105  {
106  int64_t oldSz = NodesSequence.NElements();
107  NodesSequence.resize(oldSz+1);
108  NodesSequence[oldSz] = OldElem->NodeIndex(s);
109  }
110  if(CreateMiddleNodeAtEdge(Mesh, ElemIndex, s, midN))
111  {
112  int64_t oldSz = NodesSequence.NElements();
113  NodesSequence.resize(oldSz+1);
114  NodesSequence[oldSz] = midN;
115  }
116  while(mySide != neighS)
117  {
118  neighbourhood[s].push_back(neighS);
119  neighS = neighS.Neighbour();
120  }
121  }
122 
123  MElementType elType = OldElem->Type();
124  int64_t oldId = OldElem->Id();
125  int64_t oldMatId = OldElem->MaterialId();
126 
127  TPZGeoEl * NewElem = NULL;
128 
130  Mesh->DeleteElement(OldElem);
131 
132  switch(elType)
133  {
134  case(EOned) :
135  {
136  NewElem = new TPZGeoElRefPattern<TPZQuadraticLine>(oldId,NodesSequence,oldMatId,*Mesh);
137  break;
138  }
139  case(ETriangle) :
140  {
141  NewElem = new TPZGeoElRefPattern<TPZQuadraticTrig>(oldId,NodesSequence,oldMatId,*Mesh);
142  break;
143  }
144  case(EQuadrilateral) :
145  {
146  NewElem = new TPZGeoElRefPattern<TPZQuadraticQuad>(oldId,NodesSequence,oldMatId,*Mesh);
147  break;
148  }
149  case(ETetraedro) :
150  {
151  NewElem = new TPZGeoElRefPattern<TPZQuadraticTetra>(oldId,NodesSequence,oldMatId,*Mesh);
152  break;
153  }
154  case(EPiramide) :
155  {
156  NewElem = new TPZGeoElRefPattern<TPZQuadraticPyramid>(oldId,NodesSequence,oldMatId,*Mesh);
157  break;
158  }
159  case(EPrisma) :
160  {
161  NewElem = new TPZGeoElRefPattern<TPZQuadraticPrism>(oldId,NodesSequence,oldMatId,*Mesh);
162  break;
163  }
164  case(ECube) :
165  {
166  NewElem = new TPZGeoElRefPattern<TPZQuadraticCube>(oldId,NodesSequence,oldMatId,*Mesh);
167  break;
168  }
169  default :
170  {
171  DebugStop();
172  break;
173  }
174  }
175 
176 #ifdef PZDEBUG
177  if (!Mesh->Element(ElemIndex)) {
178  DebugStop();
179  }
180 #endif
181 
182  if(father)
183  {
184  NewElem->SetFather(father);
185  father->SetSubElement(which_subel,NewElem);
186  }
187 
188  // melhor utilizar neigh.SetConnectivity...
189  for(int s = 0; s < nsides; s++)
190  {
191  TPZGeoEl * tempEl = NewElem;
192  TPZGeoElSide tempSide(NewElem,s);
193  int byside = s;
194  for(uint64_t n = 0; n < neighbourhood[s].size(); n++)
195  {
196  TPZGeoElSide neighS = neighbourhood[s][n];
197  tempEl->SetNeighbour(byside, neighS);
198  tempEl = neighS.Element();
199  byside = neighS.Side();
200  }
201  tempEl->SetNeighbour(byside, tempSide);
202  }
203 
204  if(NewElem->HasSubElement())
205  {
206  //Mudar subelementos para TPZGeoElMapped
207  }
208 
210 #ifdef verifyNeighbourhood
211  std::ofstream after("after.txt");
212  for(int s = 0; s < NewElem->NSides(); s++)
213  {
214  TPZGeoElSide newSide(NewElem,s);
215  TPZGeoElSide neighSide(newSide.Neighbour());
216  while(newSide != neighSide)
217  {
218  after << s << "\t" << neighSide.Element()->Id() << "\t" << neighSide.Side() << "\n";
219  neighSide = neighSide.Neighbour();
220  }
221  }
222  after.close();
223  TPZGeoEl * newFather = NewElem->Father();
224  int newMePosition = -1;
225  if(newFather)
226  {
227  for(int s = 0; s < newFather->NSubElements(); s++)
228  {
229  if(newFather->SubElement(s) == NewElem)
230  {
231  newMePosition = s;
232  break;
233  }
234  }
235  }
236  if(oldFather != newFather || oldMePosition != newMePosition)
237  {
238  DebugStop();
239  }
240 #endif
241 
243  return NewElem;
244 }
245 //------------------------------------------------------------------------------------------------------------
246 
247 TPZGeoEl* TPZChangeEl::ChangeToQuarterPoint(TPZGeoMesh *Mesh, int64_t ElemIndex, int targetSide)
248 {
249  TPZGeoEl * gel = Mesh->ElementVec()[ElemIndex];
250 
251  #ifdef PZDEBUG
252  if(!gel)
253  {
254  std::cout << "Null geoel on " << __PRETTY_FUNCTION__ << std::endl;
255  DebugStop();
256  }
257  #endif
258 
259  if(gel->IsLinearMapping())
260  {
261  gel = TPZChangeEl::ChangeToQuadratic(Mesh, ElemIndex);
262  }
263 
264  MElementType gelType = gel->Type();
265 
266  TPZStack<int> targetSideNodes, targetSideEdges;
267 
268  switch(gelType)
269  {
270  case (EPoint):
271  {
272  TPZPoint::LowerDimensionSides(targetSide,targetSideNodes,0);
273  TPZPoint::LowerDimensionSides(targetSide,targetSideEdges,1);
274 
275  break;
276  }
277  case (EOned):
278  {
279  TPZLine::LowerDimensionSides(targetSide,targetSideNodes,0);
280  TPZLine::LowerDimensionSides(targetSide,targetSideEdges,1);
281 
282  break;
283  }
284  case (ETriangle):
285  {
286  TPZTriangle::LowerDimensionSides(targetSide,targetSideNodes,0);
287  TPZTriangle::LowerDimensionSides(targetSide,targetSideEdges,1);
288 
289  break;
290  }
291  case (EQuadrilateral):
292  {
293  TPZQuadrilateral::LowerDimensionSides(targetSide,targetSideNodes,0);
294  TPZQuadrilateral::LowerDimensionSides(targetSide,targetSideEdges,1);
295 
296  break;
297  }
298  case (ETetraedro):
299  {
300  TPZTetrahedron::LowerDimensionSides(targetSide,targetSideNodes,0);
301  TPZTetrahedron::LowerDimensionSides(targetSide,targetSideEdges,1);
302 
303  break;
304  }
305  case (EPiramide):
306  {
307  TPZPyramid::LowerDimensionSides(targetSide,targetSideNodes,0);
308  TPZPyramid::LowerDimensionSides(targetSide,targetSideEdges,1);
309 
310  break;
311  }
312  case (EPrisma):
313  {
314  TPZPrism::LowerDimensionSides(targetSide,targetSideNodes,0);
315  TPZPrism::LowerDimensionSides(targetSide,targetSideEdges,1);
316 
317  break;
318  }
319  case (ECube):
320  {
321  TPZCube::LowerDimensionSides(targetSide,targetSideNodes,0);
322  TPZCube::LowerDimensionSides(targetSide,targetSideEdges,1);
323 
324  break;
325  }
326  default:
327  {
328  std::cout << "Element type not found on " << __PRETTY_FUNCTION__ << std::endl;
329  DebugStop();
330  }
331  }
332 
333  std::set<int> targetSideNodes_set, targetSideEdges_set, NOTtargetSideEdges_set;
334  TPZGeoElSide targetSideEl(gel,targetSide);
335  for(int nd = 0; nd < targetSideNodes.NElements(); nd++)
336  {
337  int tsNode = targetSideNodes[nd];
338  targetSideNodes_set.insert(tsNode);
339  }
340  if(targetSideEl.Dimension() == 0)
341  {
342  targetSideNodes_set.insert(targetSide);
343  }
344  for(int ed = 0; ed < targetSideEdges.NElements(); ed++)
345  {
346  int tsEdge = targetSideEdges[ed];
347  targetSideEdges_set.insert(tsEdge);
348  }
349  if(targetSideEl.Dimension() == 1)
350  {
351  targetSideEdges_set.insert(targetSide);
352  }
353  for(int sd = gel->NCornerNodes(); sd < gel->NSides(); sd++)
354  {
355  TPZGeoElSide gelSide(gel,sd);
356  if(gelSide.Dimension() == 1 && targetSideEdges_set.find(sd) == targetSideEdges_set.end())
357  {
358  NOTtargetSideEdges_set.insert(sd);
359  }
360  else if(gelSide.Dimension() > 1)
361  {
362  break;
363  }
364  }
365 
366  const REAL dist = 0.25;
367 
368  std::set<int>::iterator it;
369  for(it = NOTtargetSideEdges_set.begin(); it != NOTtargetSideEdges_set.end(); it++)
370  {
371  int edg = *it;
372  TPZGeoElSide gelSide(gel,edg);
373 
374  int64_t initNode = gelSide.SideNodeLocIndex(0);
375  int64_t finalNode = gelSide.SideNodeLocIndex(1);
376  int64_t meshInitNode = gelSide.SideNodeIndex(0);
377  int64_t meshFinalNode = gelSide.SideNodeIndex(1);
386  int64_t meshMiddleNode = gel->NodeIndex(edg);
387  //********************
388 
389  double coordNear, coordFar;
390 
391  if(targetSideNodes_set.find(initNode) != targetSideNodes_set.end())//drag middle node to node 0 of this edge
392  {
393  for(int c = 0; c < 3; c++)
394  {
395  coordNear = Mesh->NodeVec()[meshInitNode].Coord(c);
396  coordFar = Mesh->NodeVec()[meshFinalNode].Coord(c);
397  Mesh->NodeVec()[meshMiddleNode].SetCoord(c, (1. - dist)*coordNear + (dist)*coordFar);
398  }
399  }
400  else if(targetSideNodes_set.find(finalNode) != targetSideNodes_set.end())//drag middle node to node 1 of this edge
401  {
402  for(int c = 0; c < 3; c++)
403  {
404  coordNear = Mesh->NodeVec()[meshFinalNode].Coord(c);
405  coordFar = Mesh->NodeVec()[meshInitNode].Coord(c);
406  Mesh->NodeVec()[meshMiddleNode].SetCoord(c, (1. - dist)*coordNear + (dist)*coordFar);
407  }
408  }
409  }
410 
411  return gel;
412 }
413 //------------------------------------------------------------------------------------------------------------
414 
416 {
417  TPZGeoEl * OldElem = Mesh->ElementVec()[ElemIndex];
418  if(!OldElem)
419  {
420  PZError << "Error at " << __PRETTY_FUNCTION__ << " - NULL geometric element.\n";
421  return NULL;
422  }
423  MElementType oldType = OldElem->Type();
424  int64_t oldId = OldElem->Id();
425  int64_t oldMatId = OldElem->MaterialId();
426  int nsides = OldElem->NSides();
427 
428  TPZVec<TPZGeoElSide> oldNeigh(nsides);
429  for(int s = 0; s < nsides; s++)
430  {
431  TPZGeoElSide mySide(OldElem, s);
432  oldNeigh[s] = mySide.Neighbour();
433  }
434 
435  const int nnodes = OldElem->NCornerNodes();
436  TPZManVector<int64_t> nodeindexes(nnodes);
437  for(int i = 0; i < nnodes; i++)
438  {
439  nodeindexes[i] = OldElem->NodeIndex(i);
440  }
441 
442  Mesh->DeleteElement(OldElem);
443 
444  TPZGeoEl * NewElem = Mesh->CreateGeoBlendElement(oldType, nodeindexes, oldMatId, oldId);
445 
446  for(int s = 0; s < nsides; s++)
447  {
448  TPZGeoElSide neigh = oldNeigh[s];
449  NewElem->SetNeighbour(s, neigh);
450  }
451 
452  NewElem->BuildBlendConnectivity();
453 
454  return NewElem;
455 }
456 //------------------------------------------------------------------------------------------------------------
457 
458 bool TPZChangeEl::NearestNode(TPZGeoEl * gel, TPZVec<REAL> &x, int64_t &meshNode, double tol)
459 {
460  meshNode = -1;
461  bool IsNearSomeNode = false;
462 
463  TPZVec<REAL> nodeCoord(3);
464  int nnodes = gel->NNodes();
465 
466  for(int n = 0; n < nnodes; n++)
467  {
468  double dist = 0.;
469  gel->NodePtr(n)->GetCoordinates(nodeCoord);
470  for(int c = 0; c < 3; c++)
471  {
472  dist += (x[c] - nodeCoord[c])*(x[c] - nodeCoord[c]);
473  }
474  dist = sqrt(dist);
475 
476  if(dist <= tol)
477  {
478  meshNode = gel->NodeIndex(n);
479  IsNearSomeNode = true;
480  break;
481  }
482  }
483 
484  return IsNearSomeNode;
485 }
486 //------------------------------------------------------------------------------------------------------------
487 
488 
490 {
491  int meshNode = -1;
492 
493  TPZVec<REAL> nodeCoord(3);
494  int64_t nnodes = gmesh->NNodes();
495 
496  for(int64_t n = 0; n < nnodes; n++)
497  {
498  double dist = 0.;
499  gmesh->NodeVec()[n].GetCoordinates(nodeCoord);
500  for(int c = 0; c < 3; c++)
501  {
502  dist += (x[c] - nodeCoord[c])*(x[c] - nodeCoord[c]);
503  }
504  dist = sqrt(dist);
505 
506  if(dist <= tol)
507  {
508  meshNode = n;
509  break;
510  }
511  }
512 
513  if(meshNode == -1)
514  {
515  std::cout << "Node not found for coordinates ( " << x[0] << " , " << x[1] << " , " << x[2] << " )" << std::endl;
516  std::cout << "See " << __PRETTY_FUNCTION__ << std::endl;
517 
518  DebugStop();
519  }
520 
521  return meshNode;
522 }
523 //------------------------------------------------------------------------------------------------------------
524 
525 bool TPZChangeEl::CreateMiddleNodeAtEdge(TPZGeoMesh *Mesh, int64_t ElemIndex, int edge, int64_t &middleNodeId)
526 {
527  TPZGeoEl * gel = Mesh->ElementVec()[ElemIndex];
528 
529  TPZGeoElSide myEdge(gel,edge);
530  TPZGeoElSide neighEdge(myEdge.Neighbour());
531  if(myEdge.Dimension() != 1)
532  {
533  return false;
534  }
535 
536  TPZVec<REAL> n0Coord(3), n1Coord(3), middleCoordLocal(1), middleCoord(3);
537  middleCoordLocal[0] = 0.;//middle node in edge (1D master element) is on qsi=0
538 
539  int64_t nearestN;
540  myEdge.X(middleCoordLocal,middleCoord);
541  if(NearestNode(gel, middleCoord, nearestN, 1.E-8))
542  {
543  middleNodeId = nearestN;//a malha jah contem um noh na coordenada desejada (middleCoord)
544  return true;
545  }
546  //else...
547  while(neighEdge != myEdge)
548  {
549  neighEdge.X(middleCoordLocal,middleCoord);
550  if(NearestNode(neighEdge.Element(), middleCoord, nearestN, 1.E-8))
551  {
552  middleNodeId = nearestN;//a malha jah contem um noh na coordenada desejada (middleCoord)
553  return true;
554  }
555  neighEdge = neighEdge.Neighbour();
556  }
557 
558  //if not returned true...
559  TPZGeoNode midNode;
560  midNode.SetCoord(middleCoord);
561 
563  int64_t NewNodeId = Mesh->NNodes();
564  Mesh->SetNodeIdUsed(NewNodeId);
565  midNode.SetNodeId(NewNodeId);
566 
568  middleNodeId = Mesh->NodeVec().AllocateNewElement();
569  Mesh->NodeVec()[middleNodeId] = midNode;
570 
571  return true;
572 }
573 
574 
Contains the TPZQuadraticPrism class which defines a prism geometric element with quadratic map...
int AllocateNewElement()
Makes more room for new elements.
Definition: pzadmchunk.h:184
Contains the TPZQuadraticPyramid class which defines a pyramid geometric element with quadratic map...
void SetCoord(const TPZVec< REAL > &x)
Sets all coordinates into the current node. It gets the dim values from x.
Definition: pzgnode.cpp:60
TPZGeoNode * NodePtr(int i) const
Returns a pointer to the ith node of the element.
Definition: pzgeoel.cpp:2566
Contains the TPZChangeEl class. It is a special map.
Contains declaration of TPZGeoElSide class which represents an element and its side, and TPZGeoElSideIndex class which represents an TPZGeoElSide index.
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.
virtual void resize(const int64_t newsize)
Definition: pzvec.h:213
Contains the TPZQuadraticQuad class which defines a quadrilateral geometric element with quadratic ma...
virtual int NCornerNodes() const =0
Returns the number of corner nodes of the element.
Contains the TPZMathTools class.
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
TPZGeoElSide Neighbour() const
Definition: pzgeoel.h:754
virtual int NSides() const =0
Returns the number of connectivities of the element.
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 TPZGeoEl * CreateGeoBlendElement(MElementType type, TPZVec< int64_t > &nodeindexes, int matid, int64_t &index)
Creates a geometric element in same fashion of CreateGeoElement but here the elements are blend...
Definition: pzgmesh.cpp:1400
virtual TPZGeoEl * SubElement(int is) const =0
Returns a pointer to the subelement is.
int64_t size() const
Returns the number of elements of the vector.
Definition: pzvec.h:196
static const double tol
Definition: pzgeoprism.cpp:23
Groups all classes defining the structure of the master element.
Definition: PrismExtend.cpp:15
Contains the implementation of the TPZGeoElement methods.
Implements a generic geometric element which is refined according to a generic refinement pattern...
Definition: pzgmesh.h:35
int WhichSubel() const
Returns the son number of the sub element gel.
Definition: pzgeoel.cpp:448
static TPZGeoEl * ChangeToQuadratic(TPZGeoMesh *Mesh, int64_t ElemIndex)
Turns an linear geoelement to quadratic.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
TPZGeoEl * Element(int64_t iel)
Definition: pzgmesh.h:139
static bool CreateMiddleNodeAtEdge(TPZGeoMesh *Mesh, int64_t ElemIndex, int edge, int64_t &middleNodeId)
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
int64_t NNodes() const
Number of nodes of the mesh.
Definition: pzgmesh.h:126
void X(TPZVec< REAL > &loc, TPZVec< REAL > &result) const
X coordinate of a point loc of the side.
virtual MElementType Type() const =0
Returns the element type acording to pzeltype.h.
TPZAdmChunkVector< TPZGeoNode > & NodeVec()
Definition: pzgmesh.h:140
void BuildBlendConnectivity()
Set connectivity information elements with blend geometric map.
Definition: pzgeoel.cpp:1959
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ sqrt
Definition: tfadfunc.h:120
Contains declaration of TPZGeoElRefPattern class which implements a generic geometric element which i...
Contains the TPZQuadraticLine class which defines a linear geometric element with quadratic map...
Contains the TPZQuadraticCube class which defines a cube geometric element with quadratic map...
Contains the TPZQuadraticTrig class which defines a triangular geometric element with quadratic map...
A simple stack.
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 int NNodes() const =0
Returns the number of nodes of the element.
virtual bool IsLinearMapping() const
Definition: pzgeoel.h:268
TPZGeoEl * Element() const
Definition: pzgeoelside.h:162
int64_t SideNodeLocIndex(int nodenum) const
Returns the index of the local nodenum node of side.
void DeleteElement(TPZGeoEl *gel, int64_t index=-1)
Centralized method to delete elements.
Definition: pzgmesh.cpp:1456
void SetNodeIdUsed(int64_t id)
Indicates that a node with id was created.
Definition: pzgmesh.h:108
REAL dist(TPZVec< T1 > &vec1, TPZVec< T1 > &vec2)
Definition: pzvec_extras.h:124
static bool NearestNode(TPZGeoEl *gel, TPZVec< REAL > &x, int64_t &meshNode, double tol)
Return if a given point x is near to some node of a given geo element.
int64_t Id() const
Returns the Id of the element.
Definition: pzgeoel.h:223
Implements a geometric node in the pz environment. Geometry.
Definition: pzgnode.h:31
static TPZGeoEl * ChangeToGeoBlend(TPZGeoMesh *Mesh, int64_t ElemIndex)
Turns a regular element into a geoblend.
This class implements a geometric mesh for the pz environment. Geometry.
Definition: pzgmesh.h:48
MElementType
Define the element types.
Definition: pzeltype.h:52
static TPZGeoEl * ChangeToQuarterPoint(TPZGeoMesh *Mesh, int64_t ElemIndex, int targetSide)
Slide middle nodes of an quadratic geoelement to the quarterpoint with respect to a given side...
int Dimension() const
the dimension associated with the element/side
Definition: pzeltype.h:61
int Side() const
Definition: pzgeoelside.h:169
void SetFather(TPZGeoEl *father)
Sets the father element.
Definition: pzgeoel.h:481
int64_t NElements() const
Returns the number of elements of the vector.
Definition: pzvec.h:190
void GetCoordinates(TPZVec< REAL > &co)
Fill the coordinates of the node.
Definition: pzgnode.cpp:83
void SetNodeId(int id)
Definition: pzgnode.h:73
Definition: pzeltype.h:55
Groups all classes which model the geometry.
Definition: pzgeopoint.cpp:18
Contains the TPZQuadraticTetra class which defines a tetrahedral geometric element with quadratic map...
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
int64_t SideNodeIndex(int nodenum) const
Returns the index of the nodenum node of side.
#define PZError
Defines the output device to error messages and the DebugStop() function.
Definition: pzerror.h:15
TPZAdmChunkVector< TPZGeoEl * > & ElementVec()
Methods for handling pzlists.
Definition: pzgmesh.h:138