24 static LoggerPtr logger(Logger::getLogger(
"pz.mesh.TPZCompElHDiv"));
25 static LoggerPtr loggerdiv(Logger::getLogger(
"pz.mesh.tpzinterpolatedelement.divide"));
31 template<
class TSHAPE>
34 TPZIntelGen<TSHAPE>(mesh,gel,index,1), fSideOrient(TSHAPE::NFaces,1) {
42 TSHAPE::LowerDimensionSides(TSHAPE::NSides-1,facesides,TSHAPE::Dimension-1);
43 facesides.
Push(TSHAPE::NSides-1);
44 for(
int i=0;i< facesides.
size(); i++)
46 int sideaux= facesides[i];
49 if (logger->isDebugEnabled())
51 std::stringstream sout;
52 sout <<
"After creating last flux connect " << i << std::endl;
71 sideorder = 2*sideorder;
72 if (sideorder > this->
fIntRule.GetMaxOrder()) sideorder = this->
fIntRule.GetMaxOrder();
75 int firstside = TSHAPE::NSides-TSHAPE::NFaces-1;
76 for(
int side = firstside ; side < TSHAPE::NSides-1; side++ )
91 template<
class TSHAPE>
101 template<
class TSHAPE>
104 std::map<int64_t,int64_t> & gl2lcConMap,
105 std::map<int64_t,int64_t> & gl2lcElMap) :
115 if (gl2lcConMap.find(glIdx) != gl2lcConMap.end()) lcIdx = gl2lcConMap[glIdx];
118 std::stringstream sout;
119 sout <<
"ERROR in : " << __PRETTY_FUNCTION__
120 <<
" trying to clone the connect index: " << glIdx
121 <<
" wich is not in mapped connect indexes!";
130 template<
class TSHAPE>
137 for(i=0;i<TSHAPE::NSides;i++) {
143 template<
class TSHAPE>
149 for (
int side=TSHAPE::NCornerNodes; side < TSHAPE::NSides; side++) {
150 if (TSHAPE::SideDimension(side) != TSHAPE::Dimension-1) {
164 int64_t ncel = celstack.
size();
165 for (int64_t el=0; el<ncel; el++) {
186 template<
class TSHAPE>
188 return TSHAPE::Type();
192 template<
class TSHAPE>
196 return TSHAPE::NumSides(dimension) + 1;
199 template<
class TSHAPE>
203 std::cout <<
" TPZCompElHDiv<TSHAPE>::SetConnectIndex index " << i <<
211 if (logger->isDebugEnabled())
213 std::stringstream sout;
214 sout << endl<<
"Setting Connect : " << i <<
" to connectindex " << connectindex<<std::endl;
220 template<class TSHAPE>
224 if (connect < 0 || connect >=
NConnects()) {
238 const int nfaces = TSHAPE::NumSides(TSHAPE::Dimension-1);
239 int face = TSHAPE::NSides-nfaces+connect-1;
241 TSHAPE::LowerDimensionSides(face,lowerdimensionsides);
242 int nshape = TSHAPE::NConnectShapeF(face,order);
243 for (
int is=0; is<lowerdimensionsides.
size(); is++) {
244 nshape += TSHAPE::NConnectShapeF(lowerdimensionsides[is],order);
249 const int nfaces = TSHAPE::NumSides(TSHAPE::Dimension-1);
250 int face = TSHAPE::NSides-nfaces-1;
252 for (
int side = face; side < TSHAPE::NSides-1; side++) {
253 nvecignore += TSHAPE::NContainedSides(side);
258 TSHAPE::GetSideHDivDirections(vecside,directions,bilinear);
272 int nshape = TSHAPE::NShapeF(orders);
275 for (
int i=0; i<
id.size(); i++) {
280 int nexternalvectors = 0;
281 nexternalvectors = nvecignore;
284 TSHAPE::ShapeOrder(
id, orders, shapeorders);
286 static int first = 0;
288 shapeorders.
Print(
"ShapeOrders");
299 if (logger->isDebugEnabled())
301 std::stringstream sout;
302 sout <<
"FirstIndex "<<FirstIndex << std::endl;
311 int64_t nvec = vecside.NElements();
312 for (
int locvec = nexternalvectors; locvec<nvec; locvec++)
314 int side = vecside[locvec];
315 int bil = bilinear[locvec];
316 int dir = directions[locvec];
320 int firstshape = FirstIndex[side];
321 int lastshape = FirstIndex[side+1];
323 for (
int ish = firstshape; ish<lastshape; ish++)
326 int maxorder[3] = {internalorder,internalorder,internalorder};
335 if (shapeorders(ish,d) > maxorder[d]+1) {
341 if (shapeorders(ish,d) > maxorder[d]) {
347 if (shapeorders(ish,d) > maxorder[d]) {
354 if (shapeorders(ish,d) > maxorder[d]) {
358 else if (tipo ==
EOned)
360 if (shapeorders(ish,0) > maxorder[d]) {
370 if (shapeorders(ish,d) > maxorder[d]) {
390 std::stringstream sout;
391 sout <<__PRETTY_FUNCTION__<<
"unhandled case ";
403 template<
class TSHAPE>
410 template<
class TSHAPE>
412 if(TSHAPE::SideDimension(side)<=
Dimension()-2)
return 0;
413 if(TSHAPE::SideDimension(side)==
Dimension()-1)
return 1;
414 if(TSHAPE::SideDimension(side)==
Dimension()) {
420 std::stringstream sout;
421 sout << __PRETTY_FUNCTION__ <<
"Side: " << side <<
"unhandled case ";
429 template<
class TSHAPE>
432 if(TSHAPE::SideDimension(side)<= TSHAPE::Dimension - 2 || node >=
NSideConnects(side)) {
433 PZError <<
"TPZCompElHDiv<TSHAPE>::SideConnectLocId no connect associate " << endl;
438 return node+side-(TSHAPE::NSides-TSHAPE::NumSides(TSHAPE::Dimension-1)-1);
441 template<
class TSHAPE>
444 int side = connect+TSHAPE::NSides-TSHAPE::NumSides(TSHAPE::Dimension-1)-1 ;
448 template<
class TSHAPE>
458 template<
class TSHAPE>
460 if(TSHAPE::SideDimension(side) <
Dimension()-1)
462 PZError << __PRETTY_FUNCTION__ <<
" side " << side << std::endl;
466 PZError <<
"TPZCompElHDiv<TSHAPE>::PreferredSideOrder no polynomial associate " << endl;
473 PZError <<
"TPZCompElHDiv<TSHAPE>::PreferredSideOrder called for connect = " << connect <<
"\n";
478 template<
class TSHAPE>
482 std::cout <<
"TPZCompElHDiv::ConnectIndex wrong parameter connect " << con <<
483 " NConnects " << this->
NConnects() << std::endl;
511 template<
class TSHAPE>
518 template<
class TSHAPE>
521 if(connectaux<0 || connectaux > this->
NConnects()) {
522 PZError <<
"TPZCompElHDiv::SetSideOrder. Bad paramenter side " << side <<
" order " << order << std::endl;
524 std::stringstream sout;
525 sout << __PRETTY_FUNCTION__ <<
" Bad side or order " << side <<
" order " << order;
532 int64_t seqnum = c.SequenceNumber();
543 template<
class TSHAPE>
545 if (connect < 0 || connect >= this->
NConnects()){
548 std::stringstream sout;
549 sout <<
"Connect index out of range connect " << connect <<
558 std::stringstream sout;
559 sout << __PRETTY_FUNCTION__ <<
" connect " << connect
560 <<
" is not initialized" << std::endl;
564 std::cout << sout.str() << std::endl;
573 template<
class TSHAPE>
584 TSHAPE::HigherDimensionSides(side, high);
588 for(
int j=0;j<highside;j++)
598 template<
class TSHAPE>
604 for(
int iside=0;iside<TSHAPE::NSides;iside++)
607 if (iside >= TSHAPE::NCornerNodes) {
608 sideorder = orders[iside-TSHAPE::NCornerNodes];
610 int temp = Index[iside] + TSHAPE::NConnectShapeF(iside,sideorder);
611 Index[iside+1] = temp;
615 if (logger->isDebugEnabled()) {
616 std::stringstream sout;
617 sout <<
"First Index " <<
Index;
624 template<class TSHAPE>
628 for(in=0;in<nn;in++){
655 template<
class TSHAPE>
663 template<
class TSHAPE>
668 int nshape = TSHAPE::NShapeF(order);
671 for (
int i=0; i<
id.size(); i++) {
675 int nexternalvectors = 0;
680 vecpermute.
resize(TSHAPE::NSides*TSHAPE::Dimension+1);
683 for (
int side = 0; side < TSHAPE::NSides; side++) {
684 if (TSHAPE::SideDimension(side) != TSHAPE::Dimension -1) {
688 int nlowdim = gelside.
NSides();
691 int counthold = count;
692 for (
int i=0; i<nlowdim; i++) {
693 vecpermute[counthold+i] = permgather[i]+counthold;
694 facevector[count] = side;
699 nexternalvectors = count;
700 for (; count < vecpermute.
size(); count++) {
701 vecpermute[count] = count;
704 TSHAPE::ShapeOrder(
id, order, shapeorders);
707 IndexVecShape.Resize(nshapeflux);
716 if(logger->isDebugEnabled())
718 std::stringstream sout;
719 sout <<
"FirstIndex "<<FirstIndex << std::endl;
729 for (
int locvec = 0; locvec<nexternalvectors; locvec++) {
730 int ivec = vecpermute[locvec];
731 int side = VectorSide[ivec];
732 int face = facevector[locvec];
736 int firstshape = FirstIndex[side];
737 int lastshape = FirstIndex[side+1];
739 for (
int ish = firstshape; ish<lastshape; ish++) {
744 if (shapeorders(ish,d) > order) {
750 IndexVecShape[count] = std::make_pair(ivec, ish);
757 for (
int locvec = nexternalvectors; locvec<nvec; locvec++) {
758 int ivec = vecpermute[locvec];
759 int side = VectorSide[ivec];
760 int bil = bilinear[ivec];
761 int dir = direction[ivec];
764 int firstshape = FirstIndex[side];
765 int lastshape = FirstIndex[side+1];
767 for (
int ish = firstshape; ish<lastshape; ish++) {
769 int maxorder[3] = {pressureorder,pressureorder,pressureorder};
779 shord[d] = shapeorders(ish,d);
780 int maxd = maxorder[d]+1;
781 if (shord[d] > maxd) {
787 shord[d] = shapeorders(ish,d);
788 int maxd = maxorder[d];
789 if (shord[d] > maxd) {
795 shord[d] = shapeorders(ish,d);
796 if (shord[d] > maxorder[d]) {
803 if (shapeorders(ish,d) > maxorder[d]) {
807 else if (tipo ==
EOned)
809 shord[0] = shapeorders(ish,0);
810 if (shord[0] > maxorder[d]) {
816 shord[d] = shapeorders(ish,d);
817 if (shord[d] > maxorder[d]) {
828 IndexVecShape[count] = std::make_pair(ivec, ish);
850 int ivs = IndexVecShape.size();
860 template<
class TSHAPE>
872 template<
class TSHAPE>
875 int firstside = TSHAPE::NSides-TSHAPE::NFaces-1;
876 if (side < firstside || side >= TSHAPE::NSides - 1) {
887 template<
class TSHAPE>
890 int firstside = TSHAPE::NSides-TSHAPE::NFaces-1;
891 if (side < firstside || side >= TSHAPE::NSides - 1) {
898 template<
class TSHAPE>
901 if(side==TSHAPE::NSides || point.
size() != TSHAPE::Dimension-1){
902 std::cout<<
"Don't have side shape associated to this side";
905 if(TSHAPE::SideDimension(side)!= TSHAPE::Dimension -1 ){
908 int ncontained = TSHAPE::NContainedSides(side);
913 for (is=0; is<ncontained; is++) {
914 int ic = TSHAPE::ContainedSideLocId(side,is);
915 nsideshape += TSHAPE::NConnectShapeF(ic,order);
925 int nsn = TSHAPE::NSideNodes(side);
927 for (
int ic=0; ic<nsn; ic++) {
928 int locid = TSHAPE::SideNodeLocId(side,ic);
929 id[ic] = gel->
Node(locid).
Id();
961 TSHAPE::SideShape(side,point,
id,ord,philoc,dphiloc);
963 int ncs = TSHAPE::NContainedSides(side);
965 for (
int ls=0; ls<ncs; ls++) {
966 int localside = TSHAPE::ContainedSideLocId(side,ls);
967 FirstIndex[ls+1] = FirstIndex[ls]+TSHAPE::NConnectShapeF(localside,order);
975 gelside.
Jacobian(point, jac, axes, detjac, jacinv);
978 for (
int side=0; side < ncs; side++) {
979 int ifirst = FirstIndex[side];
980 int kfirst = FirstIndex[permutegather[side]];
981 int nshape = FirstIndex[side+1]-FirstIndex[side];
982 for (
int i=0; i<nshape; i++) {
983 phi(ifirst+i,0) = philoc(kfirst+i,0)/detjac;
985 dphi(d,ifirst+i) = dphiloc(d,kfirst+i)/detjac;
992 template<
class TSHAPE>
1006 template<
class TSHAPE>
1014 template<
class TSHAPE>
1027 template<
class TSHAPE>
1034 template<
class TSHAPE>
1038 const int nshape = this->
NShapeF();
1050 template<
class TSHAPE>
1059 int64_t numbersol = MeshSol.
Cols();
1068 for (int64_t is=0; is<numbersol; is++)
1072 data.
dsol[is].Redim(dim*nstate, dim);
1082 GradOfPhiHdiv.
Zero();
1089 for (
int i=0; i<GradNormalvec.
size(); i++) {
1090 GradNormalvec[i].Redim(dim,dim);
1095 for (
int e = 0; e < normvecRows; e++) {
1096 for (
int s = 0; s < normvecCols; s++) {
1097 Normalvec(e,s)=data.fNormalVecFad(e,s).val();
1103 for (
int s = 0; s < normvecCols; s++) {
1105 if (data.fNormalVecFad(0,s)>0||data.fNormalVecFad(1,s)>0) {
1106 Grad0(0,0)=data.fNormalVecFad(0,s).fastAccessDx(0);
1107 Grad0(0,1)=data.fNormalVecFad(0,s).fastAccessDx(1);
1108 Grad0(1,0)=data.fNormalVecFad(1,s).fastAccessDx(0);
1109 Grad0(1,1)=data.fNormalVecFad(1,s).fastAccessDx(1);
1112 GradNormalvec[s] = Grad0;
1123 int ishape=0,ivec=0,counter=0;
1127 for(
int in=0; in<ncon; in++)
1131 int dfvar = block.
Size(dfseq);
1133 int64_t pos = block.
Position(dfseq);
1136 for(
int ish=0; ish<dfvar/nstate; ish++)
1143 for (
int e = 0; e < dim; e++) {
1144 for (
int f = 0;
f< dim;
f++) {
1145 GradOfPhiHdiv(e,
f) = Normalvec(e,ivec)*dphix(
f,ishape);
1149 for (int64_t is=0; is<numbersol; is++)
1153 STATE meshsol = MeshSol(pos+ish*nstate+
idf,is);
1154 REAL phival = data.
phi(ishape,0);
1157 for (
int i=0; i<3; i++)
1161 normal[i] = data.fNormalVecFad(i,ivec).val();
1171 if(logger->isDebugEnabled() &&
abs(meshsol) > 1.e-6)
1173 std::stringstream sout;
1174 sout <<
"meshsol = " << meshsol <<
" ivec " << ivec <<
" ishape " << ishape <<
" x " << data.
x << std::endl;
1175 sout <<
" phi = " << data.
phi(ishape,0) <<
" dphix " << dphix(0,ishape) <<
" " << dphix(1,ishape) << std::endl;
1176 sout <<
"normal = " << normal << std::endl;
1177 sout <<
"GradOfPhiHdiv " << GradOfPhiHdiv << std::endl;
1178 sout <<
"GradNormalVec " << GradNormalvec[ivec] << std::endl;
1183 for (
int ilinha=0; ilinha<dim; ilinha++) {
1184 data.
sol[is][ilinha+dim*
idf] += normal[ilinha]*phival*meshsol;
1185 for (
int kdim = 0 ; kdim < dim; kdim++) {
1186 data.
dsol[is](ilinha+dim*
idf,kdim)+= meshsol * GradOfPhiHdiv(ilinha,kdim);
1188 data.
dsol[is](ilinha+dim*
idf,kdim)+=meshsol *GradNormalvec[ivec](ilinha,kdim)*data.
phi(ishape,0);
1200 if(logger->isDebugEnabled())
1202 std::stringstream sout;
1203 sout <<
"x " << data.
x <<
" sol " << data.
sol[0] << std::endl;
1205 sout <<
"divsol" << data.
divsol[0] << std::endl;
1212 template<class TSHAPE>
1216 bool Is_u1PHI = (u1.
Cols() == 1) ?
true :
false;
1217 bool Is_u2PHI = (u2.
Cols() == 1) ?
true :
false;
1219 if(Is_u1PHI && Is_u2PHI)
1221 int64_t nu1 = u1.
Rows(),nu2 = u2.
Rows();
1222 u12.
Redim(nu1+nu2,1);
1224 for(i=0; i<nu1; i++) u12(i,0) = u1(i,0);
1225 for(i=0; i<nu2; i++) u12(i+nu1,0) = u2(i,0);
1229 else if(!Is_u1PHI || !Is_u2PHI)
1231 int64_t ru1 = u1.
Rows(), cu1 = u1.
Cols(), ru2 = u2.
Rows(), cu2 = u2.
Cols();
1232 int64_t ru12 = ru1 < ru2 ? ru2 : ru1;
1233 int64_t cu12 = cu1+cu2;
1234 u12.
Redim(ru12,cu12);
1236 for(i=0; i<ru1; i++)
for(j=0; j<cu1; j++) u12(i,j) = u1(i,j);
1237 for(i=0; i<ru2; i++)
for(j=0; j<cu2; j++) u12(i,j+cu1) = u2(i,j);
1241 PZError <<
"TPZCompElHDiv::Append. Bad input parameters " << std::endl;
1247 template<
class TSHAPE>
1250 int nvecs = TSHAPE::Dimension*TSHAPE::NSides;
1252 TSHAPE::GetSideHDivDirections(associated_side,direction,bilinear);
1254 for (
int iv=0; iv<nvecs; iv++) {
1255 int side = associated_side[iv];
1256 int bil = bilinear[iv];
1261 order.
resize(TSHAPE::NSides-TSHAPE::NCornerNodes);
1265 int internalorder = c.
Order();
1266 int nsides = TSHAPE::NSides;
1267 for (
int is=0; is<nsides; is++) {
1268 if (TSHAPE::SideDimension(is) ==0) {
1271 else if(TSHAPE::SideDimension(is) == TSHAPE::Dimension -1)
1273 int intorder = internalorder;
1278 if (connectindex < 0) {
1282 if (c.
Order() > intorder) {
1283 intorder = c.
Order();
1285 order[is-TSHAPE::NCornerNodes] = intorder;
1289 int intorder = internalorder;
1293 order[is-TSHAPE::NCornerNodes] = intorder;
1299 template<
class TSHAPE>
1302 TPZManVector<int, TSHAPE::NSides-TSHAPE::NCornerNodes+1> ord(TSHAPE::NSides-TSHAPE::NCornerNodes,0);
1305 for(i=0; i<TSHAPE::NCornerNodes; i++) {
1313 phi.
Redim(nshape, 1);
1314 dphi.
Redim(TSHAPE::Dimension, nshape);
1319 template<
class TSHAPE>
1322 return TSHAPE::NShapeF(order);
1335 template<
class TSHAPE>
1337 return TSHAPE::TransformSideToElement(side);
1340 template<
class TSHAPE>
1347 shapeindex.
Resize(nshape);
1349 int64_t is, count=0;
1350 for(is=0 ; is<nsides; is++)
1352 int side = sides[is];
1355 int NShapeFace = TSHAPE::NConnectShapeF(side,sideorder);
1357 for(ishapeface=0; ishapeface<NShapeFace; ishapeface++)
1359 shapeindex[count++] = is;
1362 shapeindex.
Resize(count);
1364 if (logger->isDebugEnabled())
1366 std::stringstream sout;
1367 sout <<
"count = " << count <<
" nshape " << nshape;
1368 sout << endl<<
"sides associated with the normals "<< sides <<
1369 "\nnormal associated with each shape function : shape function indexes " << shapeindex;
1375 template<class TSHAPE>
1389 int firstface = TSHAPE::NSides - TSHAPE::NFaces - 1;
1390 int lastface = TSHAPE::NSides - 1;
1395 for(
int side = firstface; side < lastface; side++)
1397 int nvec = TSHAPE::NContainedSides(side);
1398 for (
int ivet = 0; ivet<nvec; ivet++)
1400 for (
int il = 0; il<3; il++)
1414 for(
int side = firstface; side < lastface; side++)
1416 int nvec = TSHAPE::NContainedSides(side);
1417 for (
int ivet = 0; ivet<nvec; ivet++)
1419 for (
int il = 0; il<3; il++)
1421 data.fNormalVecFad(il,ivet+cont) *=
fSideOrient[side-firstface];
1434 for(
int side = firstface; side < lastface; side++)
1436 int nvec = TSHAPE::NContainedSides(side);
1437 for (
int ivet = 0; ivet<nvec; ivet++)
1439 for (
int il = 0; il<3; il++)
1456 if (logger->isDebugEnabled()) {
1457 std::stringstream sout;
1470 template<class TSHAPE>
1479 if(logger->isDebugEnabled())
1481 LOGPZ_DEBUG(logger,
"Initializing MaterialData of TPZCompElHDiv")
1495 normalsides.
resize(3*TSHAPE::NSides+1);
1497 TSHAPE::GetSideHDivDirections(vecside,directions,bilinear,normalsides);
1498 int64_t numvec = TSHAPE::Dimension*TSHAPE::NSides;
1506 data.fNormalVecFad.Resize(3, numvec);
1521 if(logger->isDebugEnabled())
1523 std::stringstream sout;
1525 for (
int i=0; i<TSHAPE::NCornerNodes; i++) {
1528 sout <<
"\n\nSides associated with the normals\n";
1529 for (
int i=0; i<normalsides.
size(); i++) {
1530 sout << i <<
'|' << normalsides[i] <<
" ";
1535 sout <<
"NormalVector/Shape indexes \n";
1548 template<class TSHAPE>
1562 for (std::list<TPZOneShapeRestraint>::const_iterator it =
fRestraints.begin(); it !=
fRestraints.end(); it++) {
1565 int classid = this->
ClassId();
1566 buf.
Write ( &classid, 1 );
1571 template<
class TSHAPE>
1579 buf.
Read(SideOrient);
1586 for (
int i=0; i<sz; i++) {
1592 buf.
Read( &classid, 1 );
1593 if ( classid != this->
ClassId())
1595 std::stringstream sout;
1596 sout <<
"ERROR - " << __PRETTY_FUNCTION__
1597 <<
" trying to restore an object id " << this->
ClassId() <<
" and classid read = " << classid;
1602 template<
class TSHAPE>
1615 for(icon=0; icon<ncon; icon++)
1622 if (logger->isDebugEnabled())
1624 std::stringstream sout;
1633 if (loggerdiv->isDebugEnabled()) {
1634 std::stringstream sout;
1635 sout << (
void*) this->
Mesh() <<
"PRefine elindex " << this->
Index() <<
" gel index " << this->
Reference()->
Index() <<
" " << order;
1636 sout <<
"\nPRefine connect orders ";
1638 for(
int ic=0; ic<nc; ic++) sout << (
int)this->
Connect(ic).
Order() <<
" ";
1661 con.SetNShape(nshape);
1662 int64_t seqnum = con.SequenceNumber();
1670 template<
class TSHAPE>
1673 out << __PRETTY_FUNCTION__ << std::endl;
1675 out <<
"Side orientation " <<
fSideOrient << std::endl;
1677 out <<
"One shape restraints associated with the element\n";
1678 for (std::list<TPZOneShapeRestraint>::const_iterator it =
fRestraints.begin(); it !=
fRestraints.end(); it++)
1688 template<
class TSHAPE>
1742 template<
class TSHAPE>
1744 if(dimension == TSHAPE::Dimension && this->
Material()->Id() > 0) {
1745 new typename TSHAPE::GraphElType(
this,&grafgrid);
1750 template<
class TSHAPE>
1763 std::list<TPZOneShapeRestraint>::iterator it =
fRestraints.begin();
1766 while (found ==
false && it !=
fRestraints.end()) {
1767 int64_t connectindex = it->fFaces[3].first;
1768 int64_t cindex = -1;
1769 for (
int is = 14; is<18; is++) {
1771 if (connectindex == cindex) {
1774 if (foundis == 18) {
1781 if (found ==
false) {
virtual void Solution(TPZMaterialData &data, int var, TPZVec< STATE > &Solout)
Returns the solution associated with the var index based on the finite element approximation.
Represents a graphical mesh used for post processing purposes. Post processing.
void Shape(TPZVec< REAL > &pt, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi) override
Computes the shape function set at the point x.
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...
virtual void Print(std::ostream &out=std::cout) const override
Prints the relevant data of the element to the output stream.
void Read(TPZStream &buf)
Contains the TPZGraphElTd class which implements the graphical discontinuous triangular element...
TPZCompEl * CreateRefHDivTriangleEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
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.
virtual void GetInterpolationOrder(TPZVec< int > &ord) override
Identifies the interpolation order on the interior of the element.
Implements computational element and a side. Computational Element.
TPZCompEl * CreateHDivPrismEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational prismal element for HDiv approximate space.
int Set(const int index, const int dim, const int pos=-1)
Modifies existing block dimensions or creates a new block with given index.
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.
TPZManVector< REAL, 3 > x
value of the coordinate at the integration point
virtual void InitMaterialData(TPZMaterialData &data)
Initialize a material data and its attributes based on element dimension, number of state variables a...
void FirstShapeIndex(TPZVec< int64_t > &Index) const
Returns the vector index of the first index shape associate to to each side Special implementation to...
TPZCompEl * CreateHDivCubeEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational cube element for HDiv approximate space.
void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
virtual int GetSideOrient(int side) override
It returns the normal orientation of the reference element by the side. Only side that has dimension ...
virtual void resize(const int64_t newsize)
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
int RestrainedFace()
return the first one dof restraint
TPZTransform TransformSideToElement(int side) override
Returns the transformation which transform a point from the side to the interior of the element...
TPZCompEl * CreateRefHDivQuadEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
void Print(const char *mess, std::ostream &out=std::cout) const
groups all classes dedicated to the computation of shape functions
TPZCompEl * CreateHDivBoundPointEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational point element for HDiv approximate space.
static void GetSideHDivPermutation(int transformid, TPZVec< int > &permgather)
Identifies the permutation of the nodes needed to make neighbouring elements compatible in terms of o...
virtual MElementType Type() override
Return the type of the element.
virtual void SetPreferredOrder(int order) override
Sets the preferred interpolation order along a side.
TPZCompEl * CreateRefHDivCubeEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Contains the TPZPoint class which defines the topology of a point.
virtual void SetPressureOrder(int ord)
Identifies the interpolation order for pressure variable.
Contains the TPZRefQuad class which implements the uniform refinement of a geometric quadrilateral el...
virtual void Print(std::ostream &out=std::cout) const override
Prints the relevant data of the element to the output stream.
virtual int ConnectSideLocId(int connect) const
return the local index for side
Definition of the retraint associated with the top of the pyramid.
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
MShapeFunctionType fShapeType
TPZCompElSide LowerLevelCompElementList2(int onlyinterpolated)
return the element/side pair which contains this/side and has a computational element associated ...
static void GetSideHDivPermutation(int transformationid, TPZVec< int > &permgather)
Identifies the permutation of the nodes needed to make neighbouring elements compatible in terms of o...
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
virtual int Dimension() const override
Returns the dimension of the element.
TinyFad< 8, T > abs(const TinyFad< 8, T > &in)
Contains declaration of TPZCompElHDiv class which implements a generic computational element (HDiv sc...
virtual int64_t CreateMidSideConnect(int side)
Verify the neighbours of the element and create a node along this side.
static int GetTransformId(TPZVec< int64_t > &id)
Method which identifies the transformation based on the IDs of the corner nodes.
std::list< TPZOneShapeRestraint > fRestraints
Data structure which defines the restraints.
virtual int SideDimension(int side) const =0
Return the dimension of side.
TPZCompEl * CreateHDivTetraEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational tetrahedral element for HDiv approximate space.
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
TPZFNMatrix< 220, REAL > phi
vector of shapefunctions (format is dependent on the value of shapetype)
Contains the TPZTriangle class which defines the topology of a triangle.
void Read(TPZStream &buf, void *context) override
Read the element data from a stream.
void IndexShapeToVec(TPZVec< int > &VectorSide, TPZVec< std::pair< int, int64_t > > &IndexVecShape, int pressureorder)
Returns a matrix index of the shape and vector associate to element.
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...
int NShapeF() const override
Returns the total number of shapefunctions.
Contains the TPZTetrahedron class which defines the topology of the tetrahedron element.
void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
virtual void PRefine(int order) override
Refinement along the element.
int NShapeContinuous(TPZVec< int > &order)
return the number of continuous functions
virtual void SetPreferredOrder(int order) override
Sets the preferred interpolation order along a side.
TPZFNMatrix< 660, REAL > dphix
values of the derivative of the shape functions
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.
virtual int MaxOrder() override
Return the maximum order??
virtual void Solution(TPZVec< REAL > &qsi, int var, TPZVec< STATE > &sol) override
Compute the solution for a given variable.
Contains TPZShapeCube class which implements the shape functions of a hexaedral element.
virtual TPZMaterial * Material() const
Identify the material object associated with the element.
int Zero() override
Makes Zero all the elements.
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...
Contains the TPZRefPrism class which implements the uniform refinement of a geometric prism element...
TPZFNMatrix< 220, REAL > divphi
values of the divergence of the shapefunctions in the mapped element (only applicable to H(div)) spac...
TPZCompEl * CreateHDivPyramEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational pyramidal element for HDiv approximate space.
virtual int IntegrationRuleOrder(int elPMaxOrder) const
Gets the order of the integration rule necessary to integrate an element with polinomial order p...
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.
Groups all classes defining the structure of the master element.
virtual void InitMaterialData(TPZMaterialData &data) override
Initialize a material data and its attributes based on element dimension, number of state variables a...
void Push(const T object)
Pushes a copy of the object on the stack.
void ComputeShapeIndex(TPZVec< int > &sides, TPZVec< int64_t > &shapeindex)
Compute the correspondence between the normal vectors and the shape functions.
Contains the TPZGraphElT3d class which implements the graphical representation of a tetrahedra elemen...
TPZCompEl * CreateHDivTriangleEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational triangular element for HDiv approximate space.
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.
virtual void Write(const bool val)
int ClassId() const override
Returns the unique identifier for reading/writing objects to streams.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Contains the TPZGraphElQ2dd class which implements the graphical two-dimensional discontinuous elemen...
int64_t Index() const
Returns the index of the element within the element vector of the mesh.
Contains the TPZGeoTetrahedra class which implements the geometry of a tetrahedral element...
#define DebugStop()
Returns a message to user put a breakpoint in.
void IndexShapeToVec2(TPZVec< int > &VectorSide, TPZVec< int > &bilinear, TPZVec< int > &direction, TPZVec< std::pair< int, int64_t > > &IndexVecShape, int pressureorder)
virtual int SideConnectLocId(int icon, int is) const override=0
Returns the local node number of icon along is.
TPZCompEl * CreateRefHDivPyramEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
TPZFNMatrix< 180 > fNormalVec
list of normal vectors
Contains the TPZGraphElPrismMapped class which implements the graphical element for a prism using a d...
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
TPZCompMesh * Mesh() const
Return a pointer to the grid of the element.
TPZFNMatrix< 180 > fDirectionsOnMaster
Directions on the master element.
virtual void SetConnectIndex(int i, int64_t connectindex) override
Sets the node pointer of node i to nod.
Contains the TPZQuadrilateral class which defines the topology of a quadrilateral element...
TPZCompEl * CreateHDivBoundTriangleEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational triangular element for HDiv approximate space.
static void GetSideHDivPermutation(int transformationid, TPZVec< int > &permgather)
Identifies the permutation of the nodes needed to make neighbouring elements compatible in terms of o...
virtual void SetSideOrient(int side, int sideorient) override
It set the normal orientation of the element by the side. Only side that has dimension equal to my di...
TPZCompEl * Reference() const
Return a pointer to the element referenced by the geometric element.
int64_t Rows() const
Returns number of rows.
void Shape(TPZVec< REAL > &pt, TPZVec< int > orders, TPZVec< TPZTransform< REAL > > &transvec, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
static int GetTransformId(TPZVec< int64_t > &id)
Method which identifies the transformation based on the IDs of the corner nodes.
int NormalOrientation(int side)
Determine the orientation of the normal vector comparing the ids of the neighbouring elements...
void CreateGraphicalElement(TPZGraphMesh &grafgrid, int dimension) override
Creates corresponding graphical element(s) if the dimension matches graphical elements are used to ge...
virtual int NFluxShapeF() const
return the number of shape for flux(just for flux)
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
TPZCompEl * CreateRefHDivPrismEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
TPZCompEl * CreateHDivBoundQuadEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational quadrilateral element for HDiv approximate space.
virtual void ComputeRequiredData(TPZMaterialData &data, TPZVec< REAL > &qsi) override
Compute and fill data with requested attributes.
int NSides() const
Returns the number of sides in which the current side can be decomposed.
const TPZBlock< STATE > & Block() const
Access the block structure of the solution vector.
TPZCompEl * CreateRefHDivLinearEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
virtual void HDivDirections(TPZVec< REAL > &pt, TPZFMatrix< REAL > &directions, int RestrainedFace)=0
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.
TPZCompEl * CreateRefHDivTetraEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Contains the TPZGraphElPyramidMapped class which implements the graphical element for a pyramid using...
Contains declaration of TPZCompelDisc class which implements a computational element for discontinuou...
TPZAdmChunkVector< TPZConnect > & ConnectVec()
Return a reference to the connect pointers vector.
T * begin() const
Casting operator. Returns The fStore pointer.
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...
Implements a generic computational element to HDiv scope. Computational Element.
Contains TPZShapePoint class which implements the shape function associated with a point...
#define LOGPZ_ERROR(A, B)
Define log for errors (cout)
Implements generic class which holds a matrix of objects. Matrix.
Contains declaration of TPZCompMesh class which is a repository for computational elements...
void FillOrder(TPZVec< int > &order) const
Fill the polynomial order needed from the continuous shape functions.
int Redim(const int64_t newRows, const int64_t newCols) override
Redimension a matrix and ZERO your elements.
TPZGeoNode & Node(int i) const
Returns the ith node of the element.
virtual TPZConnect & Connect(int i) const
Returns a pointer to the ith node.
int SideOrient(int face)
the orientation of the face
Contains the TPZGeoPoint class which implements the geometry of a point element or 0-D element...
virtual int PreferredSideOrder(int iside) override
Returns the preferred order of the polynomial along side iside.
Contains declaration of TPZCompElHDivPressure class which implements a generic computational element ...
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.
TPZGeoEl * Element() const
virtual void HDivDirectionsMaster(TPZFMatrix< REAL > &directions)=0
virtual void SetSideOrder(int side, int order) override
Sets the interpolation order of side to order.
virtual void HDivPermutation(int side, TPZVec< int > &permutegather)
Computes the permutation for an HDiv side.
virtual int SideConnectLocId(int node, int side) const override
return the local index for connect
Contains the TPZRefTriangle class which implements the uniform refinement of a geometric triangular e...
TPZSolVec divsol
vector of the divergence of the solution at the integration point (only of hdiv spaces) ...
TPZManVector< int64_t, TSHAPE::NSides > fConnectIndexes
Indexes of the connects associated with the elements.
virtual int NConnects() const override
Returns the number of connect objects of the element.
Contains the TPZRefTetrahedra class which implements the uniform refinement of a geometric tetrahedra...
int NSideShapeF(int side) const
Returns the number of shape functions on a side.
virtual int Dimension() const =0
Returns the dimension of the element.
TPZCompEl * Element() const
Gives a pointer to the reference computational element.
TPZGeoEl * Reference() const
Return a pointer to the corresponding geometric element if such exists, return 0 otherwise.
MElementType
Define the element types.
virtual int NSideConnects(int side) const override
Returns the number of dof nodes along side iside.
void ComputeSolutionHDiv(TPZVec< REAL > &qsi, TPZMaterialData &data)
void ResetReference()
Reset the element referenced by the geometric element to NULL.
virtual int64_t ConnectIndex(int con) const override
Returns the index of the ith connectivity of the element.
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.
Contains declaration of TPZCompElHDivBound2 class which implements a generic computational element (H...
Template to generate computational elements. Computational Element.
TPZCompEl * CreateHDivBoundLinearEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational linear element for HDiv approximate space.
Implements computational mesh. Computational Mesh.
int Size(const int block_diagonal) const
Returns block dimension.
TSHAPE::IntruleType fIntRule
Integration rule associated with the topology of the element.
static int sidedimension[27]
Vector of the dimension for each side.
virtual void SideShapeFunction(int side, TPZVec< REAL > &point, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi) override
Computes the values of the shape function of the side.
void SetReference(TPZCompEl *elp)
Make the current element reference to the computational element.
Contains the TPZGraphElT2dMapped class which implements a graphical element for a triangle mapped int...
Contains the TPZRefLinear class which implements the uniform refinement of a geometric linear element...
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 the declaration of the shape function discontinuous.
void ComputeFunctionDivergence()
Computes the flux divergence values based on a Material of Hdiv approx space.
int Side() const
Returns the side index.
int64_t Cols() const
Returns number of cols.
virtual int EffectiveSideOrder(int side) const override
Returns the actual interpolation order of the polynomial along the side.
void RemoveDepend(int64_t myindex, int64_t dependindex)
Remove dependency between connects if exist.
virtual void Print(std::ostream &out) const
virtual int MaxOrder()
Returns the max order of interpolation.
static int GetTransformId(TPZVec< int64_t > &id)
Method which identifies the transformation based on the IDs of the corner nodes.
int Resize(const int64_t newRows, const int64_t wCols) override
Redimension a matrix, but maintain your elements.
Contains TPZShapePiram class which implements the shape functions of a pyramid element.
Contains the TPZGeoPyramid class which implements the geometry of pyramid element.
Contains TPZGenMatrix class which implements generic class which holds a matrix of objects...
int Id() const
Returns the identity of the current node.
Defines the interface for saving and reading data. Persistency.
int64_t NElements() const
Returns the number of elements of the vector.
TPZCompEl * CreateHDivQuadEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational quadrilateral element for HDiv approximate space.
void HigherLevelCompElementList3(TPZStack< TPZCompElSide > &elsidevec, int onlymultiphysicelement, int removeduplicates)
Returns all connected computational elements which have level higher to the current element if onlym...
Contains the TPZGraphEl1dd class which implements the graphical one dimensional discontinuous element...
This class implements a "generic" computational element to HDiv scope. Computational Element...
Contains the TPZGeoPrism class which implements the geometry of a prism element.
Contains declaration of TPZReferredCompEl class which generates computational elements.
Contains the TPZCube class which defines the topology of the hexahedron element.
virtual void ComputeRequiredData(TPZMaterialData &data, TPZVec< REAL > &qsi)
Compute and fill data with requested attributes.
Contains the TPZLine class which defines the topology of a line element.
Groups all classes which model the geometry.
int fPreferredOrder
Preferred polynomial order.
TPZManVector< std::pair< int, int64_t > > fVecShapeIndex
correspondence between normal vector index and index of the shape functions
virtual int ConnectOrder(int connect) const override
return the interpolation order of the polynomial for connect
Contains the TPZPrism class which defines the topology of a Prism.
Defines the interface of a computational element. Computational Element.
TPZSolVec sol
vector of the solutions at the integration point
Contains TPZShapeQuad class which implements the shape functions of a quadrilateral element...
Contains the TPZRefCube class which implements the uniform refinement of a geometric hexahedral eleme...
virtual int NConnectShapeF(int connect, int order) const override
Number of shapefunctions of the connect associated.
Contains the TPZGraphElQ3dd class which implements the graphical three dimensional discontinuous elem...
Contains the TPZRefPoint class which implements the uniform refinement of a geometric point element...
TPZFMatrix< STATE > & Solution()
Access the solution vector.
TPZCompEl * CreateHDivLinearEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational linear element for HDiv approximate space.
Contains TPZShapeTriang class which implements the shape functions of a triangular element...
Implements computational element based on an interpolation space. Computational Element.
Implements an interface to register a class id and a restore function. Persistence.
virtual void SetIntegrationRule(int ord) override
#define PZError
Defines the output device to error messages and the DebugStop() function.
virtual void ComputeSolution(TPZVec< REAL > &qsi, TPZSolVec &sol, TPZGradSolVec &dsol, TPZFMatrix< REAL > &axes) override
Computes solution and its derivatives in the local coordinate qsi.
TPZManVector< int, TSHAPE::NFaces > fSideOrient
vector which defines whether the normal is outward or not
virtual void Read(bool &val)
Implements a generic computational element. Computational Element.