NeoPZ
pzgeoelbc.cpp
Go to the documentation of this file.
1 
6 #include "pzgeoelbc.h"
7 #include "pzgeoel.h"
8 #include "pzgeoelside.h"
9 #include "pzgmesh.h"
10 
11 TPZGeoElBC::TPZGeoElBC(TPZGeoEl *el,int side,int matid):fCreatedElement(NULL){
12  if (!el){
13  PZError << "Error at " << __PRETTY_FUNCTION__ << " - TPZGeoEl *el is NULL\n";
14  return;
15  }
16  if(el->SideIsUndefined(side)) //Verify if the connectivity was made before the creation of the bc
17  {
18  DebugStop();
19  }
20  this->fCreatedElement = el->CreateBCGeoEl( side, matid );
21 }
22 
23 TPZGeoElBC::TPZGeoElBC(const TPZGeoElSide &elside,int matid):fCreatedElement(NULL){
24  TPZGeoEl * el = elside.Element();
25  const int side = elside.Side();
26  if(el->SideIsUndefined(side)) //Verify if the connectivity was made before the creation of the bc
27  {
28  DebugStop();
29  }
30  if (!el || side == -1){
31  if (!el) PZError << "Error at " << __PRETTY_FUNCTION__ << " - TPZGeoEl *elside.Element() is NULL\n";
32  if (side == -1) PZError << "Error at " << __PRETTY_FUNCTION__ << " - int elside.Side() is -1\n";
33  return;
34  }
35  this->fCreatedElement = el->CreateBCGeoEl( side, matid );
36 }
Contains declaration of TPZGeoElSide class which represents an element and its side, and TPZGeoElSideIndex class which represents an TPZGeoElSide index.
TPZGeoElBC(TPZGeoEl *el, int side, int matid)
Creates a geometric element along side of el.
Definition: pzgeoelbc.cpp:11
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
Definition: pzgeoelside.h:83
Contains declaration of TPZGeoElBC class, it is a structure to help the construction of geometric ele...
Contains declaration of TPZMesh class which defines a geometrical mesh and contains a corresponding l...
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
virtual TPZGeoEl * CreateBCGeoEl(int side, int bc)=0
Method which creates a geometric element on the side of an existing element.
TPZGeoEl * fCreatedElement
Pointer to the geometric element created in the class constructor.
Definition: pzgeoelbc.h:26
TPZGeoEl * Element() const
Definition: pzgeoelside.h:162
virtual int SideIsUndefined(int side)=0
Returns 1 if the side has not been defined by buildconnectivity.
int Side() const
Definition: pzgeoelside.h:169
#define PZError
Defines the output device to error messages and the DebugStop() function.
Definition: pzerror.h:15