39 static LoggerPtr logger(Logger::getLogger(
"pz.mesh.tpzgeoel"));
40 static LoggerPtr loggerorient(Logger::getLogger(
"pz.mesh.tpzgeoel.orient"));
50 int64_t index = Index();
51 if (this->fFatherIndex != -1) {
56 int subelindex = WhichSubel();
57 if (subelindex == -1) {
60 Father()->SetSubElement(subelindex, 0);
64 fMesh->ElementVec()[index] = NULL;
65 fMesh->ElementVec().SetFree(index);
69 std::cout << __PRETTY_FUNCTION__ <<
" a derived class did reset the index of the element?\n";
85 this->fReference = NULL;
87 int64_t index = fMesh->ElementVec().AllocateNewElement();
89 fMesh->ElementVec()[index] =
this;
90 this->fNumInterfaces = 0;
107 this->
fMatId = materialid;
119 this->
fMatId = materialid;
129 if(num != 2 && num != 3){
130 PZError <<
"elcalc1d.shape, at this point only linear and quadratic elements\n";
140 phi(0,0) = -x*(1.-x)*0.5;
144 phi(2,0) = 0.5*x*(1.+x);
150 if(num != 2 && num != 3){
151 PZError <<
"TPZGeoEl ShapePhi1d, at this point only linear and quadratic elements\n";
159 phi(0,0) = -x*(1.-x)*0.5;
161 phi(2,0) = 0.5*x*(1.+x);
168 for(
int side=0; side<nums; side++) {
172 if((isn1 == SideNodeIds[0] && isn2 == SideNodeIds[1]) ||
173 (isn2 == SideNodeIds[0] && isn1 == SideNodeIds[1]))
return side;
178 int64_t sni[3],snx[3],k;
180 for(k=0;k<3;k++) sni[k] = SideNodeIds[k];
182 if(snx[0]==sni[k] && snx[1]==sni[(k+1)%3] && snx[2]==sni[(k+2)%3])
return side;
183 if(snx[0]==sni[k] && snx[1]==sni[(k+2)%3] && snx[2]==sni[(k+1)%3])
return side;
185 }
else if(
NSideNodes(side) == 4 && cap == 4) {
186 int64_t sni[4],snx[4],k;
188 for(k=0;k<4;k++) sni[k] = SideNodeIds[k];
191 if(snx[1]==sni[k] && snx[2]==sni[k%3+1] && snx[3]==sni[(k+1)%3+1])
return side;
192 if(snx[1]==sni[k] && snx[2]==sni[(k+1)%3+1] && snx[3]==sni[k%3+1])
return side;
194 }
else if(snx[1]==sni[0]) {
196 if(snx[0]==sni[k] && snx[2]==sni[k%3+1] && snx[3]==sni[(k+1)%3+1])
return side;
197 if(snx[0]==sni[k] && snx[2]==sni[(k+1)%3+1] && snx[3]==sni[k%3+1])
return side;
199 }
else if(snx[2]==sni[0]) {
201 if(snx[0]==sni[k] && snx[1]==sni[k%3+1] && snx[3]==sni[(k+1)%3+1])
return side;
202 if(snx[0]==sni[k] && snx[1]==sni[(k+1)%3+1] && snx[3]==sni[k%3+1])
return side;
204 }
else if(snx[3]==sni[0]) {
206 if(snx[0]==sni[k] && snx[1]==sni[k%3+1] && snx[2]==sni[(k+1)%3+1])
return side;
207 if(snx[0]==sni[k] && snx[1]==sni[(k+1)%3+1] && snx[2]==sni[k%3+1])
return side;
210 }
else if(cap<1 || cap > 4) {
212 for (is=0; is<nums; is++) {
218 PZError <<
"TPZGeoEl::WhichSide must be extended\n";
228 if(gel == thisside)
return 1;
230 if(!neighbour.
Exists())
return 0;
231 while(neighbour != thisside) {
232 if(gel == neighbour)
return 1;
240 out <<
"Element index " <<
fIndex << endl;
241 out <<
"Element id " <<
fId << endl;
242 out <<
"Is GeoBlend ? : ";
245 out <<
"true" << endl;
249 out <<
"false" << endl;
251 out <<
"Is Linear Mapping ? : ";
254 out <<
"true" << endl;
258 out <<
"false" << endl;
260 out <<
"Number of nodes " <<
NNodes() << endl;
262 out <<
"Nodes indexes ";
265 out <<
"\nNumber of sides " <<
NSides() << endl;
266 if (
fMatId < 0) out <<
"boundary condition " <<
fMatId << endl;
267 else out <<
"Material id " <<
fMatId << endl;
268 if (!
Father()) out <<
"no father\n";
269 else out <<
"Father index " <<
Father()->
Index() << endl;
272 out <<
"Subelement indexes ";
279 for (i = 0;i <
NSides();i++) {
280 out <<
"Neighbours for side " << i <<
" : ";
285 out <<
"No neighbour\n";
288 while (neighbour != thisside ) {
295 out <<
"Reference element pointer address: " <<
fReference << endl;
301 int64_t elIndex = this->
Index();
302 int nnodes = this->
NNodes();
303 out <<
"Element index: " << elIndex <<
"\n";
305 for(
int n = 0; n < nnodes; n++) {
310 out <<
"Node " << n <<
" : " << nodeX <<
" , " << nodeY <<
" , " << nodeZ <<
"\n";
324 father = father->
Father();
332 if(idfrom[0]==idto[0] && idfrom[1]==idto[1])
return 0;
333 if(idfrom[0]==idto[0] && idfrom[1]==idto[3])
return 1;
335 if(idfrom[0]==idto[3] && idfrom[1]==idto[0])
return 2;
336 if(idfrom[0]==idto[1] && idfrom[1]==idto[0])
return 3;
338 if(idfrom[0]==idto[2] && idfrom[1]==idto[3])
return 4;
339 if(idfrom[0]==idto[2] && idfrom[1]==idto[1])
return 5;
341 if(idfrom[0]==idto[1] && idfrom[1]==idto[2])
return 6;
342 if(idfrom[0]==idto[3] && idfrom[1]==idto[2])
return 7;
349 if(idto[0]==idfrom[0] && idto[1]==idfrom[1])
return 0;
350 if(idto[0]==idfrom[0] && idto[1]==idfrom[2])
return 1;
352 if(idto[0]==idfrom[1] && idto[1]==idfrom[2])
return 2;
353 if(idto[0]==idfrom[1] && idto[1]==idfrom[0])
return 3;
355 if(idto[0]==idfrom[2] && idto[1]==idfrom[0])
return 4;
356 if(idto[0]==idfrom[2] && idto[1]==idfrom[1])
return 5;
363 if(elem == 0 &&
id == 0) {
364 PZError <<
"\nTPZGeoEl::ElementExists : element id or element pointer will not be null\n";
368 for(index=0;index<nelg;index++) {
371 if(gel == elem || gel->
Id() == id)
return index;
377 PZError <<
"TPZGeoEl::Father2 should never be called\n";
382 PZError <<
"TPZGeoEl::FatherSide should never be called\n";
387 PZError <<
"TPZGeoEl::BuildTransform2 should never be called\n";
394 PZError <<
"TPZGeoEl::GetSubElements2 should never be called\n";
403 for(s=0; s<cap; s++) {
405 subel.
Push(subel2[s]);
413 PZError << __PRETTY_FUNCTION__ <<
"is deprecated. Use TPZGeoEl::YoungestChildren instead \n";
417 for(
int s = 0; s < nsons; s++)
422 unrefinedSons.
Push(son);
434 for(
int s = 0; s < nsons; s++)
439 unrefinedSons.
Push(son);
451 PZError <<
"TPZGeoEl::WhichSubel called with null element\n";
457 for(son=0;son<
nsub;son++)
if(father->
SubElement(son) ==
this)
break;
459 PZError <<
"TPZGeoEl::WhichSubel son does not exist\n";
462 std::stringstream sout;
463 sout <<
"Father element\n";
465 sout <<
"Son element\n";
483 for(is=0; is<nums; is++) {
492 for(d=0; d<dim; d++) {
493 dif += (pt[d]-pt2[d])*(pt[d]-pt2[d]);
496 if(dif < tol)
return is;
498 cout <<
"TPZGeoEl::WhichSide ERROR : side not found" << endl ;
507 int side,nsubside,isub,ok;
509 ofstream out(
"Checksubdata.dat");
510 for(side=0;side<
NSides();side++){
513 for(isub=0;isub<nsubside;isub++){
518 cout <<
"Inconsistencia de dados : \n";
519 cout <<
"Pai atual/lado : " <<
Id() <<
"/" << side << endl;
520 cout <<
"Pai do sub elemento e' nulo!\n";
521 cout <<
"Sub elemento/lado : " << neigh.
Element()->
Id() <<
"/" << neigh.
Side() << endl;
525 cout <<
"Pai atual/lado : " <<
Id() <<
"/" << side << endl;
526 cout <<
"Sub elemento/lado : " << neigh.
Element()->
Id() <<
"/" << neigh.
Side() << endl;
527 cout <<
"Pai sub elemento/lado : " << fatside.
Element()->
Id() <<
"/" << fatside.
Side() << endl;
528 out <<
"Pai atual/lado : " <<
Id() <<
"/" << side << endl;
529 out <<
"Sub elemento/lado : " << neigh.
Element()->
Id() <<
"/" << neigh.
Side() << endl;
530 out <<
"Pai sub elemento/lado : " << fatside.
Element()->
Id() <<
"/" << fatside.
Side() << endl;
531 if(fatside.
Side()!=side){
532 cout <<
"Dados acima inconsistentes : lados distintos\n";
533 out <<
"Dados acima inconsistentes : lados distintos\n";
537 cout <<
"OK!: Vizinho com pai diferente\n";
541 cout <<
"Vizinho nulo\n\n";
542 out <<
"Vizinho nulo\n\n";
547 if(neigh.
Element()==subside[isub].Element())
break;
550 while(gel && !(gel==
this)) neigh = neigh.
Neighbour();
551 if(neigh.
Element()==subside[isub].Element()){
552 cout <<
"Nao existe vizinho irmao!\n";
553 cout <<
"Sub elemento/lado " << neigh.
Element()->
Id() <<
"/" << neigh.
Side() << endl;
573 subel[0].SetConnectivity(thisside);
580 while(neighbour.
Exists() && neighbour != thisside)
598 for (
int isub=0; isub<nsubel; isub++)
615 for(
int c = 0; c < 3; c++)
620 for(
int n = 1; n < nn; n++)
623 for(
int c = 0; c < 3; c++)
625 xmin[c] =
Min(values[c],xmin[c]);
626 xmax[c] =
Max(values[c],xmax[c]);
629 REAL diagVecNorm = 0.;
630 for(
int c = 0; c < 3; c++)
632 diagVecNorm += (xmax[c]-xmin[c])*(xmax[c]-xmin[c]);
634 diagVecNorm =
sqrt(diagVecNorm);
643 int firstEdge = this->
NNodes();
649 this->
Mesh()->
NodeVec()[node0id].GetCoordinates(coords0);
650 this->
Mesh()->
NodeVec()[node1id].GetCoordinates(coords1);
651 for(
int c = 0; c < 3; c++)
653 REAL delta = coords1[c] - coords0[c];
658 for(
int s = firstEdge+1; s < this->
NSides(); s++)
669 this->
Mesh()->
NodeVec()[node0id].GetCoordinates(coords0);
670 this->
Mesh()->
NodeVec()[node1id].GetCoordinates(coords1);
672 for(
int c = 0; c < 3; c++)
674 REAL delta = coords1[c] - coords0[c];
675 normTemp += delta*delta;
677 normTemp =
sqrt(normTemp);
679 norm =
Min(norm,normTemp);
689 const int nMaxIter = 10000;
697 PZError <<
"\nTPZGeoEl::ComputeXInverse vector dimension error\n";
705 DelX(i,0) = XD[i]-X0[i];
707 error =
Norm(DelX)/radius;
721 for(in=0; in<nn; in++)
725 for(i=0; i<3; i++) DelX(i,0) = XD[i]-values[i];
726 error =
Norm(DelX)/radius;
736 while(error > Tol && iter < nMaxIter)
746 if(
fabs(detJ) < 2.e-10)
750 cout <<
"ComputeXInverse found zero Jacobian Index " << this->
fIndex <<
" qsi " << qsi <<
" detJ " << detJ << std::endl;
751 for(
int ik = 0; ik < qsi.
NElements(); ik++)
753 qsi[ik] += Tol*(center[ik]-qsi[ik]);
755 residual(0,0) = 1.e12;
764 JX(0,0) = axest(0,0)*J(0,0);
765 JX(1,0) = axest(1,0)*J(0,0);
766 JX(2,0) = axest(2,0)*J(0,0);
774 JXt.Multiply(JX,JXtJX,0);
775 JXt.Multiply(DelX,residual);
779 qsi[i] += residual(i,0);
786 DelX(i,0) = XD[i]-X0[i];
791 error =
Norm(DelX)/radius;
797 std::stringstream sout;
798 sout <<
"Error at " << __PRETTY_FUNCTION__ <<
" - nMaxIter was reached before tolerance is achieved - ElementId" << this->
Id() << std::endl;
799 PZError <<
"\n" << sout.str() <<
"\n";
802 for (
int i=0; i<
NNodes(); i++) {
821 PZError <<
"\nTPZGeoEl::TransformSonToFather vector dimension error\n";
829 while(father != ancestor)
831 father = father->
Father();
839 tr.
Apply(qsiSon, qsiAncestor);
853 PZError <<
"\nTPZGeoEl::ComputeParamTrans called with sides error\n";
872 REAL D2Edaikdaij,D2Edcidaij,D2Edci2;
875 for(ij=0;ij<dimss;ij++){
876 for(ik=ij;ik<dimss;ik++){
879 for(indp = 0; indp < intrule->
NPoints(); ++indp){
880 intrule->
Point(indp,intpoint,weight);
883 D2Edaikdaij += intpoint[ik]*intpoint[ij]*weight;
884 if(ik==ij) D2Edcidaij += intpoint[ij]*weight;
885 if(ij==0 && ik==0) D2Edci2 += weight;
887 hess(ij,ik) = 2.*D2Edaikdaij;
888 hess(ik,ij) = hess(ij,ik);
890 hess(ij,dimss) = 2.*D2Edcidaij;
891 hess(dimss,ij) = hess(ij,dimss);
893 if(ij==0 && ik==0) hess(dimss,dimss) = 2.*D2Edci2;
905 for(
int ifat=0;ifat<dimsf;ifat++){
907 for(j=0;j<(dimss+1);j++){
909 for(indp = 0; indp < intrule->
NPoints(); ++indp){
910 intrule->
Point(indp,intpoint,weight);
911 tsidetoson.
Apply(intpoint,sidepoint);
916 fatelside.
Apply(csi,outcsi);
918 if(j<dimss) DEdaij += outcsi[ifat]*intpoint[j]*weight;
919 if(j==0) DEdci += outcsi[ifat]*weight;
921 if(j<dimss) grad0(j,0) = 2.*DEdaij;
922 if(j==0) grad0(dimss,0) = 2.*DEdci;
923 if(!dimss) grad0(0,0) = DEdci;
927 for(
int k=0;k<dimss;k++) A(ifat,k) = grad0(k,0);
928 sol(ifat,0) = grad0(dimss,0);
939 PZError <<
"TPZGeoEl::Distance point dimension error\n";
944 distance += (centel[i]-centface[i])*(centel[i]-centface[i]);
946 return sqrt(distance);
962 REAL mindist = 1000.;
969 for(
int iside = 0; iside < nsides - 1; iside++){
971 X(centface,massface);
973 if(mindist > dist) mindist =
dist;
982 REAL mindist = 1000.,
dist;
985 int nfaces,face,face0;
986 if(
NSides()==15) {nfaces = 14; face0 = 10;}
987 else if(
NSides()==19) {nfaces = 18; face0 = 13;}
988 else if(
NSides()==21) {nfaces = 20; face0 = 15;}
989 else if(
NSides()==27) {nfaces = 26; face0 = 20;}
991 for(face=face0;face<nfaces;face++){
993 X(centface,massface);
1002 PZError <<
"TPZGeoEl::ElementRadius - Dimension not implemented." << endl;
1012 PZError <<
"TPZGeoEl::AreaFromTheFaceT argument error size: nodes\n";
1017 REAL cb0 = nodes[2]->Coord(0) - nodes[1]->Coord(0);
1018 REAL cb1 = nodes[2]->Coord(1) - nodes[1]->Coord(1);
1019 REAL cb2 = nodes[2]->Coord(2) - nodes[1]->Coord(2);
1020 REAL ab0 = nodes[0]->Coord(0) - nodes[1]->Coord(0);
1021 REAL ab1 = nodes[0]->Coord(1) - nodes[1]->Coord(1);
1022 REAL ab2 = nodes[0]->Coord(2) - nodes[1]->Coord(2);
1025 REAL coord0 = cb1*ab2-ab1*cb2;
1026 REAL coord1 = ab0*cb2-cb0*ab2;
1027 REAL coord2 = cb0*ab1-ab0*cb1;
1029 return ( 0.5*
sqrt(coord0*coord0+coord1*coord1+coord2*coord2) );
1034 PZError <<
"TPZGeoEl::AreaFromTheFaceQ argument error size: nodes\n";
1041 nodes[1] = nodes[0];
1043 nodes[0] = nodes[2];
1044 nodes[2] = nodes[1];
1045 nodes[1] = nodes[3];
1049 return (areat1+areat2);
1059 GradX(param, gradx);
1060 Jacobian(gradx,jacobian,axes,detjac,jacinv);
1066 if(side < 0 || side >
NSides()-1)
1067 PZError <<
"TPZGeoEl::AreaFromTheFace side error, side = " << side << endl;
1072 return gelside.
Area();
1100 int nsides =
NSides(),side;
1101 for(side=0;side<nsides;side++){
1105 if(neighbour != thisside){
1112 }
while (neighbour != neighneigh);
1119 for (i=0;i<
NSides();i++){
1130 if (!neighside.
Element() || neighside.
Side() == -1){
1140 if(indices[0] == -1) indices.
Resize(0);
1148 if(logger->isDebugEnabled())
1150 std::stringstream sout;
1151 gradx.
Print(
"gradx",sout);
1155 Jacobian(gradx, jac, axes, detjac, jacinv);
1169 int nrows = gradx.
Rows();
1170 int ncols = gradx.
Cols();
1194 for (
int i = 0; i < nrows; i++) {
1195 v_1[i] = gradx.
GetVal(i,0);
1199 for(
int i = 0; i < nrows; i++) {
1200 norm_v_1 += v_1[i]*v_1[i];
1203 norm_v_1 =
sqrt(norm_v_1);
1204 jac(0,0) = norm_v_1;
1211 std::stringstream sout;
1212 sout <<
"Singular Jacobian, 1 determinant of jacobian = " << detjac << std::endl;
1219 jacinv(0,0) = 1.0/detjac;
1221 for(
int i=0; i < 3; i++) {
1222 axes(0,i) = v_1[i]/norm_v_1;
1241 for (
int i = 0; i < nrows; i++) {
1242 v_1[i] = gradx.
GetVal(i,0);
1243 v_2[i] = gradx.
GetVal(i,1);
1246 REAL norm_v_1_til = 0.0;
1247 REAL norm_v_2_til = 0.0;
1248 REAL v_1_dot_v_2 = 0.0;
1250 for(
int i = 0; i < 3; i++) {
1251 norm_v_1_til += v_1[i]*v_1[i];
1252 v_1_dot_v_2 += v_1[i]*v_2[i];
1254 norm_v_1_til =
sqrt(norm_v_1_til);
1256 for(
int i=0 ; i < 3; i++) {
1257 v_1_til[i] = v_1[i] / norm_v_1_til;
1258 v_2_til[i] = v_2[i] - v_1_dot_v_2 * v_1_til[i] / norm_v_1_til;
1259 norm_v_2_til += v_2_til[i]*v_2_til[i];
1261 norm_v_2_til =
sqrt(norm_v_2_til);
1264 jac(0,0) = norm_v_1_til;
1265 jac(0,1) = v_1_dot_v_2/norm_v_1_til;
1266 jac(1,1) = norm_v_2_til;
1268 detjac = jac(0,0)*jac(1,1)-jac(1,0)*jac(0,1);
1270 jacinv(0,0) = +jac(1,1)/detjac;
1271 jacinv(1,1) = +jac(0,0)/detjac;
1272 jacinv(0,1) = -jac(0,1)/detjac;
1273 jacinv(1,0) = -jac(1,0)/detjac;
1279 std::stringstream sout;
1280 sout <<
"Singular Jacobian, 2 determinant of jacobian = " << detjac << std::endl;
1287 for(
int i=0; i < 3; i++) {
1288 v_2_til[i] /= norm_v_2_til;
1289 axes(0,i) = v_1_til[i];
1290 axes(1,i) = v_2_til[i];
1302 for (
int i = 0; i < nrows; i++) {
1303 jac(i,0) = gradx.
GetVal(i,0);
1304 jac(i,1) = gradx.
GetVal(i,1);
1305 jac(i,2) = gradx.
GetVal(i,2);
1308 detjac -= jac(0,2)*jac(1,1)*jac(2,0);
1309 detjac += jac(0,1)*jac(1,2)*jac(2,0);
1310 detjac += jac(0,2)*jac(1,0)*jac(2,1);
1311 detjac -= jac(0,0)*jac(1,2)*jac(2,1);
1312 detjac -= jac(0,1)*jac(1,0)*jac(2,2);
1313 detjac += jac(0,0)*jac(1,1)*jac(2,2);
1319 std::stringstream sout;
1320 sout <<
"Singular Jacobian, 3 determinant of jacobian = " << detjac << std::endl;
1327 jacinv(0,0) = (-jac(1,2)*jac(2,1)+jac(1,1)*jac(2,2))/detjac;
1328 jacinv(0,1) = ( jac(0,2)*jac(2,1)-jac(0,1)*jac(2,2))/detjac;
1329 jacinv(0,2) = (-jac(0,2)*jac(1,1)+jac(0,1)*jac(1,2))/detjac;
1330 jacinv(1,0) = ( jac(1,2)*jac(2,0)-jac(1,0)*jac(2,2))/detjac;
1331 jacinv(1,1) = (-jac(0,2)*jac(2,0)+jac(0,0)*jac(2,2))/detjac;
1332 jacinv(1,2) = ( jac(0,2)*jac(1,0)-jac(0,0)*jac(1,2))/detjac;
1333 jacinv(2,0) = (-jac(1,1)*jac(2,0)+jac(1,0)*jac(2,1))/detjac;
1334 jacinv(2,1) = ( jac(0,1)*jac(2,0)-jac(0,0)*jac(2,1))/detjac;
1335 jacinv(2,2) = (-jac(0,1)*jac(1,0)+jac(0,0)*jac(1,1))/detjac;
1348 std::cout <<
" Object with wrong dimensions, unable to compute jacobian matrix. Dimension = " << dim << std::endl;
1359 int nrows = gradx.
Rows();
1360 int ncols = gradx.
Cols();
1372 if (gradx.
GetVal(0,0) != 0.0) {
1375 std::cout <<
"TPZGeoEl::JacobianXYZ -> Geometric mesh is not oriented with x axis. Should be called TPZGeoEl::Jacobian " << std::endl;
1379 jac(0,0) = gradx.
GetVal(0,0);
1380 detjac = gradx.
GetVal(0,0);
1381 jacinv(0,0) = 1.0/gradx.
GetVal(0,0);
1390 std::stringstream sout;
1391 sout <<
"Singular Jacobian, 4 determinant of jacobian = " << detjac << std::endl;
1402 if (gradx.
GetVal(1,0) != 0.0) {
1405 std::cout <<
"TPZGeoEl::JacobianXYZ -> Geometric mesh is not oriented with y axis. Should be called TPZGeoEl::Jacobian " << std::endl;
1409 jac(0,0) = gradx.
GetVal(1,0);
1410 detjac = gradx.
GetVal(1,0);
1411 jacinv(0,0) = 1.0/gradx.
GetVal(1,0);
1420 std::stringstream sout;
1421 sout <<
"Singular Jacobian, 5 determinant of jacobian = " << detjac << std::endl;
1431 if (gradx.
GetVal(2,0) != 0.0) {
1434 std::cout <<
"TPZGeoEl::JacobianXYZ -> Geometric mesh is not oriented with z axis. Should be called TPZGeoEl::Jacobian " << std::endl;
1438 jac(0,0) = gradx.
GetVal(2,0);
1439 detjac = gradx.
GetVal(2,0);
1440 jacinv(0,0) = 1.0/gradx.
GetVal(2,0);
1449 std::stringstream sout;
1450 sout <<
"Singular Jacobian, 6 determinant of jacobian = " << detjac << std::endl;
1472 std::cout <<
"TPZGeoEl::JacobianXYZ -> Geometric mesh is not oriented with XY plane. Should be called TPZGeoEl::Jacobian " << std::endl;
1477 jac(0,0) = gradx.
GetVal(0,0);
1478 jac(1,0) = gradx.
GetVal(1,0);
1479 jac(0,1) = gradx.
GetVal(0,1);
1480 jac(1,1) = gradx.
GetVal(1,1);
1482 detjac = jac(0,0)*jac(1,1)-jac(1,0)*jac(0,1);
1483 jacinv(0,0) = +jac(1,1)/detjac;
1484 jacinv(1,1) = +jac(0,0)/detjac;
1485 jacinv(0,1) = -jac(0,1)/detjac;
1486 jacinv(1,0) = -jac(1,0)/detjac;
1496 std::stringstream sout;
1497 sout <<
"Singular Jacobian, 7 determinant of jacobian = " << detjac << std::endl;
1510 std::cout <<
"TPZGeoEl::JacobianXYZ -> Geometric mesh is not oriented with XZ plane. Should be called TPZGeoEl::Jacobian " << std::endl;
1515 jac(0,0) = gradx.
GetVal(0,0);
1516 jac(1,0) = gradx.
GetVal(2,0);
1517 jac(0,1) = gradx.
GetVal(0,1);
1518 jac(1,1) = gradx.
GetVal(2,1);
1520 detjac = jac(0,0)*jac(1,1)-jac(1,0)*jac(0,1);
1521 jacinv(0,0) = +jac(1,1)/detjac;
1522 jacinv(1,1) = +jac(0,0)/detjac;
1523 jacinv(0,1) = -jac(0,1)/detjac;
1524 jacinv(1,0) = -jac(1,0)/detjac;
1534 std::stringstream sout;
1535 sout <<
"Singular Jacobian, 8 determinant of jacobian = " << detjac << std::endl;
1548 std::cout <<
"TPZGeoEl::JacobianXYZ -> Geometric mesh is not oriented with YZ plane. Should be called TPZGeoEl::Jacobian " << std::endl;
1553 jac(0,0) = gradx.
GetVal(1,0);
1554 jac(1,0) = gradx.
GetVal(2,0);
1555 jac(0,1) = gradx.
GetVal(1,1);
1556 jac(1,1) = gradx.
GetVal(2,1);
1558 detjac = jac(0,0)*jac(1,1)-jac(1,0)*jac(0,1);
1559 jacinv(0,0) = +jac(1,1)/detjac;
1560 jacinv(1,1) = +jac(0,0)/detjac;
1561 jacinv(0,1) = -jac(0,1)/detjac;
1562 jacinv(1,0) = -jac(1,0)/detjac;
1572 std::stringstream sout;
1573 sout <<
"Singular Jacobian, 9 determinant of jacobian = " << detjac << std::endl;
1593 for (
int i = 0; i < nrows; i++) {
1594 jac(i,0) = gradx.
GetVal(i,0);
1595 jac(i,1) = gradx.
GetVal(i,1);
1596 jac(i,2) = gradx.
GetVal(i,2);
1599 detjac = -jac(0,2)*jac(1,1)*jac(2,0);
1600 detjac += jac(0,1)*jac(1,2)*jac(2,0);
1601 detjac += jac(0,2)*jac(1,0)*jac(2,1);
1602 detjac -= jac(0,0)*jac(1,2)*jac(2,1);
1603 detjac -= jac(0,1)*jac(1,0)*jac(2,2);
1604 detjac += jac(0,0)*jac(1,1)*jac(2,2);
1606 jacinv(0,0) = (-jac(1,2)*jac(2,1)+jac(1,1)*jac(2,2))/detjac;
1607 jacinv(0,1) = ( jac(0,2)*jac(2,1)-jac(0,1)*jac(2,2))/detjac;
1608 jacinv(0,2) = (-jac(0,2)*jac(1,1)+jac(0,1)*jac(1,2))/detjac;
1609 jacinv(1,0) = ( jac(1,2)*jac(2,0)-jac(1,0)*jac(2,2))/detjac;
1610 jacinv(1,1) = (-jac(0,2)*jac(2,0)+jac(0,0)*jac(2,2))/detjac;
1611 jacinv(1,2) = ( jac(0,2)*jac(1,0)-jac(0,0)*jac(1,2))/detjac;
1612 jacinv(2,0) = (-jac(1,1)*jac(2,0)+jac(1,0)*jac(2,1))/detjac;
1613 jacinv(2,1) = ( jac(0,1)*jac(2,0)-jac(0,0)*jac(2,1))/detjac;
1614 jacinv(2,2) = (-jac(0,1)*jac(1,0)+jac(0,0)*jac(1,1))/detjac;
1620 std::stringstream sout;
1621 sout <<
"Singular Jacobian, 10 determinant of jacobian = " << detjac << std::endl;
1638 std::cout <<
" Object with wrong dimensions, unable to compute jacobian matrix. Dimension = " << dim << std::endl;
1648 PZError <<
"TPZGeoEl::SetRefPattern ERROR : Should not be called in TPZGeoEl" << endl;
1675 this->
fMesh = &DestMesh;
1686 this->
fMesh = &DestMesh;
1691 else if (org2clnMap.find(cp.
fFatherIndex) == org2clnMap.end())
1693 std::stringstream sout;
1694 sout <<
"ERROR in - " << __PRETTY_FUNCTION__
1695 <<
" original father element index: " << cp.
fIndex <<
" is not mapped!";
1701 if (org2clnMap.find(cp.
fIndex) == org2clnMap.end())
1703 std::stringstream sout;
1704 sout <<
"ERROR in - " << __PRETTY_FUNCTION__
1705 <<
" original element index: " << cp.
fIndex <<
" is not mapped!";
1726 for(
int inode = 0; inode < nnodes; inode++){
1727 for(
int dim = 0; dim < 3; dim++){
1731 this->
X(qsi,MappedX);
1733 for(
int dim = 0; dim < 3; dim++){
1734 error += (NodeX[dim]-MappedX[dim])*(NodeX[dim]-MappedX[dim]);
1736 error =
sqrt(error);
1737 if(error > tol || !(error==error)){
1738 std::stringstream mess;
1739 mess <<
"FATAL ERROR AT " << __PRETTY_FUNCTION__ <<
" - Node coordinate differs from mapped node.\n";
1741 PZError << mess.str() <<
"\n";
1925 if(NextSideNeighbour.
IsRelative(ElemSide) ==
false){
1936 NextSideNeighbour = NextSide.
Neighbour();
1939 NextSideNeighbour = NextSide.
Neighbour();
1945 if(NextSideNeighbour.
IsRelative(ElemSide) ==
false){
1954 NextSideNeighbour = NextSide.
Neighbour();
1961 const int nsides = this->
NSides();
1962 for(
int byside = this->
NNodes(); byside < nsides; byside++)
1989 if(father) nextfather = father->
Father();
1992 father = nextfather;
1993 nextfather = father->
Father();
2013 if(logger->isDebugEnabled())
2015 std::stringstream sout;
2016 sout<<
"Centro de LC "<<XLC<<
" Centro de LS "<<XLS<<std::endl;
2025 for(i=0; i<3; i++) dir[i] = XLS[i]-XLC[i];
2031 LS.
Jacobian(LSCenter,jacobian,axes,detjac,jacinv);
2034 if(logger->isDebugEnabled())
2036 std::stringstream sout;
2037 sout<<
"vetor axes "<<axes<<std::endl;
2038 sout<<
"vetor dir "<<dir<<std::endl;
2045 for(i=0; i<3; i++)
for(j=0; j<axes.
Rows(); j++)
2047 axtrans(i,j) = axes(j,i);
2052 axtrans(i,lastcol) = dir[i];
2057 if(logger->isDebugEnabled())
2059 std::stringstream sout;
2060 sout <<
"axtrans = ";
2061 axtrans.
Print(
"axtrans matrix",sout);
2073 if(logger->isDebugEnabled())
2075 std::stringstream sout;
2076 sout <<
"Vetr Apos GramSchmidt = ";
2077 ortho.Print(
"Orthog matrix",sout);
2078 transf.Print(
"TransfToOrthog matrix",sout);
2087 normal[i] = ortho(i,lastcol);
2096 if(logger->isDebugEnabled())
2098 std::stringstream sout;
2099 sout<<
"Normalize..u.n=1 "<<std::endl;
2100 sout<<
"normlow "<<normlow<<
" normal "<<normal<<std::endl;
2110 inner += normlow[i]*normal[i];
2115 LOGPZ_ERROR(logger,
"Inner product zero to normalize vector")
2123 normlow[i] /= inner;
2374 if(dimside != dimel-1)
2376 LOGPZ_ERROR(logger,
"NormalOrientation called with wrong side")
2380 if (loggerorient->isDebugEnabled())
2382 std::stringstream sout;
2385 sout <<
"Comp Element index " << cel->
Index() << std::endl;
2387 sout <<
"Element index " << this->
Index() <<
" Id = " << this->
Id() <<
" side = " << side;
2397 fatherside = fatherside.
Father2();
2401 if (loggerorient->isDebugEnabled())
2403 std::stringstream sout;
2404 sout <<
"largest father index " << thisside.
Element()->
Index() <<
" id = " << thisside.Element()->Id() << std::endl;
2412 if(!neighbour.Exists() )
2416 fatherside = neighbour.
Father2();
2418 while ((neighbour.Element()->Dimension() !=
Dimension() && neighbour != thisside) || (fatherside && fatherside.
Dimension() == dimside)) {
2420 fatherside = neighbour.
Father2();
2422 if (neighbour == thisside) {
2427 if(!thisside.NeighbourExists(neighbour))
2429 std::stringstream sout;
2438 if (loggerorient->isDebugEnabled())
2440 std::stringstream sout;
2441 sout <<
"Element index " <<
Index() << std::endl;
2442 sout <<
"neighbour index " << neighbour.Element()->Index() <<
" id = " << neighbour.Element()->Id() <<
" side " << neighbour.Side() << std::endl;
2443 sout <<
"thisside index " << thisside.Element()->Index() <<
" id = " << thisside.Element()->Id() <<
" side " << thisside.Side() << std::endl;
2444 if(thisside.Element()->Id() < neighbour.Element()->Id())
2446 sout <<
"returning 1\n";
2449 sout <<
"returning -1\n";
2455 if(thisside.Element()->Id() < neighbour.Element()->Id())
2467 std::set<int> allside;
2468 allside.insert(&allsides[0],&allsides[0]+allsides.
NElements());
2477 for(is=0; is<nhigh; is++)
2479 int highside = highsides[is].Side();
2480 if(allside.find(highside) == allside.end())
2491 for(
int s = 0; s < nsons; s++)
2498 int oldSize = unrefinedSons.
NElements();
2499 unrefinedSons.
Resize(oldSize+1, son);
2514 if(dimension != sidedimension+1)
2516 std::stringstream sout;
2517 sout <<
"HDivPermutation called with wrong side parameter " << side;
2521 cout << sout.str() << std::endl;
2527 const int nnodes = this->
NNodes();
2528 nodeindices.
Resize( nnodes );
2529 for(
int i = 0; i < nnodes; i++){
2535 nodeindices.clear();
2536 const int nnodes = this->
NNodes();
2537 for(
int i = 0; i < nnodes; i++){
2548 for (
int in = 0; in < this->
NNodes(); in++) {
2551 coordinates(0,in) = co[0];
2552 coordinates(1,in) = co[1];
2553 coordinates(2,in) = co[2];
2559 return Hash(
"TPZGeoEl");
virtual int64_t SideNodeIndex(int side, int nodenum) const =0
Returns the index of the nodenum node of side.
void Normalize(TPZVec< REAL > &normlow, TPZVec< REAL > &normal)
Normalize normlow vector (in self)
virtual REAL SmallerEdge()
Contains TPZShapeTetra class which implements the shape functions of a tetrahedral element...
void Print(std::ostream &out=std::cout)
Prints the structural information of the vector object to the output stream. This method will not p...
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ fabs
virtual TPZGeoElSide Father2(int side) const
Returns the father/side of the father which contains the side of the sub element. ...
REAL Volume()
Return the volume of the 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.
TPZGeoNode * NodePtr(int i) const
Returns a pointer to the ith node of the element.
bool IsZero(long double a)
Returns if the value a is close Zero as the allowable tolerance.
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 ConjugateSide(TPZGeoEl *gel, int side, TPZStack< int > &allsides)
Find a side which is not contained in allsides and whose dimension is one higher than the dimension o...
static REAL QuadArea(TPZVec< TPZGeoNode *> &nodes)
Returns the area from a quadrilateral face.
clarg::argBool bc("-bc", "binary checkpoints", false)
void GramSchmidt(TPZFMatrix< TVar > &Orthog, TPZFMatrix< TVar > &TransfToOrthog)
This method implements a Gram Schimidt method. this = Orthog.TransfToOrthog.
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.
Contains declaration of TPZGeoNode class which defines a geometrical node.
int NSubElements()
return the number of element/side pairs which compose the current set of points
REAL Coord(int i) const
Returns i-th coordinate of the current node.
clarg::argInt nsub("-nsub", "number of substructs", 4)
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
static REAL TriangleArea(TPZVec< TPZGeoNode *> &nodes)
Returns the area from the triangular face.
static REAL Distance(TPZVec< REAL > ¢el, TPZVec< REAL > ¢face)
Contains declaration of TPZCompEl class which defines the interface of a computational element...
Templated vector implementation.
TPZGeoEl * Element(int iel)
It returns the element number iel from the stack of elements of the geometric mesh.
virtual bool IsGeoElMapped() const
Returns if is a TPZGeoElMapped< T > element.
TPZGeoElSide Father2() const
returns the father/side pair which contains the set of points associated with this/side ...
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...
TPZTransform< REAL > Projection(int side)
Compute the projection of the point within the interior of the element to the side of the element...
groups all classes dedicated to the computation of shape functions
int64_t fFatherIndex
Index of the element from which the element is a subelement.
virtual int NCornerNodes() const =0
Returns the number of corner nodes of the element.
Contains the TPZRefQuad class which implements the uniform refinement of a geometric quadrilateral el...
void Write(TPZStream &str, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
virtual TPZGeoNode * SideNodePtr(int side, int nodenum) const
Returns the pointer to the nodenum node of side.
void GetSubElements2(TPZStack< TPZGeoElSide > &subelements)
build the list of element/side pairs which compose the current set of points
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
static int fatherside[8][21]
int HasSubElement()
Return 1 if the element has subelements along side.
int64_t NElements() const
Access method to query the number of elements of the vector.
TPZGeoElSide Neighbour() const
TPZGeoMesh * Mesh() const
Returns the mesh to which the element belongs.
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.
static TPZSavable * GetInstance(const int64_t &objId)
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...
void CenterPoint(TPZVec< REAL > ¢er) const
return the coordinates of the center in master element space (associated with the side) ...
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 fMatId
Material index.
int WhichSide(TPZVec< int64_t > &SideNodeIds)
Returns the side number which is connected to the SideNodes returns -1 if no side is found...
void CheckSubelDataStructure()
Checks the structure of the Father() and GetSubelement2()
Contains TPZShapeLinear class which implements the shape functions of a linear one-dimensional elemen...
Contains the TPZRefPyramid class which implements the uniform refinement of a geometric hexahedral el...
void SetElementIdUsed(int64_t id)
Indicates that an element with id was created.
static void BuildConnectivities(TPZVec< TPZGeoElSide > &elvec, TPZVec< TPZGeoElSide > &neighvec)
Abstract class defining integration rules. Numerical Integration.
TPZTransform< REAL > ComputeParamTrans(TPZGeoEl *fat, int fatside, int sideson)
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
TPZGeoEl * EldestAncestor() const
Contains TPZShapeCube class which implements the shape functions of a hexaedral element.
void NormalVector(TPZGeoElSide &LC, TPZGeoElSide &LS, TPZVec< REAL > &normal)
Computes the normal vector goes from the center of the conjugate side (LC) to the center of the LS si...
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...
static int highsides[27][7]
For each side was stored the sides connected with it but of the higher dimension. ...
TPZCompEl * CreateCompEl(TPZGeoEl *gel, int64_t &index)
Create a computational element based on the geometric element.
int64_t fId
Traditional element number or element id.
int Zero() override
Makes Zero all the elements.
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...
Contains the TPZRefPrism class which implements the uniform refinement of a geometric prism element...
friend std::ostream & operator<<(std::ostream &s, TPZGeoEl &el)
Equivalent to Print.
virtual void GetAllSiblings(TPZStack< TPZGeoEl *> &unrefinedSons)
[deprecated] use YoungestChildren
int ClassId() const override
Define the class id associated with the class.
int64_t CreateUniqueElementId()
Returns ++fElementMaxId.
Contains declaration of TPZMesh class which defines a geometrical mesh and contains a corresponding l...
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...
void Push(const T object)
Pushes a copy of the object on the stack.
int Level()
Returns the number of ancestors.
virtual TPZCompEl * CreateBCCompEl(int side, int bc, TPZCompMesh &cmesh)
Method which creates a computational boundary condition element based on the current geometric elemen...
int ElementExists(TPZGeoEl *elem, int64_t id)
To test continuity.
virtual void Write(const bool val)
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...
const T & Max(const T &a, const T &b)
Returns the maximum value between a and b.
int64_t Index() const
Returns the index of the element within the element vector of the mesh.
TVar Norm(const TPZFMatrix< TVar > &A)
Returns the norm of the matrix A.
Contains the TPZGeoTetrahedra class which implements the geometry of a tetrahedral element...
Contains TPZMatrixclass which implements full matrix (using column major representation).
#define DebugStop()
Returns a message to user put a breakpoint in.
virtual int FatherSide(int side, int son)
virtual void SetOrder(TPZVec< int > &ord, int type=0)=0
Sets the order of the cubature rule.
virtual void MidSideNodeIndices(int side, TPZVec< int64_t > &indices) const
Returns the midside node indices along a side of the element.
#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.
void ShapePhi1d(REAL x, int num, TPZFMatrix< REAL > &phi)
Computes the values of the "num" one dimensional shapefunctions at point x, using lagrangian interpol...
virtual void GetHigherSubElements(TPZVec< TPZGeoEl *> &unrefinedSons)
TPZCompEl * fReference
Reference to the element currently loaded. Pointer is given as this->Mesh()->Reference()->ElementVec(...
int fNumInterfaces
A counter to indicate how many interface elements are pointing to it.
void RemoveConnectivity()
Remove the element from the connectivity loop.
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/...
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 ...
TPZAdmChunkVector< TPZGeoNode > & NodeVec()
TPZCompEl * Reference() const
Return a pointer to the element referenced by the geometric element.
void BuildBlendConnectivity()
Set connectivity information elements with blend geometric map.
int64_t Rows() const
Returns number of rows.
int NormalOrientation(int side)
Determine the orientation of the normal vector comparing the ids of the neighbouring elements...
int64_t fIndex
Index of the element in the element vector.
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ sqrt
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't initialized.
Contains declaration of TPZGeoElRefPattern class which implements a generic geometric element which i...
Groups all classes which model the h refinement These classes are used as template arguments of...
REAL co[8][3]
Coordinates of the eight nodes.
int64_t Index() const
Returns element index of the mesh fELementVec list.
const T & Min(const T &a, const T &b)
Returns the minimum value between a and b.
Contains TPZShapePoint class which implements the shape function associated with a point...
virtual TPZGeoElSide Neighbour(int side)=0
Returns a pointer to the neighbour and the neighbourside along side of the current element...
#define LOGPZ_ERROR(A, B)
Define log for errors (cout)
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 ...
Contains declaration of TPZCompMesh class which is a repository for computational elements...
Contains the TPZRefPattern class which defines the topology of the current refinement pattern to a me...
TPZGeoNode & Node(int i) const
Returns the ith node of the element.
Contains the TPZGeoCube class which implements the geometry of hexahedra element. ...
void GetNodeIndices(TPZVec< int64_t > &nodeindices)
virtual int NSideNodes(int side) const =0
Returns the number of nodes for a particular side.
int32_t Hash(std::string str)
Contains the TPZGeoPoint class which implements the geometry of a point element or 0-D element...
Contains TPZMatrix<TVar>class, root matrix class.
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.
Contains TPZShapePrism class which implements the shape functions of a prism element.
virtual bool IsLinearMapping() const
TPZGeoEl * Element() const
int NeighbourExists(int side, const TPZGeoElSide &gel)
Returns 1 if gel is a neighbour of the element along side.
virtual void PrintTopologicalInfo(std::ostream &out=std::cout)
Prints the coordinates of all nodes (geometric)
virtual void HDivPermutation(int side, TPZVec< int > &permutegather)
Computes the permutation for an HDiv side.
Contains the TPZRefTriangle class which implements the uniform refinement of a geometric triangular e...
virtual void GradX(TPZVec< REAL > &qsi, TPZFMatrix< REAL > &gradx) const =0
Return the gradient of the transformation at the given coordinate.
int fId
id of the refinement pattern
void Print(std::ostream &out=std::cout)
Print the node data into out.
virtual ~TPZGeoEl()
Destructor.
Contains the TPZRefTetrahedra class which implements the uniform refinement of a geometric tetrahedra...
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.
REAL dist(TPZVec< T1 > &vec1, TPZVec< T1 > &vec2)
virtual void AllHigherDimensionSides(int side, int targetdimension, TPZStack< TPZGeoElSide > &elsides)=0
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.
void Read(TPZStream &buf, void *context) override
read objects from the stream
bool ComputeXInverse(TPZVec< REAL > &XD, TPZVec< REAL > &ksi, REAL Tol)
Computes the XInverse and returns true if ksi belongs to master element domain.
Implements a geometric node in the pz environment. Geometry.
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.
This class implements a geometric mesh for the pz environment. Geometry.
virtual bool IsGeoBlendEl() const
This class implements a stack object. Utility.
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.
Implements computational mesh. Computational Mesh.
virtual REAL CharacteristicSize()
Computes the set of normals for defining HDiv approximation spaces.
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.
void RemoveConnectivities()
It removes the connectivities of the element.
int GetTransformId2dT(TPZVec< int > &idfrom, TPZVec< int > &idto)
Get the transform id the face to face.
Contains the TPZRefLinear class which implements the uniform refinement of a geometric linear element...
virtual TPZAutoPointer< TPZRefPattern > GetRefPattern() const
Returns the refinement pattern associated with the element.
static TPZFMatrix< REAL > gGlobalAxes
3x3 unit matrix to be copied to the axes if the geometric element does not have a particular orientat...
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...
virtual void SetRefPattern(TPZAutoPointer< TPZRefPattern >)
Defines the refinement pattern. It's used only in TPZGeoElRefPattern objects.
void NodesCoordinates(TPZFMatrix< REAL > &cooridnates)
Computes nodes coordinates of the element.
int64_t Cols() const
Returns number of cols.
TPZGeoMesh * fMesh
Pointer to the mesh to which the element belongs.
virtual void Print(std::ostream &out) const
Contains TPZShapePiram class which implements the shape functions of a pyramid element.
int Resize(const int64_t newRows, const int64_t wCols) override
Redimension a matrix, but maintain your elements.
Contains the TPZGeoPyramid class which implements the geometry of pyramid element.
bool VerifyNodeCoordinates(REAL tol=1e-1)
Verify coordinate of element nodes checking if they are coincident to the X mapping of the corner nod...
Defines the interface for saving and reading data. Persistency.
int64_t NElements() const
Returns the number of elements of the vector.
Contains the TPZGeoPrism class which implements the geometry of a prism element.
virtual REAL ElementRadius()
void GetCoordinates(TPZVec< REAL > &co)
Fill the coordinates of the node.
virtual void Print(std::ostream &out=std::cout)
Print all relevant data of the element to cout.
Groups all classes which model the geometry.
static int StaticClassId()
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
REAL ZeroTolerance()
Returns the tolerance to Zero value. Actually: .
void SetNeighbourForBlending(int side)
TPZGeoBlend need to find a non-linear neighbour.
This class defines the interface to save and restore objects from TPZStream objects. Persistency.
Defines the interface of a computational element. Computational Element.
virtual void SetSubElementConnectivities()
Initializes the external connectivities of the subelements.
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.
Contains TPZShapeQuad class which implements the shape functions of a quadrilateral element...
const TVar & GetVal(const int64_t row, const int64_t col) const override
Get values without bounds checking This method is faster than "Get" if DEBUG is defined.
void Transpose(TPZMatrix< TVar > *const T) const override
It makes *T the transpose of current matrix.
int GetTransformId2dQ(TPZVec< int > &idfrom, TPZVec< int > &idto)
Get the transform id the face to face.
int64_t SideNodeIndex(int nodenum) const
Returns the index of the nodenum node of side.
Contains the TPZRefCube class which implements the uniform refinement of a geometric hexahedral eleme...
Contains the TPZRefPoint class which implements the uniform refinement of a geometric point element...
static void WritePointer(const TPZSavable *obj, TPZStream *stream)
Contains TPZShapeTriang class which implements the shape functions of a triangular element...
virtual int SolveDirect(TPZFMatrix< TVar > &F, const DecomposeType dt, std::list< int64_t > &singular)
Solves the linear system using Direct methods.
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)
TPZAdmChunkVector< TPZGeoEl * > & ElementVec()
Methods for handling pzlists.
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.