30 static LoggerPtr logger(Logger::getLogger(
"pz.mesh.tpzinterpolatedelement"));
31 static LoggerPtr loggerdiv(Logger::getLogger(
"pz.mesh.tpzinterpolatedelement.divide"));
52 std::map<int64_t, int64_t> & gl2lcElMap) :
66 for (in = 0; in < nn; in++) {
76 for (in = 0; in < ns; in++) {
106 if (side < 0 || connect < 0 || side >
Reference()->NSides()) {
107 LOGPZ_ERROR(logger,
"Exiting SideConnect - has bad first or second parameter.");
115 if ((side <
Reference()->NCornerNodes() && order != 0) || side >=
Reference()->NSides()) {
116 std::stringstream sout;
117 sout << __PRETTY_FUNCTION__ <<
" setting an order for a corner side " << side <<
" order " << order;
124 LOGPZ_INFO(logger,
"Exiting ForceSideOrder - large exists.");
128 int sideorder = c.
Order();
129 int neworder = order;
130 int orderchanged = (sideorder != neworder);
131 if (!orderchanged)
return;
134 elvec.
Push(thisside);
138 if (orderchanged == 1) {
141 for (il = 0; il < cap; il++) {
143 if (!equal)
continue;
144 equalside = elvec[il].Side();
154 for (il = 0; il < cap; il++) {
155 elvec[il].HigherDimensionElementList(highdim, 1, 1);
170 for (dimension = 0; dimension < 4; dimension++) {
171 for (il = 0; il < cap; il++) {
174 if (!smalll)
continue;
175 smallside = elvec[il].Side();
184 for (il = 0; il < cap; il++) {
187 TPZCompElSide highlarge = highdim[il].LowerLevelElementList(1);
188 if (highlarge.
Exists())
continue;
195 highside = highdim[il].Side();
196 int order, comporder;
198 highdim[il].EqualLevelElementList(equallist, 1, 0);
199 equallist.
Push(highdim[il]);
205 if (order != comporder) {
227 int orderchanged = 0;
229 elvecall.
Push(thisside);
234 for (i = 0; i < elvecall.
NElements(); i++) {
235 int64_t elvecconnectindex = elvecall[i].ConnectIndex();
237 if (sideconnectindex != -1 && sideconnectindex != elvecconnectindex) {
261 for (int64_t il = 0; il < cap; il++) {
263 if (!equal)
continue;
264 equalside = elvecequal[il].Side();
272 std::cout <<
"I don't understand\n";
283 LOGPZ_WARN(logger,
"TPZInterpolatedElement SetSideOrder fodeu");
292 if (neworder != connectorder) {
301 equalside = elvecequal[il].Side();
305 if (equalindex != connectindex) {
320 if (dimension == 0) {
329 for (
int dim = 0; dim < 4; dim++) {
330 for (int64_t il = 0; il < elvechighlevel.
size(); il++) {
339 intel->
SetSideOrder(elvechighlevel[il].Side(), sideorder);
340 intel->
RestrainSide(elvechighlevel[il].Side(),
this, side);
344 std::cout <<
"Verify\n";
352 if (orderchanged == 1) {
364 int64_t cap = elvecequal.
size();
366 for (int64_t il = 0; il < cap; il++) {
367 elvecequal[il].HigherDimensionElementList(highdim, 1, 1);
372 for (int64_t il = 0; il < highdim.
size(); il++) {
380 TPZCompElSide highlarge = highdim[il].LowerLevelElementList(1);
393 std::cout <<
"Verify\n";
417 for (dimension = 0; dimension < 4; dimension++) {
418 for (il = 0; il < cap; il++) {
421 if (!smalll)
continue;
422 smallside = elvec[il].Side();
438 for (il = 0; il < cap; il++) {
440 if (!neighbour)
continue;
441 neighbourside = elvec[il].Side();
454 int cormatsize = coarsel.
NShapeF();
462 for (ic = ncorners; ic < locnod; ic++) {
466 int coarsemaxorder = 0;
467 for (ic = ncorners; ic < cornod; ic++) {
470 if (coarsemaxorder > myminorder) {
472 sout <<
"Exiting BuildTransferMatrix - compute the transfer matrix coarse " 473 << coarsemaxorder <<
" me " << myminorder << endl;
479 connectlistcoarse.
Resize(0);
480 dependencyordercoarse.
Resize(0);
482 for (ic = 0; ic < cornod; ic++) connectlistcoarse.
Push(coarsel.
ConnectIndex(ic));
497 corblock.
Set(in, blsize);
498 corblocksize.
Push(blsize);
503 for (; in < cornod; in++) {
504 c = connectlistcoarse[in];
507 if (nshape != blsize) {
510 corblock.
Set(in, blsize);
511 corblocksize.
Push(blsize);
512 cormatsize += blsize;
536 int maxorder = interpolation[0];
537 for (dim = 0; dim < interpolation.
NElements(); dim++) {
538 maxorder = interpolation[dim] < maxorder ? maxorder : interpolation[dim];
541 order[dim] = maxorder * 2 + 2;
547 for (in = 0; in < locnod; in++) {
553 REAL locphistore[50] = {0.}, locdphistore[150] = {0.};
566 REAL jacobianstore[9],
569 coarse_int_point(dimension);
570 TPZFMatrix<REAL> jacobian(dimension, dimension, jacobianstore, 9), jacinv(dimension, dimension);
573 int_point.Fill(0., 0);
575 ref->
Jacobian(int_point, jacobian, axes, jac_det, jacinv);
576 REAL multiplier = 1. / jac_det;
578 int numintpoints = intrule->
NPoints();
582 for (
int int_ind = 0; int_ind < numintpoints; ++int_ind) {
584 intrule->
Point(int_ind, int_point, weight);
585 ref->
Jacobian(int_point, jacobian, axes, jac_det, jacinv);
586 ref->
X(int_point, x);
587 Shape(int_point, locphi, locdphi);
589 t.
Apply(int_point, coarse_int_point);
592 coarsel.
Shape(coarse_int_point, corphi, cordphi);
594 coarsel.
ExpandShapeFunctions(connectlistcoarse, dependencyordercoarse, corblocksize, corphi, cordphi);
596 for (lin = 0; lin < locmatsize; lin++) {
597 for (ljn = 0; ljn < locmatsize; ljn++) {
598 loclocmat(lin, ljn) += weight * locphi(lin, 0) * locphi(ljn, 0) * multiplier;
600 for (cjn = 0; cjn < cormatsize; cjn++) {
601 loccormat(lin, cjn) += weight * locphi(lin, 0) * corphi(cjn, 0) * multiplier;
609 for (in = 0; in < locnod; in++) {
613 int locblocksize = locblock.
Size(in);
614 int64_t locblockpos = locblock.
Position(in);
617 int numnonzero = 0, jn;
620 for (jn = 0; jn < cornod; jn++) {
621 int corblocksize = corblock.
Size(jn);
622 int64_t corblockpos = corblock.
Position(jn);
623 int cind = connectlistcoarse[jn];
627 if (locblocksize == 0 || corblocksize == 0)
continue;
629 loccormat.
GetSub(locblockpos, corblockpos,
630 locblocksize, corblocksize, smalll);
633 locblockvec.
Push(jn);
634 globblockvec.
Push(corblocknumber);
641 for (jnn = 0; jnn < numnonzero; jnn++) {
642 jn = locblockvec[jnn];
643 int corblocksize = corblock.
Size(jn);
644 int64_t corblockpos = corblock.
Position(jn);
645 if (corblocksize == 0 || locblocksize == 0)
continue;
647 loccormat.
GetSub(locblockpos, corblockpos, locblocksize, corblocksize, smalll);
648 transfer.
SetBlockMatrix(locblocknumber, globblockvec[jnn], smalll);
659 std::cout << __PRETTY_FUNCTION__ <<
" no material associated with matid " <<
Reference()->
MaterialId() << std::endl;
664 int64_t newnodeindex;
675 newnodeindex = elvec[nel - 1].ConnectIndex();
685 LOGPZ_ERROR(logger,
"CreateMidSideConnect, new node has dependency");
686 newnod.
Print(*cmesh);
691 cmesh->
Block().
Set(seqnum, nvar * nshape);
695 int side_neig = father.
Side();
715 side_neig = elvec[0].Side();
717 int64_t newnodecreated = 0;
730 cmesh->
Block().
Set(seqnum, nvar * nshape);
734 if (father.
Exists() && newnodecreated) {
740 side_neig = father.
Side();
751 for (dim = 0; dim < 3; dim++) {
752 for (il = 0; il < cap; il++) {
762 }
else if (father.
Exists() && !newnodecreated) {
763 side_neig = father.
Side();
767 }
else if (!father.
Exists() && !newnodecreated) {
773 sout <<
"TPZInterpolatedElement fodeu side " << side << endl;
785 elvec.
Push(thisside);
787 if (sideorder != oldorder) {
793 }
else if (!father.
Exists() && newnodecreated) {
806 for (dim = 0; dim < 3; dim++) {
807 for (il = 0; il < cap; il++) {
828 locallarge = localgelside.LowerLevelCompElementList2(1);
829 std::cout <<
"I dont understand\n";
833 if (celsideorder != sideorder) {
838 if (celsideorder != sideorder) {
854 if (largecompside.
Exists()) cel = dynamic_cast<TPZInterpolatedElement *> (largecompside.
Element());
856 LOGPZ_ERROR(logger,
"Exiting RestrainSide - null computational element.");
864 if (myconnect.
NShape() == 0) {
869 LOGPZ_WARN(logger,
"RestrainSide - unnecessary call to restrainside");
873 LOGPZ_ERROR(logger,
"Exiting RestrainSide - Side of large element not initialized");
878 LOGPZ_ERROR(logger,
"Exiting RestrainSide - dimension of large element is 0");
888 for (
int sidecon = 0; sidecon < nsideconnects; sidecon++) {
890 int sideord = c.
Order();
891 maxord = maxord < sideord ? sideord : maxord;
900 LOGPZ_ERROR(logger,
"Exiting RestrainSide - cannot create side integration rule");
903 int numint = intrule->
NPoints();
906 int largesidedimension = largeside.
Dimension();
914 for (
int it = 0; it < numint; it++) {
915 intrule->
Point(it, par, weight);
917 t.Apply(par, pointl);
919 for (in = 0; in < numshape; in++) {
920 for (jn = 0; jn < numshape; jn++) {
921 (*M)(in, jn) += phis(in, 0) * phis(jn, 0) * weight;
923 for (jn = 0; jn < numshapel; jn++) {
924 MSL(in, jn) += phis(in, 0) * phil(jn, 0) * weight;
929 if (logger->isDebugEnabled()) {
930 std::stringstream sout;
936 MSolve.SetDirect(
ELU);
938 MSolve.Solve(MSL, MSL);
944 int numsidenodes_large = large->
NSideConnects(neighbourside);
945 TPZBlock<REAL> MBlocksmall(0, numsidenodes_small), MBlocklarge(0, numsidenodes_large);
946 for (in = 0; in < numsidenodes_small; in++) {
954 unsigned int nshape = c.
NShape();
955 MBlocksmall.Set(in, nshape);
957 for (in = 0; in < numsidenodes_large; in++) {
960 unsigned int nshape = c.
NShape();
966 MBlocklarge.
Set(in, nshape);
969 MBlocksmall.Resequence();
972 for (in = 0; in < numsidenodes_small; in++) {
973 int ibl = MBlocksmall.Size(in);
975 for (jn = 0; jn < numsidenodes_large; jn++) {
976 int jbl = MBlocklarge.
Size(jn);
979 int64_t ipos = MBlocksmall.Position(in);
980 int64_t jpos = MBlocklarge.
Position(jn);
981 for (i = 0; i < ibl; i++)
for (j = 0; j < jbl; j++) blocknorm(in, jn) +=
fabs(MSL(ipos + i, jpos + j)) *
fabs(MSL(ipos + i, jpos + j));
982 blocknorm(in, jn) /= (ibl * jbl);
983 blocknorm(in, jn) =
sqrt(blocknorm(in, jn));
992 in = numsidenodes_small - 1;
994 if (MBlocksmall.Size(in) == 0) {
998 for (jn = 0; jn < numsidenodes_large; jn++) {
999 if (MBlocksmall.Size(in) == 0 || MBlocklarge.
Size(jn) == 0) {
1004 MBlocksmall.Size(in), MBlocklarge.
Size(jn));
1005 if (blocknorm(in, jn) < 1.e-8) {
1013 for (jn = 0; jn < numsidenodes_large; jn++) {
1015 if (MBlocklarge.
Size(jn)) {
1017 MBlocksmall.Size(in), MBlocklarge.
Size(jn));
1029 int64_t rmsl = MSL.
Rows();
1030 int64_t cmsl = MSL.
Cols();
1034 if (rtest != rmsl || ctest != cmsl) {
1036 sout <<
"Exiting - Restraint matrix side incompatibility: MSL (rows,cols): ( " << rmsl
1037 <<
" , " << cmsl <<
" )" <<
" RestraintMatrix (rows,cols): (" << rtest <<
" , " << ctest <<
" )\n" 1038 <<
"press any key to continue";
1049 for (imsl = 0; imsl < rmsl; imsl++) {
1050 for (jmsl = 0; jmsl < cmsl; jmsl++) {
1051 normmsl +=
sqrt(mslc(imsl, jmsl) * mslc(imsl, jmsl));
1054 if (normmsl > 1.E-6) {
1056 sout <<
"TPZInterpolatedElement::Error::MSL matrix has non zero norm " << normmsl <<
"\n";
1057 mslc.
Print(
"Difference Matrix ", sout);
1058 for (imsl = 0; imsl < rmsl; imsl++) {
1059 for (jmsl = 0; jmsl < cmsl; jmsl++) {
1061 sout <<
"msl[ " << imsl <<
" , " << jmsl <<
" ] = " << MSL(imsl, jmsl) <<
"\t " 1075 sout <<
"TPZInterpolatedElement::Error::Bad restraints detected\n";
1100 for (iside = 0; iside <
NConnects(); iside++) {
1102 if (
Connect(iside).CheckDependency(nshape,
Mesh(), nstate) == -1) {
1103 LOGPZ_WARN(logger,
"CheckElementConsistency detected inconsistency 1");
1106 if (
Connect(iside).NDof(*
Mesh()) != nshape * nstate) {
1107 LOGPZ_WARN(logger,
"CheckElementConsistency detected inconsistency 2");
1117 if (dimsmall >= dimel) {
1119 sout <<
"TPZInterpolatedElement::CheckConstraintConsistency : dismall >= dimel: " 1120 << dimsmall <<
" >= " << dimel << endl
1121 <<
"press any key to continue";
1131 for (idim = (dimsmall + 1); idim <= dimel; idim++) {
1137 for (inh = 0; inh < nelhigh; inh++) {
1138 int sidel = geoelsidevec[inh].Side();
1145 for (ipt = 0; ipt < npts; ipt++) {
1149 sirule->
Point(ipt, pts, w);
1151 transform.
Apply(pts, ptl);
1153 int check =
CompareShapeF(iside, sidel, phis, dphis, phil, dphil, transform);
1155 LOGPZ_INFO(logger,
"Exiting CheckElementConsistency - don't compare shapefunctions.");
1171 int icon, icons, iconl;
1172 if (nconl) posl[0] = 0;
1173 if (ncons) poss[0] = 0;
1174 for (icon = 0; icon < nconl; icon++) {
1177 for (icon = 0; icon < ncons; icon++) {
1181 for (icons = 0; icons < ncons; icons++) {
1183 for (iconl = 0; iconl < nconl; iconl++) {
1185 if (consind == conlind) {
1186 int nshape = poss[icons + 1] - poss[icons];
1189 int ishape, idim, jdim;
1190 for (ishape = 0; ishape < nshape; ishape++) {
1191 int shapel = posl[iconl] + ishape;
1192 int shapes = poss[icons] + ishape;
1193 diff += (phis(shapes, 0) - phil(shapel, 0))*(phis(shapes, 0) - phil(shapel, 0));
1195 for (idim = 0; idim < dims; idim++) {
1196 derivcomp[idim] = 0.;
1197 for (jdim = 0; jdim < diml; jdim++) {
1198 derivcomp[idim] += dphil(jdim, shapel) * transform.
Mult()(jdim, idim);
1200 diff += (dphis(idim, shapes) - derivcomp[idim])*(dphis(idim, shapes) - derivcomp[idim]);
1207 if (diff >= 1.e-6) {
1209 sout <<
"TPZInterpolatedElement::CompareShapeF sides " << sides <<
" sidel " << sidel <<
" do not compare diff " << diff << endl;
1219 int largeside = large.
Side();
1227 for (jn = 0; jn < nlargesideconnects; jn++) {
1231 if (jn == nlargesideconnects) {
1233 sout <<
"Dependency inconsistency";
1235 largel->
Print(sout);
1246 sout <<
"Dependency inconsistency\n";
1257 if (!largeset.
Exists()) {
1258 LOGPZ_WARN(logger,
"Exiting RemoveSideRestraintWithRespectTo inconsistent 1");
1262 int smallfatherside = largeset.
Side();
1264 LOGPZ_WARN(logger,
"Exiting RemoveSideRestraintWithRespectTo inconsistent 3");
1270 for (js = 0; js < nsfather; js++) {
1280 sout <<
"TPZInterpolatedElement::RemoveSideRestraintWithRespectTo fishy " << dfiindex;
1288 LOGPZ_WARN(logger,
"Exiting RemoveSideRestraintsII with mode insert should not be called");
1294 int side, nelem, iel;
1296 for (side = 0; side < numsides; side++) {
1316 for (iel = 0; iel < nsmall; iel++) {
1318 int smallside = smallset[iel].Side();
1327 for (side = 0; side < numsides; side++) {
1341 if (nelem && !large.
Exists()) {
1351 }
else if (!nelem) {
1352 if (large.
Exists() && nsmall) {
1355 for (dim = 0; dim < 4; dim++) {
1356 for (iel = 0; iel < nsmall; iel++) {
1374 LOGPZ_ERROR(logger,
"Exiting ComputeSideOrder called for empty list, -1 returned");
1380 if (logger->isDebugEnabled()) {
1381 std::stringstream sout;
1382 sout <<
"Order of first side " << minorder;
1387 for (iel = 1; iel < nelem; iel++) {
1390 minorder = minorder < celorder ? minorder : celorder;
1404 LOGPZ_ERROR(logger,
"Exiting Divide: index error");
1415 LOGPZ_ERROR(logger,
"Exiting Divide: no subelements acquired");
1420 sub.
Resize(nsubelements);
1424 std::stringstream sout;
1437 LOGPZ_WARN(logger,
"CheckConnectOrderConsistency failed");
1456 LOGPZ_WARN(logger,
"CheckConnectOrderConsistency failed after RemoveSideRestraintsII");
1462 int ncon = ref->
NSides();
1464 for (i = 0; i < nsubelements; i++) {
1469 if (interpolatesolution) {
1471 for (i = 0; i < nsubelements; i++) {
1474 LOGPZ_WARN(logger,
"Divide interpolate cast error");
1490 PZError <<
"\nError at " << __PRETTY_FUNCTION__ <<
" - no material " << std::endl;
1491 LOGPZ_ERROR(logger,
"InterpolateSolution no material");
1494 if (matname != material->
Name())
return (0.);
1513 for (
int int_ind = 0; int_ind < intrule.
NPoints(); ++int_ind) {
1514 intrule.
Point(int_ind, intpoint, weight);
1515 this->
Solution(intpoint, var, sol);
1516 otherelement->
Solution(intpoint, var, othersol);
1518 ref->
Jacobian(intpoint, jacobian, axes, detjac, jacinv);
1519 weight *=
fabs(detjac);
1521 for (
int i = 0; i < sol.NElements(); i++) {
1522 error += (sol[i] - othersol[i])*(sol[i] - othersol[i])*(STATE) weight;
1529 out << __PRETTY_FUNCTION__ << std::endl;
1531 out <<
"Index = " <<
fIndex;
1532 out <<
" - Center coordinate: ";
1536 out <<
"[" << i <<
"]" << center <<
" ";
1540 out <<
"Number of connects = " << this->
NConnects() <<
" Connect indexes/NShape : ";
1542 for (nod = 0; nod < nconects; nod++) {
1552 out <<
"Side orders = ";
1554 for (
int is = 0; is < NSides; is++) {
1556 out <<
" side " << is <<
" orders ";
1557 for (
int ic = 0; ic < nsconnect; ic++) {
1560 out << order <<
" ";
1568 out <<
" no material " << std::endl;
1572 out <<
"material id " << material->
Id() << endl;
1582 out <<
"Integration orders : \t";
1583 for (
id = 0;
id < norders;
id++) {
1584 out << prevorder[id] <<
"\t";
1596 if(elementGMesh != referenceGMesh){
1598 PZError<<
"Computational mesh of this element seems not to be associated\n";
1599 PZError<<
"with the same mesh as the one this element's reference belongs to.\n";
1600 PZError<<
"You may want to call TPZGeoMesh::ResetReference()\n";
1601 PZError<<
" and TPZCompMesh::LoadReferences() before PRefine\n";
1608 if (loggerdiv->isDebugEnabled()) {
1609 std::stringstream sout;
1610 sout << (
void*)
Mesh() <<
" PRefine elindex " <<
Index() <<
" gel index " <<
Reference()->
Index() <<
" " << order;
1615 int ns = gel->NSides();
1616 for (
int is = 0; is < ns; is++) {
1620 if (loggerdiv->isDebugEnabled()) {
1621 std::stringstream sout;
1622 sout <<
" PRefine connect orders ";
1624 for(
int ic=0; ic<nc; ic++) sout << (
int)
Connect(ic).
Order() <<
" ";
1634 cout << __PRETTY_FUNCTION__ <<
" no material " << std::endl;
1641 LOGPZ_ERROR(logger,
"Exiting MeanSolution: is not implemented to nvars != 1.");
1653 REAL meanvalue = 0.;
1659 ref->
Jacobian(intpoint, jacobian, axes, detjac, jacinv);
1663 area += weight *
fabs(detjac);
1664 #ifdef STATE_COMPLEX 1665 meanvalue += (weight *
fabs(detjac)) * sol[0].real();
1667 meanvalue += (weight *
fabs(detjac)) * sol[0];
1670 return (meanvalue / area);
1678 cout << __PRETTY_FUNCTION__ <<
" no material " << std::endl;
1690 int numloadcases = solution.
Cols();
1692 int numeq = nshape*numdof;
1696 for (i = 0; i < ncon; i++) {
1698 unsigned int nshape = c.
NShape();
1711 for (i = 0; i < ncon; ++i)
1728 ref->
Jacobian(intpoint, jacobian, axes, detjac, jacinv);
1729 ref->
X(intpoint, x);
1730 weight *=
fabs(detjac);
1731 Shape(intpoint, phi, dphi);
1735 for (
int ist = 0; ist < numloadcases; ist++) {
1736 for (in = 0; in < numdof; in++) sol[in] = 0.;
1737 for (in = 0; in < ncon; in++) {
1740 int dfvar = block.
Size(dfseq);
1741 for (jn = 0; jn < dfvar; jn++) {
1742 int64_t pos = block.
Position(dfseq);
1743 coef = solution(pos + jn, ist);
1744 sol[iv % numdof] += (STATE) phi(iv / numdof, 0) * coef;
1748 for (in = 0; in < nshape; in++)
1749 for (l = 0; l < numdof; l++)
1750 (ef.
fMat)(in * numdof + l, 0) += (STATE) weight * (STATE) phi(in, 0) * sol[l];
1758 LOGPZ_ERROR(logger,
"Exiting AdjustPreferredSideOrder: null reference element.");
1772 if (celsidestack.
size() == 0) {
1777 int maxorder = order;
1780 for (is = 0; is < nsides; is++) {
1783 int s = elsides[is];
1785 maxorder = maxorder < sorder ? sorder : maxorder;
1799 cout << __PRETTY_FUNCTION__ <<
" no material " << std::endl;
1813 int numeq = nshape*numdof;
1819 for (i = 0; i < ncon; i++) {
1834 for (i = 0; i < ncon; ++i) {
1852 FADREAL defaultFAD(numeq, 0., 0.);
1853 if (defaultFAD.dx(0) == 1.) {
1854 LOGPZ_ERROR(logger,
"FAD doesn't have default constructor for parameters: (number of derivatives, default value, default derivative value) !");
1857 FADFADREAL defaultFADFAD(numeq, defaultFAD, defaultFAD);
1859 FADFADREAL U(defaultFADFAD);
1863 for (
int int_ind = 0; int_ind < intrule.
NPoints(); ++int_ind) {
1865 intrule.
Point(int_ind, intpoint, weight);
1866 this->
ComputeShape(intpoint, x, jacobian, axes, detjac, jacinv, phi, dphix);
1867 weight *=
fabs(detjac);
1871 sol.
Fill(defaultFADFAD);
1872 dsol.
Fill(defaultFADFAD);
1874 for (
int in = 0; in < ncon; in++) {
1877 int dfvar = block.
Size(dfseq);
1878 int64_t pos = block.
Position(dfseq);
1879 for (
int jn = 0; jn < dfvar; jn++) {
1885 sol[iv % numdof].val().val() += MeshSol(pos + jn, 0) * phi(iv / numdof, 0);
1886 sol[iv % numdof].val().fastAccessDx(iv) += phi(iv / numdof, 0);
1887 sol[iv % numdof].fastAccessDx(iv).val() += phi(iv / numdof, 0);
1888 for (d = 0; d < dim; d++) {
1892 dsol[d + (iv % numdof) * dim].
val().val() += MeshSol(pos + jn, 0) * dphix(d, iv / numdof);
1893 dsol[d + (iv % numdof) * dim].
val().fastAccessDx(iv) += dphix(d, iv / numdof);
1894 dsol[d + (iv % numdof) * dim].
fastAccessDx(iv).val() += dphix(d, iv / numdof);
1901 material->ContributeEnergy(x, sol, dsol, U, weight);
1908 int64_t efsz = ef.
Rows();
1909 int64_t ekrows = ek.
Rows();
1910 int64_t ekcols = ek.
Cols();
1912 int64_t Ucols = U.size();
1913 int64_t Urows = U.val().size();
1915 if (efsz != Urows) {
1916 LOGPZ_WARN(logger,
"Energy Fad type and ef vectors are of different sizes");
1918 if (ekrows != Urows || ekcols != Ucols) {
1919 LOGPZ_WARN(logger,
"Energy Fad type and ek matrix are of different sizes");
1922 FADREAL * pBufferFAD;
1924 for (j = 0; j < Urows; j++) {
1925 pBufferFAD = &U.fastAccessDx(j);
1926 ef(j, 0) = -pBufferFAD->val();
1928 for (i = 0; i < Ucols; i++) {
1929 ek(i, j) = pBufferFAD->fastAccessDx(i);
1957 const int nshape = this->
NShapeF();
1967 ref->
Jacobian(qsi, jacobian, axes, detjac, jacinv);
1969 this->
Shape(qsi, phi, dphi);
1977 dphix *= (1. / detjac);
1980 for (ieq = 0; ieq < nshape; ieq++) {
1981 dphix(0, ieq) = jacinv(0, 0) * dphi(0, ieq) + jacinv(1, 0) * dphi(1, ieq);
1982 dphix(1, ieq) = jacinv(0, 1) * dphi(0, ieq) + jacinv(1, 1) * dphi(1, ieq);
1986 for (ieq = 0; ieq < nshape; ieq++) {
1987 dphix(0, ieq) = jacinv(0, 0) * dphi(0, ieq) + jacinv(1, 0) * dphi(1, ieq) + jacinv(2, 0) * dphi(2, ieq);
1988 dphix(1, ieq) = jacinv(0, 1) * dphi(0, ieq) + jacinv(1, 1) * dphi(1, ieq) + jacinv(2, 1) * dphi(2, ieq);
1989 dphix(2, ieq) = jacinv(0, 2) * dphi(0, ieq) + jacinv(1, 2) * dphi(1, ieq) + jacinv(2, 2) * dphi(2, ieq);
1994 sout <<
"pzintel.c please implement the " << dim <<
"d Jacobian and inverse\n";
2008 int64_t numbersol = MeshSol.
Cols();
2012 for (int64_t is = 0; is < numbersol; is++) {
2015 dsol[is].Redim(dim, numdof);
2022 for (
int in = 0; in < ncon; in++) {
2025 int dfvar = block.
Size(dfseq);
2026 int64_t pos = block.
Position(dfseq);
2027 for (
int jn = 0; jn < dfvar; jn++) {
2028 for (
int is = 0; is < numbersol; is++) {
2029 sol[is][iv % numdof] += (STATE) phi(iv / numdof, 0) * MeshSol(pos + jn, is);
2030 for (d = 0; d < dim; d++) {
2031 dsol[is](d, iv % numdof) += (STATE) dphix(d, iv / numdof) * MeshSol(pos + jn, is);
2055 for (
int ic = 0; ic < ncorner; ic++) {
2065 if (midsideconnectlocindex < 0) {
2077 int nonzerosides = 0;
2079 for (
int ic = 0; ic < nsideconnectslarge; ic++) {
2091 if (cnumdepend != nonzerosides && c.
NShape() != 0) {
2094 if (cnumdepend == 0 && c.
NShape() != 0) {
2097 int nshapeconnect = c.
NShape();
2098 std::map<int64_t, int> largenshapeconnect;
2099 for (
int ic = 0; ic < nsideconnectslarge; ic++) {
2102 largenshapeconnect[clargeindex] = clarge.
NShape();
2109 if (nrow != c.
NShape()) {
2113 if (largenshapeconnect.find(depend->
fDepConnectIndex) == largenshapeconnect.end()) {
2121 depend = depend->
fNext;
void RecomputeRestraints(int side)
Will recompute the restraints of all connects which are restrained by this side.
void UpdateNeighbourSideOrder(int side, TPZVec< TPZCompElSide > &elvec)
Updates the interpolation order of all neighbouring elements along side to have side order equal to t...
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 void GetOrder(TPZVec< int > &ord) const =0
Gets the order of the integration rule for each dimension of the master element.
TPZGeoMesh * Reference() const
Returns a pointer to the geometrical mesh associated.
virtual int ClassId() const override
Define the class id associated with the class.
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 void SetConnectIndex(int i, int64_t connectindex) override=0
Sets the node pointer of node i to nod.
Contains the TPZInt1d, TPZIntTriang, TPZIntQuad, TPZIntCube3D, TPZIntTetra3D, TPZIntPyram3D and TPZIn...
int Position(const int block_diagonal) const
Returns the position of first element block dependent on matrix diagonal.
Will verify the consistency of the restraints of shape functions along a side. Computational Element...
virtual int NPoints() const =0
Returns number of points for the cubature rule related.
void SetAllCreateFunctionsContinuous()
virtual void LowerDimensionSides(int side, TPZStack< int > &smallsides) const =0
TPZCompElSide LowerLevelElementList(int onlyinterpolated)
Returns all connected elements which have level lower to the current element.
Implements computational element and a side. Computational Element.
int Set(const int index, const int dim, const int pos=-1)
Modifies existing block dimensions or creates a new block with given index.
void CheckConstraintConsistency(int side)
Check the consistency of the constrained connects along a side.
Represents a set of shape functions associated with a computational element/side. Computational Eleme...
TPZGeoNode * NodePtr(int i) const
Returns a pointer to the ith node of the element.
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.
virtual MElementType Type()
Return the type of the element.
virtual void RestrainSide(int side, TPZInterpolatedElement *neighbour, int neighbourside)
Compute the shapefunction restraints which need to be applied to the shape functions on the side of t...
virtual int Dimension() const override=0
Returns the dimension of the element.
int MaterialId() const
Returns the material index of the element.
void SetBlockMatrix(int row, int col, TPZFMatrix< TVar > &mat)
Sets the row,col block equal to matrix mat if row col was not specified by AddBlockNumbers, an error will be issued and exit.
void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
Contains declaration of TPZCheckRestraint class which verify the consistency of the restraints of sha...
virtual void BuildConnectList(std::set< int64_t > &indepconnectlist, std::set< int64_t > &depconnectlist)
Builds the list of all connectivities related to the element including the connects pointed to by dep...
void Print(std::ostream &out)
Prints the information into the computational elements and side and geometric information also...
REAL Coord(int i) const
Returns i-th coordinate of the current node.
virtual int NConnectShapeF(int icon, int order) const =0
Returns the number of shapefunctions associated with a connect.
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
TPZStack< int64_t > fConnect
Vector of pointers to TPZConnect objects.
virtual int64_t AllocateNewConnect(int nshape, int nstate, int order)
Returns an index to a new connect.
REAL MeanSolution(int var)
Returns total mass contained into the element.
void AddBlockNumbers(int row, TPZVec< int > &colnumbers)
Will specify the sparsity pattern of row.
int CheckConnectOrderConsistency()
This method will verify whether the fSiderOrder data structure is in sink with the Order of the Conne...
TPZGeoElSide Reference() const
Reference to the geometric element.
TPZFNMatrix< 1000, STATE > fMat
Pointer to a blocked matrix object.
Defines step solvers class. Solver.
virtual int NCornerNodes() const =0
Returns the number of corner nodes of the element.
int AdjustPreferredSideOrder(int side, int order)
Adjusts the preferredSideOrder for faces.
void Diagnose()
Get the small element and check restraints with all elements with lower dimension on side correspondi...
virtual void Print(std::ostream &out=std::cout) const override
Prints the relevant data of the element to the output stream.
TPZDepend * AddDependency(int64_t myindex, int64_t dependindex, TPZFMatrix< REAL > &depmat, int64_t ipos, int64_t jpos, int isize, int jsize)
Add dependency between connects.
virtual void RemoveSideRestraintsII(MInsertMode mode)
Delete the restraints on the nodes of the connected elements if necessary.
virtual int NStateVariables() const =0
Returns the number of state variables associated with the material.
TPZGradSolVec dsol
vector of the derivatives of the solution at the integration point
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
REAL val(STATE &number)
Returns value of the variable.
#define LOGPZ_WARN(A, B)
Define log for warnings.
virtual int64_t CreateMidSideConnect(int side)
Verify the neighbours of the element and create a node along this side.
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 const TPZIntPoints & GetIntegrationRule() const override=0
Returns a reference to an integration rule suitable for integrating the interior of the element...
TPZBlock< STATE > fBlock
Block structure associated with fMat.
virtual void Divide(TPZVec< TPZGeoEl *> &pv)
Divides the element and puts the resulting elements in the vector.
virtual void ComputeSolution(TPZVec< REAL > &qsi, TPZSolVec &sol, TPZGradSolVec &dsol, TPZFMatrix< REAL > &axes) override
Computes solution and its derivatives in the local coordinate qsi.
virtual void BuildCornerConnectList(std::set< int64_t > &connectindexes) const override
adds the connect indexes associated with base shape functions to the set
virtual void Print(std::ostream &out) const
Prints information of the cubature rule.
Contains TPZBlockDiagonal class which defines block diagonal matrices.
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.
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
virtual void ForceSideOrder(int side, int order)
Impose an interpolation order on a given side (without using computesideorder)
Contains the TPZTransfer class which implements a rectangular sparse block matrix.
virtual void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
TPZFNMatrix< 220, REAL > phi
vector of shapefunctions (format is dependent on the value of shapetype)
virtual int GetSub(const int64_t sRow, const int64_t sCol, const int64_t rowSize, const int64_t colSize, TPZFMatrix< TVar > &Target) const
Gets submatrix storing it on Target.
int NShapeF() const override
Returns the total number of shapefunctions.
void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
TPZConnect & SideConnect(int icon, int is)
Returns a pointer to the icon th connect object along side is.
void SetDefaultOrder(int order)
TPZFNMatrix< 660, REAL > dphix
values of the derivative of the shape functions
void CalcIntegral(TPZElementMatrix &ef)
Computes the integral over the finite element.
virtual void SideShapeFunction(int side, TPZVec< REAL > &point, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi) override=0
Compute the values of the shape function along the side.
Abstract class defining integration rules. Numerical Integration.
virtual void IdentifySideOrder(int side)
Checks if the side order is consistent with the preferred side order and with the constraints and rec...
This abstract class defines the behaviour which each derived class needs to implement.
Contains declaration of TPZElementMatrix struct which associates an element matrix with the coeficien...
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...
virtual void Shape(TPZVec< REAL > &qsi, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphidxi)=0
Computes the shape function set at the point x.
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
virtual TPZMaterial * Material() const
Identify the material object associated with the element.
unsigned char LagrangeMultiplier() const
Access method to return the indication whether the connect is associated with a pressure lagrange mul...
void HigherLevelElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected elements which have level higher to the current element.
virtual ~TPZInterpolatedElement()
Destructor, does nothing.
int NumDepend() const
size of the dependency list
TPZCompEl * CreateCompEl(TPZGeoEl *gel, int64_t &index)
Create a computational element based on the geometric element.
int Zero() override
Makes Zero all the elements.
int64_t size() const
Returns the number of elements of the vector.
virtual void GetInterpolationOrder(TPZVec< int > &ord)=0
Identifies the interpolation order of all connects of the element different from the corner connects...
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 CheckConstraintConsistency()
Check the consistency of the constrained connects for all sides.
unsigned char Order() const
Access function to return the order associated with the connect.
int64_t SequenceNumber() const
Returns the Sequence number of the connect object.
void Push(const T object)
Pushes a copy of the object on the stack.
void RemoveInterfaces()
Remove interfaces connected to this element.
void EqualLevelElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected elements which have equal level to the current element This method will not put...
#define LOGPZ_INFO(A, B)
Define log for informations.
virtual void ComputeShape(TPZVec< REAL > &intpoint, TPZVec< REAL > &X, TPZFMatrix< REAL > &jacobian, TPZFMatrix< REAL > &axes, REAL &detjac, TPZFMatrix< REAL > &jacinv, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi, TPZFMatrix< REAL > &dphidx)
Compute shape functions based on master element in the classical FEM manner.
int HasRowDefinition(int row)
Returns 1 if the row is defined (i.e. has column entries)
Structure to reference dependency.
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.
TVar Norm(const TPZFMatrix< TVar > &A)
Returns the norm of the matrix A.
#define DebugStop()
Returns a message to user put a breakpoint in.
void Divide(int64_t index, TPZVec< int64_t > &sub, int interpolatesolution=0) override
Implement the refinement of an interpolated element.
virtual void SetOrder(TPZVec< int > &ord, int type=0)=0
Sets the order of the cubature rule.
int CheckRestraint()
Gets the shape functions over the sides of the small and large elements and check the matrix restrain...
void SetAllCreateFunctions(TPZCompEl &cel)
virtual int SideConnectLocId(int icon, int is) const override=0
Returns the local node number of icon along is.
virtual TPZConnect & MidSideConnect(int is) const
Returns a reference to the connect in the middle of the side.
virtual void ExpandSolution()
Adapt the solution vector to new block dimensions.
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
TPZCompMesh * Mesh() const
Return a pointer to the grid of the element.
Free store vector implementation.
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 ...
TPZCompEl * Reference() const
Return a pointer to the element referenced by the geometric element.
unsigned int NShape() const
int64_t Rows() const
Returns number of rows.
int CompareShapeF(int sides, int sidel, TPZFMatrix< REAL > &phis, TPZFMatrix< REAL > &dphis, TPZFMatrix< REAL > &phil, TPZFMatrix< REAL > &dphil, TPZTransform<> &transform)
Compare the shape functions of sides of an element.
void SetNShape(int nshape)
Set the number of shape functions associated with the connect.
int HasDependency() const
Returns whether exist dependecy information.
bool VerifyConstraintConsistency(int side, TPZCompElSide large) const
return true if the connects associated with the side have dependency with large and if the dependency...
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ sqrt
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
const TPZBlock< STATE > & Block() const
Access the block structure of the solution vector.
virtual void Solution(TPZVec< REAL > &qsi, int var, TPZVec< STATE > &sol) override
Post processing method which computes the solution for the var post processed variable.
Contains declaration of TPZCheckMesh class which verifies the consistency of the datastructure of a T...
int Exists() const
Verifies if the object is non null (initialized)
Contains declaration of TPZCompelDisc class which implements a computational element for discontinuou...
expr_ expr_ fastAccessDx(i) *cos(expr_.val())) FAD_FUNC_MACRO(TFadFuncTan
TPZAdmChunkVector< TPZConnect > & ConnectVec()
Return a reference to the connect pointers vector.
int64_t Index() const
Returns element index of the mesh fELementVec list.
Contains the TPZMaterialData class which implements an interface between TPZCompEl::CalcStiff and TPZ...
virtual int NConnects() const override=0
Returns the number of connect objects of the element.
virtual int PreferredSideOrder(int iside)=0
Returns the preferred order of the polynomial along side iside.
#define LOGPZ_ERROR(A, B)
Define log for errors (cout)
int SetNBlocks(const int num_of_blocks)
Sets number of blocks on diagonal matrix.
virtual void SetCreateFunctions(TPZCompMesh *mesh) override
Set create function in TPZCompMesh to create elements of this type.
Contains declaration of TPZCompMesh class which is a repository for computational elements...
int Redim(const int64_t newRows, const int64_t newCols) override
Redimension a matrix and ZERO your elements.
virtual TPZConnect & Connect(int i) const
Returns a pointer to the ith node.
void InterpolateSolution(TPZInterpolationSpace &coarsel)
Interpolates the solution into the degrees of freedom nodes from the degrees of freedom nodes from th...
virtual int CheckElementConsistency()
Checks element data structure consistancy.
unsigned char NState() const
Number of state variables associated with the connect.
virtual void BuildTransferMatrix(TPZInterpolatedElement &coarsel, TPZTransform<> &t, TPZTransfer< STATE > &transfer)
Accumulates the transfer coefficients between the current element and the coarse element into the tra...
int32_t Hash(std::string str)
virtual int64_t ConnectIndex(int i) const =0
Returns the index of the ith connectivity of the element.
This class associates an element matrix with the coeficients of its contribution in the global stiffn...
Implements the interfaces for TPZCompElDisc, TPZInterfaceElement and TPZInterpolatedElement. Computational element.
virtual int EffectiveSideOrder(int side) const =0
Returns the actual interpolation order of the polynomial along the side.
TPZGeoEl * Element() const
TPZFNMatrix< 50, REAL > fDepMatrix
virtual int NCornerConnects() const =0
Returns the number of corner connects of the element.
MInsertMode
Defines a flag indicating the state of creation/deletion of the element This has an impact on how con...
virtual void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
int NSideShapeF(int side) const
Returns the number of shape functions on a side.
virtual void SetPreferredOrder(int order) override=0
Sets the preferred interpolation order along a side.
virtual int Dimension() const =0
Returns the dimension of the element.
TPZCompEl * Element() const
Gives a pointer to the reference computational element.
Contains the TPZMat1dLin class which implements a one-dimensional linear problem. ...
virtual void AllHigherDimensionSides(int side, int targetdimension, TPZStack< TPZGeoElSide > &elsides)=0
TPZGeoEl * Reference() const
Return a pointer to the corresponding geometric element if such exists, return 0 otherwise.
virtual int NSolutionVariables(int var)
Returns the number of variables associated with the variable indexed by var.
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...
Implements block matrices. Matrix utility.
void ExpandShapeFunctions(TPZVec< int64_t > &connectlist, TPZVec< int > &dependencyorder, TPZVec< int > &blocksizes, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Auxiliary method to expand a vector of shapefunctions and their derivatives to acount for constraints...
virtual int NSideConnects(int iside) const override=0
Returns the number of dof nodes along side iside.
int Dimension() const
the dimension associated with the element/side
void ResetReference()
Reset the element referenced by the geometric element to NULL.
int64_t SideConnectIndex(int icon, int is) const
Returns the index of the c th connect object along side is.
void Reset(TPZCompMesh *mesh=NULL, MType type=Unknown)
Reset the data structure.
TPZDepend * FirstDepend()
virtual std::string Name()
Returns the name of the material.
Implements computational mesh. Computational Mesh.
static void BuildDependencyOrder(TPZVec< int64_t > &connectlist, TPZVec< int > &DependenceOrder, TPZCompMesh &mesh)
This method builds the vector DependenceOrder which indicates in which order constrained nodes need t...
int Size(const int block_diagonal) const
Returns block dimension.
virtual void RemoveSideRestraintWithRespectTo(int side, const TPZCompElSide &neighbour)
Removes the side restraints of the current element along side with respect to neighbour/side.
TPZAdmChunkVector< TPZCompEl * > & ElementVec()
Returns a reference to the element pointers vector.
Contains TPZSolver class which defines a abstract class of solvers which will be used by matrix class...
static int sidedimension[27]
Vector of the dimension for each side.
void PRefine(int order) override
Changes the interpolation order of a side. Updates all constraints and block sizes ...
void SetReference(TPZCompEl *elp)
Make the current element reference to the computational element.
virtual void Solution(TPZVec< REAL > &qsi, int var, TPZVec< STATE > &sol)
Calculates the solution - sol - for the variable var at point qsi, where qsi is expressed in terms of...
Contains declaration of TPZInterpolatedElement class which implements computational element of the in...
virtual REAL CompareElement(int var, char *matname) override
Compare the L2 norm of the difference between the švarš solution of the current element with the švar...
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.
Contains TPZStepSolver class which defines step solvers class.
int Side() const
Returns the side index.
int64_t Cols() const
Returns number of cols.
void RemoveDepend(int64_t myindex, int64_t dependindex)
Remove dependency between connects if exist.
virtual void Print(std::ostream &out) const
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.
virtual TPZIntPoints * Clone() const =0
Make a clone of the related cubature rule.
Implements rectangular matrix which extends a solution vector of the coarse mesh to a solution vector...
int ClassId() const override
Define the class id associated with the class.
void Print(const TPZCompMesh &mesh, std::ostream &out=std::cout)
Print the information for the connect element.
TPZFMatrix< REAL > & RestraintMatrix()
Returns the restraint matrix.
Defines the interface of a computational element. Computational Element.
TPZSolVec sol
vector of the solutions at the integration point
virtual int NSubElements() const =0
Returns the number of subelements of the element independent of the fact whether the element has alr...
virtual int HasDependency()
Returns 1 if the element has at least one dependent node. Returns 0 otherwise.
int64_t fIndex
Element index into mesh element vector.
TPZFMatrix< STATE > & Solution()
Access the solution vector.
virtual void SetSideOrder(int side, int order)=0
Sets the interpolation order of side to order.
Implements computational element based on an interpolation space. Computational Element.
virtual int SolveDirect(TPZFMatrix< TVar > &F, const DecomposeType dt, std::list< int64_t > &singular)
Solves the linear system using Direct methods.
Non abstract class which implements full matrices with preallocated storage with (N+1) entries...
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.
int Resequence(const int start=0)
Resequences blocks positioning.
TPZCompMesh * fMesh
Computational mesh to which the element belongs.
static int ComputeSideOrder(TPZVec< TPZCompElSide > &elementset)
Computes the minimum interpolation order of the elements contained in elementset this method is used ...
virtual void Print(std::ostream &out=std::cout) const override
Prints the relevant data of the element to the output stream.
virtual int MidSideConnectLocId(int is) const
Returns the local id of the connect in the middle of the side.
This class verifies the consistency of the datastructure of a TPZCompMesh object. Computational Mesh...