32 int nsides = gel->
NSides();
35 for(is=nsides-1; is>=0; is--) {
39 for(dim = sidedim+1; dim<= geldim; dim++) {
44 for(idim=0; idim<nhighdim; idim++) {
55 for(int64_t iel = 0; iel<nel; iel++) {
70 std::set<int64_t> nodeids;
71 std::set<int64_t> elsids;
73 for (int64_t inode = 0; inode < numnodes; inode++) {
76 if (nodeids.size() != numnodes) {
77 std::cout <<
"The nodes have duplicate ids - EXPECT TROUBLE!\n";
82 for (int64_t iel = 0; iel < numels; iel++) {
85 if (elsids.size() != numels) {
86 std::cout <<
"The elements have duplicate ids - EXPECT TROUBLE!\n";
96 for(int64_t iel = 0; iel<nel; iel++) {
111 int nsides = gel->
NSides();
113 for(is=0; is<nsides; is++) {
118 for(isub=0; isub<
nsub; isub++) {
120 int son = subel[isub].Element()->WhichSubel();
121 if(fath.
Side() != is) {
122 PZError <<
"TPZCheckGeom::CheckRefinement non corresponding subelement/sides son " 123 << son <<
" sonside " << subel[isub].Side() <<
" fathside " << is <<
124 " fath2side " << fath.
Side() << endl;
131 for(is=0; is<
nsub; is++) {
133 int nsubsides = sub->
NSides();
135 for(iss=0; iss<nsubsides; iss++) {
146 int nsides = gel->
NSides();
158 int nintpoints = integ->
NPoints();
161 for(ip=0; ip<nintpoints; ip++) {
162 integ->
Point(ip,intpoint,w);
163 trans.
Apply(intpoint,sidetopoint);
164 trans1.
Apply(intpoint,elpoint1);
165 trans2.
Apply(sidetopoint,elpoint2);
169 int nx = x1.NElements();
171 for(ix=0; ix<nx; ix++) dif += (x1[ix]-x2[ix])*(x1[ix]-x2[ix]);
173 PZError <<
"TPZCheckGeom::CheckSideTransform sidefrom = "<< sidefrom
174 <<
" sideto = " << sideto <<
" dif = " << dif << endl;
186 if(!father.
Exists())
return check;
194 int nsubsides = subel->
NSides();
202 int nintpoints = integ->
NPoints();
205 for(ip=0; ip<nintpoints; ip++) {
206 integ->
Point(ip,intpoint,w);
207 trans.
Apply(intpoint,sidetopoint);
208 trans1.
Apply(intpoint,elpoint1);
209 trans2.
Apply(sidetopoint,elpoint2);
210 subel->
X(elpoint1,x1);
213 if(otherfatherside != father.
Side()) {
215 PZError <<
"TPZCheckGeom::CheckSubFatherTransform son " << son <<
" sidesub = "<< sidesub
216 <<
" fathside = " << father.
Side() <<
" otherfatherside = " << otherfatherside << endl;
220 int64_t nx = x1.NElements();
222 for(ix=0; ix<nx; ix++) dif += (x1[ix]-x2[ix])*(x1[ix]-x2[ix]);
225 PZError <<
"TPZCheckGeom::CheckSubFatherTransform son " << son <<
" sidesub = "<< sidesub
226 <<
" fathside = " << father.
Side() <<
" dif = " << dif << endl;
243 PZError <<
"TPZCheckGeom::CheckSubFatherTransform son " << son <<
" sidesub = "<< sidesub
244 <<
" fathside = " << father.
Side() << endl;
269 ofstream meshfile(
"mesh.txt");
308 for(no=0; no<12; no++) {
319 for(nel=0; nel<7; nel++) {
322 for(in=0; in<
numnos[nel]; in++) {
323 nodeindex[in] =
nodind[nel][in];
359 int nsides = gel->
NSides();
360 for (
int is=0; is<nsides; is++) {
367 int npoints = integ->
NPoints();
372 while (neighbour != gelside)
377 for (
int ip = 0; ip < npoints; ip++) {
378 integ->
Point(ip, pt1, w);
381 neighbour.
X(pt2, X2);
383 for (
int i=0; i<3; i++) {
384 norm += (X1[i]-X2[i])*(X1[i]-X2[i]);
387 std::cout <<
"Incompatible geometry between neighbours pt1 = " << pt1 <<
" pt2 = " << pt2 <<
" X1 = " << X1 <<
" X2 = " << X2 <<
"\n";
388 gelside.
Print(std::cout);
389 neighbour.
Print(std::cout);
402 std::set<int64_t> elementid, nodeid;
404 for (int64_t in=0; in<nnode; in++) {
407 if (nodeid.find(
id) == nodeid.end()) {
412 std::cout <<
"Node id repetido id = " <<
id << std::endl;
418 for (int64_t el=0; el<nelem; el++) {
423 int64_t
id = gel->
Id();
424 if (elementid.find(
id) != elementid.end()) {
425 std::cout <<
"Duplicate element id = " <<
id << std::endl;
430 elementid.insert(
id);
437 for(
int D = 0; D < nDiv; D++)
441 for(
int elem = 0; elem < nels; elem++)
Contains TPZShapeTetra class which implements the shape functions of a tetrahedral element...
int CheckElement(TPZGeoEl *gel)
This class performs a series of consistency tests on geometric transformations between elements...
virtual TPZGeoElSide Father2(int side) const
Returns the father/side of the father which contains the side of the sub element. ...
int AllocateNewElement()
Makes more room for new elements.
Contains the TPZInt1d, TPZIntTriang, TPZIntQuad, TPZIntCube3D, TPZIntTetra3D, TPZIntPyram3D and TPZIn...
virtual int NPoints() const =0
Returns number of points for the cubature rule related.
Contains declaration of TPZGeoElSide class which represents an element and its side, and TPZGeoElSideIndex class which represents an TPZGeoElSide index.
virtual TPZGeoEl * CreateGeoElement(MElementType type, TPZVec< int64_t > &cornerindexes, int matid, int64_t &index, int reftype=1)
Generic method for creating a geometric element. Putting this method centrally facilitates the modifi...
clarg::argInt nsub("-nsub", "number of substructs", 4)
void CheckUniqueId()
Verify is the ids of the elements and nodes are unique.
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...
Contains declaration of TPZCheckGeom class which performs a series of consistency tests on geometric ...
int64_t NElements() const
Number of elements of the mesh.
int DivideandCheck()
divide all elements and call PerformCheck
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
Implements a chunk vector with free store administration. Utility.
TPZGeoElSide Neighbour() const
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.
virtual int SideDimension(int side) const =0
Return the dimension of side.
void SideTransform3(TPZGeoElSide neighbour, TPZTransform<> &t)
Accumulates the transformations from the current element/side to the neighbour/side.
int WhichSide(TPZVec< int64_t > &SideNodeIds)
Returns the side number which is connected to the SideNodes returns -1 if no side is found...
Contains TPZShapeLinear class which implements the shape functions of a linear one-dimensional elemen...
void UniformRefine(int nDiv)
Uniform refine the geometric mesh.
int CheckSideTransform(TPZGeoEl *gel, int sidefrom, int sideto)
int CheckInternalTransforms(TPZGeoEl *)
check the internal side transformations
Abstract class defining integration rules. Numerical Integration.
TPZTransform< REAL > ComputeParamTrans(TPZGeoEl *fat, int fatside, int sideson)
Contains TPZShapeCube class which implements the shape functions of a hexaedral element.
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...
int CheckNeighbourMap(TPZGeoEl *gel)
verify if the mapping between neighbouring elements is conforming
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...
virtual void Print(std::ostream &out=std::cout) const
Print the information of the grid to an ostream.
int WhichSubel() const
Returns the son number of the sub element gel.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
TPZGeoEl * Element(int64_t iel)
#define DebugStop()
Returns a message to user put a breakpoint in.
int64_t NNodes() const
Number of nodes of the mesh.
void X(TPZVec< REAL > &loc, TPZVec< REAL > &result) const
X coordinate of a point loc of the side.
int PerformCheck()
verify compatibility between elements and their father and between elements and their neighbours ...
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/...
TPZAdmChunkVector< TPZGeoNode > & NodeVec()
int CheckSubFatherTransform(TPZGeoEl *subel, int sidesub)
verify if the transformation between sons and father are conforming
static REAL nodeco[12][3]
virtual int HasSubElement() const =0
Return 1 if the element has subelements.
Contains TPZShapePrism class which implements the shape functions of a prism element.
int CheckRefinement(TPZGeoEl *gel)
check the maps between the element and its father
TPZGeoEl * Element() const
TPZCheckGeom(TPZGeoMesh *gmesh=NULL)
void BuildConnectivity()
Build the connectivity of the grid.
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...
virtual void AllHigherDimensionSides(int side, int targetdimension, TPZStack< TPZGeoElSide > &elsides)=0
int64_t Id() const
Returns the Id of the element.
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...
This class implements a geometric mesh for the pz environment. Geometry.
This class implements a stack object. Utility.
int Dimension() const
the dimension associated with the element/side
void Print(std::ostream &out) const
print geometric characteristics of the element/side
Contains TPZShapePiram class which implements the shape functions of a pyramid element.
int64_t NElements() const
Returns the number of elements of the vector.
virtual void Print(std::ostream &out=std::cout)
Print all relevant data of the element to cout.
virtual int NSubElements() const =0
Returns the number of subelements of the element independent of the fact whether the element has alr...
Contains TPZShapeQuad class which implements the shape functions of a quadrilateral element...
Contains TPZShapeTriang class which implements the shape functions of a triangular element...
virtual void Point(int i, TPZVec< REAL > &pos, REAL &w) const =0
Returns i-th point at master element and related weight.
#define PZError
Defines the output device to error messages and the DebugStop() function.
TPZAdmChunkVector< TPZGeoEl * > & ElementVec()
Methods for handling pzlists.