28 static LoggerPtr logger(Logger::getLogger(
"pz.mesh.tpzgeoelside"));
34 if (gel) this->fGeoElIndex = gel->
Index();
35 else this->fGeoElIndex = -1;
41 if (gel) this->fGeoElIndex = gel->
Index();
42 else this->fGeoElIndex = -1;
43 this->fSide = side.
Side();
47 if (geoel) this->fGeoElIndex = geoel->
Index();
48 else this->fGeoElIndex = -1;
52 return Hash(
"TPZGeoElSideIndex");
56 buf.
Read(&fGeoElIndex);
61 buf.
Write(&fGeoElIndex);
70 fGeoEl = 0; fSide = -1;
72 std::set<int64_t> nodes;
73 for(
int s = 0; s < gel->
NSides(); s++)
77 if(actualSide.
NSideNodes() != (int)sideCornerNodes.size())
81 for(
int as = 0; as < actualSide.
NSideNodes(); as++)
85 if(nodes == sideCornerNodes)
96 if(*
this == other)
return true;
121 QsiElement(loc, locElement);
122 fGeoEl->X(locElement, result);
128 qsi_element.
Resize(fGeoEl->Dimension());
129 TPZTransform<> ElementDim = fGeoEl->SideToSideTransform(fSide, fGeoEl->NSides()-1);
130 ElementDim.
Apply(qsi_side, qsi_element);
140 int dim = fGeoEl->Dimension();
145 TPZTransform<> Transformation = fGeoEl->SideToSideTransform(fSide, fGeoEl->NSides()-1);
147 Transformation.
Apply(loc, locElement);
150 fGeoEl->GradX(locElement, gradx_vol);
162 TPZTransform<> ElementDimR = fGeoEl->SideToSideTransform(fSide, fGeoEl->NSides()-1);
166 ElementDim.
Apply(loc, locElement);
168 fGeoEl->X(locElement, result);
176 gradx.Resize(3,fGeoEl->Dimension());
178 TPZTransform<> ElementDimR = fGeoEl->SideToSideTransform(fSide, fGeoEl->NSides()-1);
181 ElementDim.
Apply(loc, locElement);
182 fGeoEl->GradX(locElement, gradx);
192 int DIM = fGeoEl->Dimension();
194 TPZTransform<> ThisTransf = fGeoEl->SideToSideTransform(fSide, fGeoEl->NSides()-1);
197 ThisTransf.
Apply(param,paramElement);
200 TPZFNMatrix<9> JCn(3,DIM,0.), JacElement(DIM,DIM,0.), AxesElement(DIM,3,0.), Temp(3,DIM,0.), InvElement(DIM,DIM,0.), axest(3,DIM);
202 fGeoEl->Jacobian(paramElement,JacElement,AxesElement,DetElement,InvElement);
204 AxesElement.Transpose();
205 AxesElement.Multiply(JacElement,JCn);
206 JCn.Multiply(ThisTransf.
Mult(),Temp);
208 Temp.GramSchmidt(axest,jacobian);
213 detjac = jacobian(0,0);
216 jacinv(0,0) = 1./jacobian(0,0);
223 if(axes.
Rows() == 2) {
224 detjac = jacobian(0,0)*jacobian(1,1) - jacobian(1,0)*jacobian(0,1);
227 jacinv(0,0) = jacobian(1,1)/detjac; jacinv(0,1) = -jacobian(0,1)/detjac;
228 jacinv(1,0) = -jacobian(1,0)/detjac; jacinv(1,1) = jacobian(0,0)/detjac;
235 if(axes.
Rows() == 3) {
236 detjac = -(jacobian(0,2)*jacobian(1,1)*jacobian(2,0)) + jacobian(0,1)*jacobian(1,2)*jacobian(2,0) + jacobian(0,2)*jacobian(1,0)*jacobian(2,1) - jacobian(0,0)*jacobian(1,2)*jacobian(2,1) - jacobian(0,1)*jacobian(1,0)*jacobian(2,2) + jacobian(0,0)*jacobian(1,1)*jacobian(2,2);
237 jacinv(0,0) = (-(jacobian(1,2)*jacobian(2,1)) + jacobian(1,1)*jacobian(2,2))/detjac;
238 jacinv(0,1) = (jacobian(0,2)*jacobian(2,1) - jacobian(0,1)*jacobian(2,2))/detjac;
239 jacinv(0,2) = (-(jacobian(0,2)*jacobian(1,1)) + jacobian(0,1)*jacobian(1,2))/detjac;
240 jacinv(1,0) = (jacobian(1,2)*jacobian(2,0) - jacobian(1,0)*jacobian(2,2))/detjac;
241 jacinv(1,1) = (-(jacobian(0,2)*jacobian(2,0)) + jacobian(0,0)*jacobian(2,2))/detjac;
242 jacinv(1,2) = (jacobian(0,2)*jacobian(1,0) - jacobian(0,0)*jacobian(1,2))/detjac;
243 jacinv(2,0) = (-(jacobian(1,1)*jacobian(2,0)) + jacobian(1,0)*jacobian(2,1))/detjac;
244 jacinv(2,1) = (jacobian(0,1)*jacobian(2,0) - jacobian(0,0)*jacobian(2,1))/detjac;
245 jacinv(2,2) = (-(jacobian(0,1)*jacobian(1,0)) + jacobian(0,0)*jacobian(1,1))/detjac;
253 fGeoEl->LowerDimensionSides(fSide,lower);
265 CenterPoint(sideparam);
266 Jacobian(sideparam,jacobian,axes,detjac,jacinv);
267 TPZIntPoints *intrule = fGeoEl->CreateSideIntegrationRule(fSide, 0);
268 REAL RefElVolume = 0.;
272 for (
int ip=0; ip<np; ip++) {
273 intrule->
Point(ip, points, weight);
274 RefElVolume += weight;
276 return (RefElVolume*detjac);
286 while(neigh.
Element() != this->Element())
301 while(neigh.
Element() != this->Element())
303 if(neigh.
Element() != thisElem)
315 if(!Exists())
return;
316 if(fSide < 0 || fSide >= fGeoEl->NSides()) {
317 PZError <<
"TPZGeoElSide::SetConnectivity Index out of bound\n";
323 PZError <<
"TPZGeoElSide::SetConnectivity trying to remove null or inexistent connection";
326 while(neigh.
Exists() && neigh != *
this){
334 PZError <<
"TPZGeoElSide::SetConnectivity neighbourhood cycle error";
339 return fGeoEl->ResetBlendConnectivity(fSide, index);
348 if(!fGeoEl || !neighbour.
fGeoEl)
return;
351 fGeoEl->LowerDimensionSides(fSide,mylowerdimension);
353 SetConnectivity(neighbour);
356 for(is=0; is<ns; is++)
367 if(!Exists())
return;
368 if(fSide >= fGeoEl->NSides()) {
369 PZError <<
"ERROR(TPZGeoElSide::SetConnectivity)-> Index greater than number of sides.\n";
370 PZError <<
" fNumSides = " << fGeoEl->NSides() <<
" side = " << fSide <<
"\n";
373 fGeoEl->SetSideDefined(fSide);
378 currentneigh = Neighbour();
380 SetNeighbour(neighbour);
382 }
else if (neighneigh.
Exists() && currentneigh.
Exists()) {
385 int a = NeighbourExists(neighbour);
392 std::cout <<
"This element side : " << fSide << std::endl;
393 this->Element()->Print(std::cout);
394 cout <<
"\nNeighbour side :" << neighbour.
Side() << std::endl;
396 PZError <<
"TPZGeoElSide::SetConnectivity Fourth untreated case, wrong data structure\n";
398 SetNeighbour(neighneigh);
402 }
else if (neighneigh.
Exists()) {
404 SetNeighbour(neighneigh);
407 }
else if (currentneigh.
Exists()) {
409 SetNeighbour(neighbour);
418 fGeoEl->CenterPoint(fSide,gelcenter);
420 tr = fGeoEl->SideToSideTransform(fGeoEl->NSides()-1,fSide);
421 tr.
Apply(gelcenter, center);
429 fGeoEl->CenterPoint(fSide,gelcenter);
430 fGeoEl->X(gelcenter, Xcenter);
434 if(fSide < fGeoEl->NCornerNodes())
436 AllNeighbours(compneigh);
439 int nsnodes = NSideNodes();
444 for(in=0; in<nsnodes; in++)
446 nodeindexes[in] = SideNodeIndex(in);
447 int locnod = fGeoEl->SideNodeLocIndex(fSide,in);
453 for(el=0; el<nel; el++) {
454 GeoElSet[in].
Push(GeoElSideSet[el].Element()->Index());
456 Sort<int>(GeoElSet[in]);
462 result = GeoElSet[0];
466 Intersect<int,DEFAULTVEC_ALLOC>(GeoElSet[0],GeoElSet[1],result);
469 Intersect<int,DEFAULTVEC_ALLOC>(GeoElSet[0],GeoElSet[1],GeoElSet[2],result);
474 Intersect<int,DEFAULTVEC_ALLOC>(GeoElSet[0],GeoElSet[2],inter1);
476 Intersect<int,DEFAULTVEC_ALLOC>(GeoElSet[1],GeoElSet[3],inter2);
478 Intersect<int,DEFAULTVEC_ALLOC>(inter1,inter2,result);
484 inter1 = GeoElSet[0];
485 for(in=0; in<nsnodes-1; in++) {
487 Intersect<int,DEFAULTVEC_ALLOC>(inter1,GeoElSet[in+1],inter2);
496 for(el=0; el<nel; el++) {
498 int whichSd = gelResult->
WhichSide(nodeindexes);
510 if(!NeighbourExists(neighbour))
513 sout << __PRETTY_FUNCTION__ <<
"Neighbour does not exist : expect trouble";
521 switch (sidedimension) {
529 tside.
Mult()(0,0) = 1.;
533 tside.
Mult()(0,0) = -1.;
541 if(Element()->NSideNodes(Side()) == 4) {
544 tside.
Mult()(0,0) = 0;
545 tside.
Mult()(1,1) = 0;
547 for(i=0;i<4;i++) idfrom[i]=Element()->SideNodeIndex(Side(),i);
549 int transid = Element()->GetTransformId2dQ(idfrom,idto);
554 }
else if(Element()->NSideNodes(Side()) == 3) {
557 tside.
Mult()(0,0) = 0.;
558 tside.
Mult()(1,1) = 0.;
559 for(i=0;i<3;i++) idfrom[i] = Element()->SideNodeIndex(Side(),i);
561 int transid = Element()->GetTransformId2dT(idfrom,idto);
569 PZError <<
"TPZGeoElSide::NeighbourSideTransform : elemento desconhecido" << std::endl;
577 if(gel == *
this)
return 1;
579 if(!neighbour.
Exists())
return 0;
580 while(neighbour != *
this) {
581 if(gel == neighbour)
return 1;
595 PZError <<
"TPZGeoElSide::Dimension : null element\n";
598 return fGeoEl->SideDimension(fSide);
604 if (logger->isDebugEnabled()) {
605 std::stringstream sout;
606 sout << __FUNCTION__ <<
" this = \n";
608 sout <<
"neighbour\n";
609 neighbour.
Print(sout);
614 if(!father.Exists()) {
615 PZError <<
"TPZGeoElSide::SideTransform3 I dont understand\n";
618 while(father.Exists())
620 if(father.NeighbourExists(neighbour)) {
629 t = father.Element()->BuildTransform2(father.Side(),nextfather.
Element(),t);
636 neighbourwithfather = *
this;
639 if(!neighfather.
Exists()) neighbourwithfather = neighbourwithfather.
Neighbour();
640 }
while(!neighfather.
Exists() && neighbourwithfather.
Exists() && neighbourwithfather != start);
643 if(neighfather.
Exists()) {
644 if(neighbourwithfather != start)
650 if (logger->isDebugEnabled()) {
651 std::stringstream sout;
652 sout <<
"neighbourwithfather\n";
653 neighbourwithfather.
Print(sout);
654 sout <<
"neighbour\n";
655 neighbour.
Print(sout);
663 neighbour.
Print(std::cout);
666 PZError <<
"TPZGeoElSide:SideTranform3 did not find the neighbour\n";
671 int onlyinterpolated,
int removeduplicates) {
673 TPZCompElSide father = LowerLevelCompElementList2(onlyinterpolated);
675 EqualLevelCompElementList(ellist,onlyinterpolated,removeduplicates);
676 HigherLevelCompElementList2(ellist,onlyinterpolated,removeduplicates);
680 int onlyinterpolated,
int removeduplicates) {
684 neighbour = Neighbour();
685 if(!neighbour.
Exists())
return;
687 while(neighbour.
Element() != this->Element()) {
691 if(removeduplicates)
return;
698 int onlymultiphysicelement,
int removeduplicates) {
702 neighbour = Neighbour();
703 if(!neighbour.
Exists())
return;
705 while(neighbour.
Element() != this->Element()) {
709 if(removeduplicates)
return;
713 if(neighbour.
Element() == this->Element())
724 fGeoEl->AllHigherDimensionSides(fSide,2,gelsides);
726 for(il=0; il<cap; il++) {
728 if(onlyinterpolated) {
734 if(conind < 0)
continue;
736 elsidevec.
Push(cels);
748 PZError <<
"TPZGeoElSide::SetNeighbour. Don't exist geometrical element.\n";
751 fGeoEl->SetNeighbour(fSide,neighbour);
756 if(fGeoEl != higherdimensionside.
fGeoEl) {
757 PZError <<
"TPZGeoElSide::SideToSideTransform inconsistent id1 = " << fGeoEl->Id() <<
758 " id2 = " << higherdimensionside.
fGeoEl->
Id() << std::endl;
760 return fGeoEl->SideToSideTransform(fSide,higherdimensionside.
fSide);
770 actGel = actGel->
Father();
778 PZError << __PRETTY_FUNCTION__ <<
"is deprecated. Use TPZGeoEl::YoungestChildren instead \n";
781 if(this->Element()->HasSubElement() ==
false)
783 sonSides.
Push(*
this);
785 int dim = Dimension();
787 fGeoEl->GetSubElements2(fSide,lowerSubelements,dim);
789 for (
int s=0; s<
nsub; s++) {
790 lowerSubelements[s].GetAllSiblings(sonSides);
796 if(this->Element()->HasSubElement() ==
false)
798 sonSides.
Push(*
this);
800 int dim = Dimension();
802 fGeoEl->GetSubElements2(fSide,lowerSubelements,dim);
804 for (
int s=0; s<
nsub; s++) {
805 lowerSubelements[s].YoungestChildren(sonSides);
811 if(!fGeoEl)
return 0;
812 return fGeoEl->HasSubElement();
816 if(!fGeoEl)
return 0;
817 return fGeoEl->NSideNodes(fSide);
822 if(!fGeoEl)
return -1;
823 return ( fGeoEl->SideNodeIndex(fSide,nodenum) );
828 if(!fGeoEl)
return -1;
829 return ( fGeoEl->SideNodeLocIndex(fSide,nodenum) );
841 neighbour = Neighbour();
842 father = StrictFather();
844 while(!father.
Exists() && neighbour.
Exists() && neighbour != start) {
861 while(!father.
Exists() && neighbour.
Exists() && neighbour != start) {
878 return fGeoEl->Father2(fSide);
886 while(father.
Exists() && nfathsub == 1) {
895 if(!fGeoEl || !fGeoEl->HasSubElement()) {
900 fGeoEl->GetSubElements2(fSide,subelements);
905 if(!Dimension())
return;
913 for(is=0; is<
nsub; is++) {
914 subel[is].EqualorHigherCompElementList2(elvec,onlyinterpolated,removeduplicates);
920 if(!neighbour.
Exists())
break;
921 }
while(neighbour != *
this);
926 if(!Dimension())
return;
934 for(is=0; is<
nsub; is++) {
935 subel[is].EqualorHigherCompElementList3(elvec,onlymultiphysicelement,removeduplicates);
941 if(!neighbour.
Exists())
break;
942 }
while(neighbour != *
this);
950 if(Reference().Exists()) {
951 celside.
Push(Reference());
952 if(removeduplicates) {
956 this->EqualLevelCompElementList(celside,onlyinterpolated,removeduplicates);
957 if(ncelsides != celside.
NElements())
return;
965 for(is=0; is<
nsub; is++) {
966 gelsides[is].EqualorHigherCompElementList2(celside,onlyinterpolated,removeduplicates);
972 if(!neighbour.
Exists())
break;
973 }
while(neighbour != *
this);
981 if(Reference().Exists()) {
982 celside.
Push(Reference());
983 if(removeduplicates) {
987 this->EqualLevelCompElementList3(celside,onlymultiphysicelement,removeduplicates);
988 if(ncelsides != celside.
NElements())
return;
996 for(is=0; is<
nsub; is++) {
997 gelsides[is].EqualorHigherCompElementList3(celside,onlymultiphysicelement,removeduplicates);
1003 if(!neighbour.
Exists())
break;
1004 }
while(neighbour != *
this);
1013 if(!Exists())
return -1;
1014 return fGeoEl->NSideSubElements(fSide);
1023 int64_t neighsize = neighvec.
NElements();
1024 if(size!=neighsize || !size){
1025 PZError <<
"TPZGeoElSide::BuildConnectivities wrong vectors: abort!!!\n";
1028 int64_t iv,ivn,side,neighside,sidedim,neighsidedim;
1030 for(iv=0;iv<size;iv++){
1031 subside = sidevec[iv];
1032 side = subside.
Side();
1035 for(ivn=0;ivn<neighsize;ivn++){
1036 neighsubside = neighvec[ivn];
1037 neighside = neighsubside.
Side();
1038 neighsidedim = neighsubside.
Dimension();
1040 if(neighsidedim != sidedim)
continue;
1042 int in[4],face,i,j,num;
1043 int im[4],neighface;
1048 cout <<
"TPZGeoElSide::BuildConnectivities the neighbour already exists?";
1059 if( (in[0] == im[0] && in[1] == im[1]) || (in[0] == im[1] && in[1] == im[0]) ){
1061 cout <<
"TPZGeoElSide::BuildConnectivities the neighbour already exists?";
1071 if(face!=neighface)
break;
1072 for(i=0;i<face;i++){
1076 if(face==3) in[3] = im[3] = -1;
1078 for(i=0;i<4;i++)
for(j=0;j<4;j++)
if(in[i]==im[j]) num++;
1081 cout <<
"TPZGeoElSide::BuildConnectivities the neighbour already exists?";
1088 PZError <<
"TPZGeoElSide::BuildConnectivities error !!!\n";
1096 out <<
"TPZGeoElSide : side = " << geoside.
Side() << std::endl ;
1103 if(!fGeoEl)
return false;
1104 return fGeoEl->IsLinearMapping();
1113 int faceleft,faceright;
1117 TPZManVector<REAL, 3> centleft(Leftdim),centright(Rightdim),result(3,0.),xint(3),xvolleft(3),xvolright(3),vec(3),rib(3);
1121 int InterfaceDimension = Dimension();
1122 TPZFNMatrix<9,REAL> axes(InterfaceDimension,3), jacobian(InterfaceDimension,InterfaceDimension),invjacobian(InterfaceDimension,InterfaceDimension);
1124 this->Jacobian(point,jacobian,axes,detjac,invjacobian);
1125 faceleft = LeftEl->
NSides()-1;
1126 faceright = RightEl->
NSides()-1;
1129 LeftEl->
X(centleft,xvolleft);
1130 RightEl->
X(centright,xvolright);
1131 for(i=0;i<3;i++) vec[i] = xvolright[i]-xvolleft[i];
1134 REAL vecnorm =
sdot(vec, vec);
1135 if(vecnorm < 1.e-10)
1137 LOGPZ_ERROR(logger,
"Left and Right element centers coincide")
1142 switch(InterfaceDimension){
1149 for(i=0;i<3;i++) normalize += normal[i]*normal[i];
1150 normalize =
sqrt(normalize);
1152 for(i=0;i<3;i++) normal[i] = normal[i]/normalize;
1156 for(i=0;i<3;i++) rib[i] = axes(0,i);
1161 for(i=0;i<3;i++) normalize += normal[i]*normal[i];
1162 if(normalize == 0.0)
1164 PZError << __PRETTY_FUNCTION__ <<
" null normal vetor\n";
1167 std::stringstream sout;
1175 normalize =
sqrt(normalize);
1176 for(i=0;i<3;i++) normal[i] = normal[i]/normalize;
1180 for(
int iax = 0; iax < 3; iax++){
1181 axes1[iax] = axes(0,iax);
1182 axes2[iax] = axes(1,iax);
1188 PZError <<
"TPZInterfaceElement::NormalToFace in case that not treated\n";
1196 for(i=0; i<3; i++) dot += normal[i]*vec[i];
1198 for(i=0; i<3; i++) normal[i] = -normal[i];
1206 if (Dimension() != fGeoEl->Dimension()-1) {
1216 vol_side.
CenterX(vol_center_x);
1217 this->X(qsi_side, x);
1218 center_dir = x - vol_center_x;
1220 int vol_dim = vol_side.Dimension();
1221 int side_dim = Dimension();
1224 this->QsiElement(qsi_side, qsi_vol);
1226 TPZFMatrix<REAL> side_jac(side_dim,side_dim), side_inv_jac(side_dim,side_dim), side_axes(side_dim,3);
1227 TPZFMatrix<REAL> vol_jac(vol_dim,vol_dim), vol_inv_jac(vol_dim,vol_dim), vol_axes(vol_dim,3);
1230 this->Jacobian(qsi_side, side_jac, side_axes, detjac, side_inv_jac);
1231 vol_side.Jacobian(qsi_vol, vol_jac, vol_axes, detjac, vol_inv_jac);
1236 for (
unsigned int i = 0; i < 3; i++) {
1237 normal[i] = vol_axes(i,0);
1244 for (
unsigned int i = 0; i < 3 ; i++) {
1245 v1[i] = vol_axes(0,i);
1246 v2[i] = vol_axes(1,i);
1247 v3[i] = side_axes(0,i);
1258 for (
unsigned int i = 0; i < 3 ; i++) {
1259 v1[i] = side_axes(0,i);
1260 v2[i] = side_axes(1,i);
1276 for(
unsigned int i=0; i<3; i++) dot += normal[i]*center_dir[i];
1278 for(
unsigned int i=0; i<3; i++) normal[i] = -normal[i];
1288 out <<
"Null TPZGeoElSide\n";
1291 out <<
"Element index " << fGeoEl->Index() <<
" Side " << fSide <<
" SideNode indexes " ;
1293 CenterPoint(center);
1295 for (
int i=0; i<NSideNodes(); i++) {
1296 out << SideNodeIndex(i) <<
" ";
1298 out <<
"Center coordinate " << centerX << std::endl;
1302 return this->Element()->CreateSideIntegrationRule(this->Side(), order);
1310 return fGeoEl->SideNodeLocIndex(fSide,index);
1314 return Hash(
"TPZGeoElSide");
1328 if (this->fSide == -1 || this->fGeoElIndex == -1){
1331 return mesh->
ElementVec()[this->fGeoElIndex];
virtual int64_t SideNodeIndex(int side, int nodenum) const =0
Returns the index of the nodenum node of side.
TPZGeoEl * Element(const TPZGeoMesh *mesh) const
void EqualLevelCompElementList3(TPZStack< TPZCompElSide > &elsidevec, int onlymultiphysicelement, int removeduplicates)
Returns all connected computational elements which have equal level to the current element...
void EqualorHigherCompElementList2(TPZStack< TPZCompElSide > &celside, int onlyinterpolated, int removeduplicates)
Will return all elements of equal or higher level than than the current element.
void HigherLevelCompElementList2(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected computational elements which have level higher to the current element if onlyi...
virtual TPZGeoElSide Father2(int side) const
Returns the father/side of the father which contains the side of the sub element. ...
Contains the TPZInt1d, TPZIntTriang, TPZIntQuad, TPZIntCube3D, TPZIntTetra3D, TPZIntPyram3D and TPZIn...
virtual int NPoints() const =0
Returns number of points for the cubature rule related.
virtual void LowerDimensionSides(int side, TPZStack< int > &smallsides) const =0
Implements computational element and a side. Computational Element.
bool IsAncestor(TPZGeoEl *son, TPZGeoEl *father)
bool IsZero(long double a)
Returns if the value a is close Zero as the allowable tolerance.
Contains declaration of TPZGeoElSide class which represents an element and its side, and TPZGeoElSideIndex class which represents an TPZGeoElSide index.
void GradX(TPZVec< REAL > &loc, TPZFMatrix< REAL > &gradx) const
X coordinate of a point loc of the side.
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.
int NSubElements()
return the number of element/side pairs which compose the current set of points
void SetElement(TPZGeoEl *geoel)
clarg::argInt nsub("-nsub", "number of substructs", 4)
int ClassId() const override
Define the class id associated with the class.
int GelLocIndex(int index) const
TPZGeoElSide StrictFather()
returns the father/side pair which contains this/side and is strictly larger than this/side ...
Contains declaration of TPZCompEl class which defines the interface of a computational element...
static REAL gTrans2dT[6][2][2]
Data structure which defines the triangle transformations.
TPZGeoElSide Father2() const
returns the father/side pair which contains the set of points associated with this/side ...
groups all classes dedicated to the computation of shape functions
void GetSubElements2(TPZStack< TPZGeoElSide > &subelements)
build the list of element/side pairs which compose the current set of points
TPZCompElSide LowerLevelCompElementList2(int onlyinterpolated)
return the element/side pair which contains this/side and has a computational element associated ...
double sdot(TPZVec< T1 > &x, TPZVec< T1 > &y)
Performs a sdot operation: dot <- Transpose[x] * y.
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
int HasSubElement()
Return 1 if the element has subelements along side.
TPZGeoElSide Neighbour() const
virtual int NSides() const =0
Returns the number of connectivities of the element.
static TPZSavable * GetInstance(const int64_t &objId)
void CenterPoint(TPZVec< REAL > ¢er) const
return the coordinates of the center in master element space (associated with the side) ...
int ClassId() const override
Define the class id associated with the class.
TPZTransform< REAL > SideToSideTransform(TPZGeoElSide &higherdimensionside)
Compute the transformation between the master element space of one side of an element to the master e...
void SideTransform3(TPZGeoElSide neighbour, TPZTransform<> &t)
Accumulates the transformations from the current element/side to the neighbour/side.
void EqualLevelCompElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected computational elements which have equal level to the current element...
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
int NNeighboursButThisElem(TPZGeoEl *thisElem)
Returns the number of neighbours, excluding the given element (thisElem)
static REAL gVet2dT[6][2]
Data structure which defines the triangle transformations.
virtual void YoungestChildren(TPZStack< TPZGeoElSide > &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.
int WhichSide(TPZVec< int64_t > &SideNodeIds)
Returns the side number which is connected to the SideNodes returns -1 if no side is found...
It has the declaration of the TPZMultiphysicsCompEl class.
static void BuildConnectivities(TPZVec< TPZGeoElSide > &elvec, TPZVec< TPZGeoElSide > &neighvec)
Abstract class defining integration rules. Numerical Integration.
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
void EqualorHigherCompElementList3(TPZStack< TPZCompElSide > &celside, int onlymultiphysicelement, int removeduplicates)
Will return all elements of equal or higher level than than the current element if onlymultiphysicel...
static void ProdVetorial(TPZVec< Tvar > &u, TPZVec< Tvar > &v, TPZVec< Tvar > &result)
Computes the vectorial product u x v.
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...
virtual int NSideSubElements(int side) const =0
Returns the number of subelements as returned by GetSubElements2(side)
bool IsLinearMapping() const
int Zero() override
Makes Zero all the elements.
TPZGeoElSide LowestFatherSide()
int64_t size() const
Returns the number of elements of the vector.
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...
void Push(const T object)
Pushes a copy of the object on the stack.
void AllNeighbours(TPZStack< TPZGeoElSide > &allneigh)
Returns the set of neighbours which can directly be accessed by the datastructure.
virtual void Write(const bool val)
void Read(TPZStream &buf, void *context) override
read objects from the stream
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
int64_t Index() const
Returns the index of the element within the element vector of the mesh.
TPZIntPoints * CreateIntegrationRule(int order)
#define DebugStop()
Returns a message to user put a breakpoint in.
void HigherDimensionElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated)
Pushes all connected computational elements which have higher dimension than the current element/side...
void CenterX(TPZVec< REAL > &Xcenter) const
return the coordinates of the center of the side in real space
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
void X(TPZVec< REAL > &loc, TPZVec< REAL > &result) const
X coordinate of a point loc of the side.
virtual void GetAllSiblings(TPZStack< TPZGeoElSide > &unrefinedSons)
[deprecated] use YoungestChildren
TPZTransform< REAL > NeighbourSideTransform(const TPZGeoElSide &neighbour)
void RemoveConnectivity()
Remove the element from the connectivity loop.
int64_t Rows() const
Returns number of rows.
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ sqrt
int NSides() const
Returns the number of sides in which the current side can be decomposed.
void SetConnectivity(const TPZGeoElSide &neighbour) const
int Exists() const
Verifies if the object is non null (initialized)
TPZGeoElSideIndex()
Simple constructor.
static REAL gTrans2dQ[8][2][2]
Data structure which defines the quadrilateral transformations.
#define LOGPZ_ERROR(A, B)
Define log for errors (cout)
virtual int NSideNodes(int side) const =0
Returns the number of nodes for a particular side.
int32_t Hash(std::string str)
void ConnectedCompElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected computational elements to the current element if onlyinterpolated == 1 only e...
virtual int64_t ConnectIndex(int i) const =0
Returns the index of the ith connectivity of the element.
void ComputeNeighbours(TPZStack< TPZGeoElSide > &compneigh)
Returns the set of neighbours as computed by the intersection of neighbours along vertices...
TPZGeoEl * Element() const
int64_t SideNodeLocIndex(int nodenum) const
Returns the index of the local nodenum node of side.
void Normal(TPZVec< REAL > &point, TPZGeoEl *left, TPZGeoEl *right, TPZVec< REAL > &normal) const
compute the normal to the point from left to right neighbour
virtual int Dimension() const =0
Returns the dimension of the element.
TPZCompEl * Element() const
Gives a pointer to the reference computational element.
bool IsRelative(TPZGeoElSide other)
Checks whether other is a relative (son or ancestor) of this.
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...
TPZCompElSide Reference() const
Returns a pointer to the elementside referenced by the geometric elementside.
This class implements a geometric mesh for the pz environment. Geometry.
REAL Area()
Area associated with the side.
int Dimension() const
the dimension associated with the element/side
bool ResetBlendConnectivity(const int64_t &index)
void Jacobian(TPZVec< REAL > ¶m, TPZFMatrix< REAL > &jacobian, TPZFMatrix< REAL > &axes, REAL &detjac, TPZFMatrix< REAL > &jacinv) const
Jacobian associated with the side of the element.
void Print(std::ostream &out) const
print geometric characteristics of the element/side
bool IsAncestor(TPZGeoElSide other)
Checks whether other is an ancestor of this.
virtual void Multiply(const TPZFMatrix< TVar > &A, TPZFMatrix< TVar > &res, int opt=0) const
It mutiplies itself by TPZMatrix<TVar>A putting the result in res.
static int sidedimension[27]
Vector of the dimension for each side.
Contains declaration of TPZInterpolatedElement class which implements computational element of the in...
void Fill(const T ©, const int64_t from=0, const int64_t numelem=-1)
Will fill the elements of the vector with a copy object.
void SetNeighbour(const TPZGeoElSide &neighbour) const
Fill in the data structure for the neighbouring information.
int Side() const
Returns the side index.
int64_t Cols() const
Returns number of cols.
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
int Resize(const int64_t newRows, const int64_t wCols) override
Redimension a matrix, but maintain your elements.
Defines the interface for saving and reading data. Persistency.
int NeighbourExists(const TPZGeoElSide &neighbour) const
Returns 1 if neighbour is a neighbour of the element along side.
int64_t NElements() const
Returns the number of elements of the vector.
void HigherLevelCompElementList3(TPZStack< TPZCompElSide > &elsidevec, int onlymultiphysicelement, int removeduplicates)
Returns all connected computational elements which have level higher to the current element if onlym...
void QsiElement(TPZVec< REAL > &qsi_side, TPZVec< REAL > &qsi_element) const
Parametric coordinate of a point loc of the side and return parametric element point.
void Read(TPZStream &buf, void *context) override
read objects from the stream
static void NormalizeVetor(TPZVec< Tvar > &vetor)
Normalizes the vector.
virtual void Print(std::ostream &out=std::cout)
Print all relevant data of the element to cout.
Contains declaration of the TPZNumeric class which implements several methods to calculation.
TPZGeoEl * Father() const
Computes the normal vectors needed for forming HDiv vector valued shape functions.
Contains TPZShapeQuad class which implements the shape functions of a quadrilateral element...
void Transpose(TPZMatrix< TVar > *const T) const override
It makes *T the transpose of current matrix.
int64_t SideNodeIndex(int nodenum) const
Returns the index of the nodenum node of side.
void InsertConnectivity(TPZGeoElSide &neighbour)
This method inserts the element/side and all lowerdimension sides into the connectivity loop...
static void WritePointer(const TPZSavable *obj, TPZStream *stream)
std::ostream & operator<<(std::ostream &out, const TPZGeoElSide &geoside)
Overload operator << to print geometric element side data.
Contains TPZShapeTriang class which implements the shape functions of a triangular element...
Implements computational element based on an interpolation space. Computational 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.
virtual void Read(bool &val)
virtual int MidSideConnectLocId(int is) const
Returns the local id of the connect in the middle of the side.
TPZAdmChunkVector< TPZGeoEl * > & ElementVec()
Methods for handling pzlists.