19 static LoggerPtr logger(Logger::getLogger(
"pz.mesh.TPZInterpolationSpace"));
59 for(
int i = 0; i < n; i++){
65 if (side > result) result = side;
74 int integrationruleorder = 0;
80 integrationruleorder = order + order;
91 out << __PRETTY_FUNCTION__ << std::endl;
102 PZError <<
"\nERROR AT " << __PRETTY_FUNCTION__ <<
" - this->Reference() == NULL\n";
106 ref->
Jacobian( intpoint, jacobian, axes, detjac , jacinv);
107 this->
Shape(intpoint,phi,dphi);
121 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" this->Reference() == NULL\n";
139 const int nshape = this->
NShapeF();
150 int64_t nsol = data.
sol.
size();
151 for (int64_t is=0; is<nsol; is++) {
153 data.
dsol[is].Redim(dim,nstate);
184 center_qsi[0] = 0.25;
185 center_qsi[1] = 0.25;
207 int thisFace, neighbourFace, i, dim;
208 TPZGeoEl * thisGeoEl, * neighbourGeoEl;
212 TPZManVector<REAL,3> thisCenter(thiseldim,0.), thisXVol(3,0.), neighbourXVol(3,0.), vec(3), axes1(3), axes2(3);
214 thisFace = thisGeoEl->
NSides() - 1;
221 while (neighbourGeoElSide != thisside) {
227 neighbourGeoElSide = neighbourGeoElSide.
Neighbour();
229 neighbourGeoEl = neighbourGeoElSide.
Element();
230 neighbourFace = neighbourGeoEl->
NSides() - 1;
233 if(neighbourGeoEl == thisGeoEl)
238 int neightdim = neighbourGeoEl->
Dimension();
242 neighbourGeoEl->
CenterPoint(neighbourFace, neighbourCenter);
244 thisGeoEl->
X(thisCenter,thisXVol);
245 neighbourGeoEl->
X(neighbourCenter,neighbourXVol);
247 for(i = 0; i < 3; i++)
248 vec[i] = -neighbourXVol[i] + thisXVol[i];
260 for(i = 0 ; i < 3; i ++) axes1[i] = data.
axes(0,i);
265 for(i = 0; i < 3; i++)
267 axes1[i] = data.
axes(0,i);
268 axes2[i] = data.
axes(1,i);
275 PZError <<
"TPZInterpolationSpace::ComputeNormal - unhandled element dimension\n";
281 for(i = 0; i < 3; i++) dot += data.
normal[i] * vec[i];
284 for(i = 0; i < 3; i++) data.
normal[i] *= -1.;
291 kvec[0] = ivec[1]*jvec[2] - ivec[2]*jvec[1];
292 kvec[1] = -ivec[0]*jvec[2] + ivec[2]*jvec[0];
293 kvec[2] = ivec[0]*jvec[1] - ivec[1]*jvec[0];
299 for(i = 0; i < 3; i++)size += kvec[i] * kvec[i];
302 for(i = 0; i < 3; i++)kvec[i] /= size;
310 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" this->Material() == NULL\n";
312 PZError <<
"Material Id which is missing = " << matid << std::endl;
319 if (logger->isDebugEnabled())
321 std::stringstream sout;
322 sout << __PRETTY_FUNCTION__ <<
" material id " << material->
Id();
365 int intrulepoints = intrule->
NPoints();
366 for(
int int_ind = 0; int_ind < intrulepoints; ++int_ind){
367 intrule->
Point(int_ind,intpoint,weight);
381 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" this->Material() == NULL\n";
410 int intrulepoints = intrule->
NPoints();
411 for(
int int_ind = 0; int_ind < intrulepoints; ++int_ind){
412 intrule->
Point(int_ind,intpoint,weight);
432 const int nshape = this->
NShapeF();
449 for(i=0; i<ncon; i++){
467 numeq += nshape*nstate;
473 for(i=0; i<ncon; i++){
483 const int nshape = this->
NShapeF();
484 const int numeq = nshape*numdof;
492 for(i=0; i<ncon; i++){
494 unsigned int nshapec = c.
NShape();
503 for(i=0; i<ncon; i++){
547 PZError << __PRETTY_FUNCTION__ <<
" this->Material() == NULL " << std::endl;
561 int cormatsize = coarsel.
NShapeF();
565 PZError <<
"\nExiting " << __PRETTY_FUNCTION__ <<
" - trying to interpolate a node solution.\n";
578 int thismaxorder = this->
MaxOrder();
579 int coarsemaxorder = coarsel.
MaxOrder();
580 int maxorder = (thismaxorder > coarsemaxorder) ? thismaxorder : coarsemaxorder;
584 for(
int dim = 0; dim <
dimension; dim++) {
585 order[dim] = maxorder*2;
597 TPZFNMatrix<9> jacobian(dimension,dimension),jacinv(dimension,dimension);
606 du[0].Redim(dimension,nvar);
608 int numintpoints = intrule->
NPoints();
614 for(
int int_ind = 0; int_ind < numintpoints; ++int_ind) {
615 intrule->
Point(int_ind,int_point,weight);
617 this->
ComputeShape(int_point, x, jacobian, axes, jac_det, jacinv, locphi, locdphi, locdphidx);
619 t.
Apply(int_point,coarse_int_point);
622 for(lin=0; lin<locmatsize; lin++) {
623 for(ljn=0; ljn<locmatsize; ljn++) {
624 loclocmat(lin,ljn) += weight*locphi(lin,0)*locphi(ljn,0);
626 for(cjn=0; cjn<nvar; cjn++) {
627 projectmat(lin,cjn) += (STATE)weight*(STATE)locphi(lin,0)*u[0][cjn];
633 for (lin = 0; lin < locmatsize; lin++) {
634 for (cjn = 0; cjn < locmatsize; cjn++) {
635 REAL
val =
fabs(loclocmat(lin,cjn));
636 large = large<val ?
val : large;
639 loclocmat *= 1./large;
640 projectmat *= 1./large;
646 for(in=0; in<locnod; in++) {
649 int dfvar = fineblock.
Size(dfseq);
650 for(ljn=0; ljn<dfvar; ljn++) {
651 fineblock(dfseq,0,ljn,0) = projectmat(iv/nvar,iv%nvar);
664 int nsides = ref->
NSides();
668 for(side=nsides;side>=0;side--) {
684 for(is=0; is<ns; is++) {
685 const int higheldim = highlist[is].Reference().Dimension();
686 if(higheldim != InterfaceDimension)
continue;
696 PZError <<
"\nERROR AT " << __PRETTY_FUNCTION__ <<
" - CASE NOT AVAILABLE\n";
716 LOGPZ_WARN(logger,
"Exiting CreateInterface Null reference reached - NULL interface returned");
737 int list0side = list[0].Side();
741 int neighside = list0side;
743 if (BetweenContinuous ==
false){
745 if (!thisdisc && !neighdisc){
758 if (logger->isDebugEnabled())
760 std::stringstream sout;
761 sout <<
"CreateBCGeoEl devolveu zero!@@@@";
808 if(!leftIsLinear && !rightIsLinear){
810 std::cout <<
"\nError at " << __PRETTY_FUNCTION__ <<
"\n";
813 std::stringstream sout;
814 sout <<
"\nError at " << __PRETTY_FUNCTION__ <<
"\n";
815 sout <<
"left gel:\n";
816 leftGel->
Print(sout);
817 sout <<
"right gel:";
818 rightGel->
Print(sout);
820 faceGel->
Print(sout);
830 return newcreatedinterface;
843 if (thisdim == neighbourdim){
848 if (thisdim < neighbourdim) matid = this->
Material()->
Id();
865 int lowside = lower.
Side();
869 int neighside = lowside;
871 if (BetweenContinuous ==
false){
873 if (!thisdisc && !neighdisc){
914 if (logger->isDebugEnabled())
916 std::stringstream sout;
917 sout << __PRETTY_FUNCTION__ <<
" left element";
918 sout << lowcelcompelside << thiscompelside;
919 sout <<
"Left Element ";
921 sout <<
"Right Element ";
922 thiscompelside.Element()->Print(sout);
937 if(!leftIsLinear && !rightIsLinear){
939 std::cout <<
"\nError at " << __PRETTY_FUNCTION__ <<
"\n";
942 std::stringstream sout;
943 sout <<
"\nError at " << __PRETTY_FUNCTION__ <<
"\n";
944 sout <<
"left gel:\n";
945 leftGel->
Print(sout);
946 sout <<
"right gel:";
947 rightGel->
Print(sout);
949 faceGel->
Print(sout);
959 return newcreatedinterface;
970 if(!neighcompside.
Element())
continue;
981 std::stringstream mess;
982 mess << __PRETTY_FUNCTION__ <<
" - this->Material() == NULL, I can't RemoveInterfaces()";
983 PZError << mess.str() << std::endl;
990 for(is=0;is<nsides;is++){
1000 for(i=0;i<size;i++){
1002 LOGPZ_DEBUG(logger,
"Removing interface element from the list of higher level elements");
1007 for(i=0;i<size;i++){
1008 if(!list[i].Element())
continue;
1010 if(geolist.
Dimension() != InterfaceDimension)
continue;
1012 list[i].EqualLevelElementList(equal,0,0);
1013 equal.
Push(list[i]);
1015 while(++k < neq)
if(equal[k].Element()->
Type() !=
EInterface)
break;
1016 if(!neq || k == neq){
1023 PZError <<
"\nERROR AT " << __PRETTY_FUNCTION__ <<
" - CASE NOT AVAILABLE\n";
1039 while(++i < size)
if(list[i].Element()->
Type() ==
EInterface)
break;
1040 if(!size || i == size){
1042 if (logger->isDebugEnabled())
1044 std::stringstream sout;
1045 sout << __PRETTY_FUNCTION__ <<
" no interface element found\n";
1056 if (logger->isDebugEnabled())
1058 std::stringstream sout;
1059 sout << __PRETTY_FUNCTION__ <<
" element index " <<
Index() <<
" side " << std::endl;
1060 sout <<
"geometric element reference count " << gel->
NumInterfaces();
1072 PZError <<
"TPZInterpolatedElement::EvaluateError : no material for this element\n";
1076 if (dynamic_cast<TPZBndCond *>(material)) {
1077 LOGPZ_INFO(logger,
"Exiting EvaluateError - null error - boundary condition material.");
1093 const int order_limit = 8;
1094 if(maxIntOrder > order_limit)
1096 if (prevorder[0] > order_limit) {
1097 maxIntOrder = prevorder[0];
1101 maxIntOrder = order_limit;
1108 int nflux = material->
NFluxes();
1117 int nintpoints = intrule->
NPoints();
1119 for(
int nint = 0; nint < nintpoints; nint++) {
1122 intrule->
Point(nint,intpoint,weight);
1138 ref->
X(intpoint, data.
x);
1140 fp(data.
x,u_exact,du_exact);
1146 material->
ErrorsHdiv(data,u_exact,du_exact,values);
1151 material->
Errors(data.
x,data.
sol[0],data.
dsol[0],data.
axes,flux_el,u_exact,du_exact,values);
1154 for(
int ier = 0; ier < NErrors; ier++)
1155 errors[ier] += weight*values[ier];
1161 for(
int ier = 0; ier < NErrors; ier++){
1162 errors[ier] =
sqrt(errors[ier]);
1166 int64_t index =
Index();
1168 if (elvals.
Cols() < NErrors) {
1169 std::cout <<
"The element solution of the mesh should be resized before EvaluateError\n";
1172 for (
int ier=0; ier <NErrors; ier++) {
1173 elvals(index,ier) = errors[ier];
1185 std::cout <<
"TPZCompElDisc::ComputeError : no material for this element\n";
1205 int npoints = intrule->
NPoints(), ip;
1206 for(ip=0;ip<npoints;ip++){
1207 intrule->
Point(ip,intpoint,weight);
1220 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" : no material for this element\n";
1224 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" : no reference element\n";
1238 while(neighbour != gelside)
1240 if (neighbour.Element()->Reference() && neighbour.Element()->Dimension() ==
Mesh()->
Dimension()) {
1245 if (neighbour == gelside) {
1248 gelside.SideTransform3(neighbour, tr);
1249 TPZTransform<REAL> tr2 = neighbour.Element()->SideToSideTransform(neighbour.Side(), neighbour.Element()->NSides()-1);
1266 int npoints = intrule.
NPoints(), ip, iv;
1268 for(ip=0;ip<npoints;ip++) {
1269 intrule.
Point(ip,intpoint,weight);
1272 tr.
Apply(intpoint, intpointTR);
1282 material->
Solution(data, variable, sol);
1284 for(iv = 0; iv < varsize; iv++) {
1285 #ifdef STATE_COMPLEX 1286 value[iv] += sol[iv].real()*weight;
1289 value[iv] += sol[iv]*weight;
1343 std::stringstream sout;
1344 sout <<
"Exiting ProjectFlux: no material for this element\n";
1352 int num_flux = material->
NFluxes();
1364 for(
int i=0; i<ncon; ++i){
1376 for(
int int_ind = 0; int_ind < intrule.
NPoints(); ++int_ind){
1378 intrule.
Point(int_ind,intpoint,weight);
1384 for(
int in=0; in<nshape; in++){
1385 for(
int ifl=0; ifl<num_flux; ifl++){
1386 (ef.
fMat)(in,ifl) += flux[ifl]*(STATE)data.
phi(in,0)*(STATE)weight;
1388 for(
int jn = 0; jn<nshape; jn++){
1389 (ek.
fMat)(in,jn) += data.
phi(in,0)*data.
phi(jn,0)*weight;
1404 #ifndef STATE_COMPLEX 1421 int intrulepoints = intrule->
NPoints();
1422 intrule->
Point(0,intpoint,weight);
1427 for(
int int_ind = 1; int_ind < intrulepoints; int_ind++){
1428 intrule->
Point(int_ind,intpoint,weight);
1430 for(
int iv = 0; iv < nvars; iv++){
1431 if (sol[0][iv] < min[iv]) min[iv] = sol[0][iv];
1432 if (sol[0][iv] > max[iv]) max[iv] = sol[0][iv];
1451 int cormatsize = coarsel.
NShapeF();
1458 int coarsemaxorder = this->
MaxOrder();
1459 if(coarsemaxorder > mymaxorder) {
1460 std::stringstream sout;
1461 sout <<
"Exiting BuildTransferMatrix - compute the transfer matrix coarse " 1462 << coarsemaxorder <<
" me " << mymaxorder << std::endl;
1469 connectlistcoarse.
Resize(0);
1470 dependencyordercoarse.
Resize(0);
1485 for(in=0;in<cornod; in++) {
1486 int c = connectlistcoarse[in];
1490 if(con.
NShape() != blsize)
1495 corblock.
Set(in,blsize);
1496 corblocksize.
Push(blsize);
1497 cormatsize += blsize;
1520 order[dim] = mymaxorder*2;
1526 for(in = 0; in < locnod; in++) {
1528 unsigned int nshape = c.
NShape();
1535 locblock.
Set(in,nshape);
1539 REAL locphistore[50]={0.},locdphistore[150]={0.};
1552 REAL jacobianstore[9],
1555 coarse_int_point(dimension);
1556 TPZFMatrix<REAL> jacobian(dimension,dimension,jacobianstore,9),jacinv(dimension,dimension);
1559 int_point.Fill(0.,0);
1561 ref->
Jacobian( int_point, jacobian , axes, jac_det, jacinv);
1562 REAL multiplier = 1./jac_det;
1564 int numintpoints = intrule->
NPoints();
1570 std::stringstream sout;
1571 coarsel.
Print(sout);
1573 for (
int ic=0; ic<nc ; ic++) {
1576 sout <<
"Connect list coarse " << connectlistcoarse << std::endl;
1577 sout <<
"dependency order " << dependencyordercoarse << std::endl;
1582 for(
int int_ind = 0; int_ind < numintpoints; ++int_ind) {
1584 intrule->
Point(int_ind,int_point,weight);
1585 ref->
Jacobian( int_point, jacobian , axes, jac_det, jacinv);
1586 ref->
X(int_point, x);
1587 Shape(int_point,locphi,locdphi);
1589 t.
Apply(int_point,coarse_int_point);
1592 coarsel.
Shape(coarse_int_point,corphi,cordphi);
1596 std::stringstream sout;
1597 corphi.
Print(
"Coarse shape functions before expandShapeFunctions",sout);
1601 coarsel.
ExpandShapeFunctions(connectlistcoarse,dependencyordercoarse,corblocksize,corphi,cordphi);
1604 std::stringstream sout;
1605 corphi.
Print(
"Coarse shape functions after expandShapeFunctions",sout);
1610 for(lin=0; lin<locmatsize; lin++) {
1611 for(ljn=0; ljn<locmatsize; ljn++) {
1612 loclocmat(lin,ljn) += weight*locphi(lin,0)*locphi(ljn,0)*multiplier;
1614 for(cjn=0; cjn<cormatsize; cjn++) {
1615 loccormat(lin,cjn) += weight*locphi(lin,0)*corphi(cjn,0)*multiplier;
1624 std::stringstream sout;
1625 loccormat.
Print(
"Element transfer matrix",sout);
1630 for(in=0; in<locnod; in++) {
1634 int locblocksize = locblock.
Size(in);
1635 int64_t locblockpos = locblock.
Position(in);
1638 int64_t numnonzero = 0, jn;
1641 for(jn = 0; jn<cornod; jn++) {
1642 int corblocksize = corblock.
Size(jn);
1643 int64_t corblockpos = corblock.
Position(jn);
1644 int64_t cind = connectlistcoarse[jn];
1648 if(locblocksize == 0 || corblocksize == 0)
continue;
1650 loccormat.
GetSub(locblockpos,corblockpos, locblocksize,corblocksize,smalll);
1653 locblockvec.
Push(jn);
1654 globblockvec.
Push(corblocknumber);
1661 for(jnn = 0; jnn<numnonzero; jnn++) {
1662 jn = locblockvec[jnn];
1663 int corblocksize = corblock.
Size(jn);
1664 int64_t corblockpos = corblock.
Position(jn);
1665 if(corblocksize == 0 || locblocksize == 0)
continue;
1667 loccormat.
GetSub(locblockpos,corblockpos,locblocksize,corblocksize,smalll);
1668 transfer.
SetBlockMatrix(locblocknumber,globblockvec[jnn],smalll);
1676 int64_t numblocks = connectlist.
NElements();
1679 int current_order = 0;
1680 int current_block =0;
1681 while(nhandled < numblocks) {
1682 if(dependencyorder[current_block] == current_order) {
1684 int64_t cind = connectlist[current_block];
1686 con.
ExpandShape(cind,connectlist,blocksizes,phi,dphix);
1689 if(current_block == numblocks) {
1699 int nsides = gel->
NSides();
1707 if(side < nnos || side ==nsides-1)
DebugStop();
1733 int nshape = dphi.
Cols();
1734 int dim = dphi.
Rows();
1735 dphidx.
Resize(dim,nshape);
1746 dphidx *= jacinv.
GetVal(0,0);
1751 for(ieq = 0; ieq < nshape; ieq++) {
1759 for(ieq = 0; ieq < nshape; ieq++) {
1768 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" please implement the " << dim <<
"d Jacobian and inverse\n";
virtual ~TPZInterpolationSpace()
Default destructor.
virtual void Solution(TPZMaterialData &data, int var, TPZVec< STATE > &Solout)
Returns the solution associated with the var index based on the finite element approximation.
TPZFMatrix< STATE > & ElementSolution()
Access method for the element solution vectors.
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
void CreateInterfaces(bool BetweenContinuous=false)
Create interfaces between this and its neighbours.
Contains the TPZInt1d, TPZIntTriang, TPZIntQuad, TPZIntCube3D, TPZIntTetra3D, TPZIntPyram3D and TPZIn...
virtual int GetSideOrient(int side)
It returns the normal orientation of the reference element by the side. Only side that has dimension ...
TPZManVector< REAL, 3 > normal
normal to the element at the integration point
int Position(const int block_diagonal) const
Returns the position of first element block dependent on matrix diagonal.
virtual int NPoints() const =0
Returns number of points for the cubature rule related.
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.
Represents a set of shape functions associated with a computational element/side. Computational Eleme...
Contains the TPZChangeEl class. It is a special map.
virtual void Errors(TPZMaterialData &data, TPZVec< STATE > &u_exact, TPZFMatrix< STATE > &du_exact, TPZVec< REAL > &errors)
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 MElementType Type()
Return the type of the element.
virtual void InitMaterialData(TPZMaterialData &data)
Initialize a material data and its attributes based on element dimension, number of state variables a...
int MaterialId() const
Returns the material index of the element.
int ExistsInterface(TPZGeoElSide geosd)
Verify existence of interface.
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.
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...
virtual void resize(const int64_t newsize)
virtual int NConnectShapeF(int icon, int order) const =0
Returns the number of shapefunctions associated with a connect.
virtual void ErrorsHdiv(TPZMaterialData &data, TPZVec< STATE > &u_exact, TPZFMatrix< STATE > &du_exact, TPZVec< REAL > &values)
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
TPZStack< int64_t > fConnect
Vector of pointers to TPZConnect objects.
virtual void Integrate(int variable, TPZVec< STATE > &value) override
Integrates a variable over the element.
void AddBlockNumbers(int row, TPZVec< int > &colnumbers)
Will specify the sparsity pattern of row.
TPZFNMatrix< 660, REAL > dphi
values of the derivative of the shape functions over the master element
TPZGeoElSide Reference() const
Reference to the geometric element.
TPZFNMatrix< 1000, STATE > fMat
Pointer to a blocked matrix object.
virtual int ComputeIntegrationOrder() const override
Compute integration order according to ... .
std::list< TPZOneShapeRestraint > fOneRestraints
list of one degree of freedom restraints
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...
virtual int Dimension() const =0
Dimension of the element.
virtual int NCornerNodes() const =0
Returns the number of corner nodes of the element.
Contains declaration of TPZInterpolationSpace class which implements the interface for interpolated c...
virtual int Dimension() const =0
Returns the integrable dimension of the material.
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
TPZFNMatrix< 9, REAL > jacinv
value of the inverse of the jacobian at the integration point
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
virtual void CalcResidual(TPZElementMatrix &ef) override
Only computes the element residual.
REAL val(STATE &number)
Returns value of the variable.
#define LOGPZ_WARN(A, B)
Define log for warnings.
TPZGeoElSide Neighbour() const
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...
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef)=0
It computes a contribution to the stiffness matrix and load vector at one integration point...
TPZBlock< STATE > fBlock
Block structure associated with fMat.
TPZManVector< REAL, 3 > xParametric
value of the coordinate at the integration point corresponding to the x-parametric coordinate (master...
virtual int SideDimension(int side) const =0
Return the dimension of side.
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
TPZFNMatrix< 9, REAL > jacobian
value of the jacobian at the integration point
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)
int p
maximum polinomial order of the shape functions
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.
TPZInterpolationSpace()
Default constructor.
#define LOGPZ_FATAL(A, B)
Define log for fatal errors (cout)
TPZFNMatrix< 660, REAL > dphix
values of the derivative of the shape functions
virtual int ClassId() const override
Define the class id associated with the class.
Abstract class defining integration rules. Numerical Integration.
virtual void SetIntegrationRule(int order) override
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 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 BuildTransferMatrix(TPZInterpolationSpace &coarsel, TPZTransform<> &t, TPZTransfer< STATE > &transfer)
Accumulates the transfer coefficients between the current element and the coarse element into the t...
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.
void HigherLevelElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected elements which have level higher to the current element.
void ProjectFlux(TPZElementMatrix &ek, TPZElementMatrix &ef) override
Integrate the solution over 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...
virtual void Flux(TPZVec< REAL > &x, TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, TPZVec< STATE > &flux)
Computes the value of the flux function to be used by ZZ error estimator.
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.
virtual int NEvalErrors()
Returns the number of norm errors. Default is 3: energy, L2 and H1.
TPZManVector< REAL, 3 > XCenter
value of the coordinate at the center of the element
void Read(TPZStream &buf, void *context) override
Read the element data from a stream.
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.
virtual void Write(const bool val)
int HasRowDefinition(int row)
Returns 1 if the row is defined (i.e. has column entries)
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
TVar Norm(const TPZFMatrix< TVar > &A)
Returns the norm of the matrix A.
virtual int NFluxes()
Returns the number of components which form the flux function.
virtual void FillDataRequirements(TPZMaterialData &data)
Fill material data parameter with necessary requirements for the.
TPZInterfaceElement * CreateInterface(int side, bool BetweenContinuous=false)
Create an interface between this and the neighbour by side side.
#define DebugStop()
Returns a message to user put a breakpoint in.
Contains declaration of TPZInterfaceElement class which computes the contribution over an interface b...
virtual void SetOrder(TPZVec< int > &ord, int type=0)=0
Sets the order of the cubature rule.
static void Convert2Axes(const TPZFMatrix< REAL > &dphi, const TPZFMatrix< REAL > &jacinv, TPZFMatrix< REAL > &dphidx)
convert a shapefunction derivative in xi-eta to a function derivative in axes
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
TPZCompMesh * Mesh() const
Return a pointer to the grid of the element.
int Dimension() const
Returns the dimension of the simulation.
int NumInterfaces()
Returns number of TPZInterfaceElement pointing to this.
virtual MElementType Type() const =0
Returns the element type acording to pzeltype.h.
virtual void ContributeErrors(TPZMaterialData &data, REAL weight, TPZVec< REAL > &nk, int &errorid)
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 ...
TPZMaterial * FindMaterial(int id)
Find the material with identity id.
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 HasDependency() const
Returns whether exist dependecy information.
virtual void ComputeError(int errorid, TPZVec< REAL > &error) override
Computes the element error estimator.
int NormalOrientation(int side)
Determine the orientation of the normal vector comparing the ids of the neighbouring elements...
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.
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.
int Exists() const
Verifies if the object is non null (initialized)
Contains declaration of TPZCompelDisc class which implements a computational element for discontinuou...
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...
REAL HSize
measure of the size of the element
virtual void InitializeElementMatrix(TPZElementMatrix &ek, TPZElementMatrix &ef)
Initialize element matrix in which is computed CalcStiff.
int intGlobPtIndex
global point index
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)
int SetNBlocks(const int num_of_blocks)
Sets number of blocks on diagonal matrix.
virtual void ComputeSolution(TPZVec< REAL > &qsi, TPZMaterialData &data)
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 VectorialProd(TPZVec< REAL > &ivec, TPZVec< REAL > &jvec, TPZVec< REAL > &kvec, bool unitary=false)
Computes the vectorial product of two vectors and normalize the result if unitary is set to true...
void InterpolateSolution(TPZInterpolationSpace &coarsel)
Interpolates the solution into the degrees of freedom nodes from the degrees of freedom nodes from th...
int intLocPtIndex
Index of the current integration point being evaluated.
virtual int GetPreferredOrder()
Returns the prefered order for the element.
unsigned char NState() const
Number of state variables associated with the connect.
int32_t Hash(std::string str)
virtual int64_t ConnectIndex(int i) const =0
Returns the index of the ith connectivity of the element.
Computes the contribution over an interface between two discontinuous elements. Computational 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 NConnects() const =0
Returns the number of nodes of the element.
virtual bool IsLinearMapping() const
TPZGeoEl * Element() const
virtual void SetSideOrient(int side, int sideorient)
It set the normal orientation of the element by the side. Only side that has dimension equal to my di...
virtual std::list< TPZOneShapeRestraint > GetShapeRestraints() const
Return a list with the shape restraints.
virtual void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
virtual TPZVec< STATE > IntegrateSolution(int variable) const override
Integrate a variable over the element.
virtual int Dimension() const =0
Returns the dimension of the element.
TPZCompEl * Element() const
Gives a pointer to the reference computational element.
int64_t Id() const
Returns the Id of the element.
virtual void CalcStiff(TPZElementMatrix &ek, TPZElementMatrix &ef) override
Computes the element stiffness matrix and right hand side.
TPZGeoEl * Reference() const
Return a pointer to the corresponding geometric element if such exists, return 0 otherwise.
virtual int NShapeF() const =0
It returns the shapes number of the element.
TPZCompEl * LeftElement() const
Returns the left element from the element interface.
virtual int NSolutionVariables(int var)
Returns the number of variables associated with the variable indexed by var.
TPZCompElSide Reference() const
Returns a pointer to the elementside referenced by the geometric elementside.
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...
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 GetMaxOrder() const
Returns the minimum order to integrate polinomials exactly for all implemented cubature rules...
virtual bool IsGeoBlendEl() const
int Dimension() const
the dimension associated with the element/side
void Reset(TPZCompMesh *mesh=NULL, MType type=Unknown)
Reset the data structure.
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 Print(std::ostream &out=std::cout) const
Prints element data.
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...
int NumLoadCases()
returns the number of load cases for this material object
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.
int Side() const
Returns the side index.
int64_t Cols() const
Returns number of cols.
void Write(TPZStream &buf, int withclassid) const override
Save the element data to a stream.
virtual void Print(std::ostream &out) const
virtual int MaxOrder()
Returns the max order of interpolation.
int Resize(const int64_t newRows, const int64_t wCols) override
Redimension a matrix, but maintain your elements.
virtual void ComputeNormal(TPZMaterialData &data)
Computes the proper normal vector towards the neighbour element.
int InterfaceMaterial(int leftmaterial, int rightmaterial)
Returns the interface material associated to left and right element materials. If no interface materi...
Defines the interface for saving and reading data. Persistency.
int64_t NElements() const
Returns the number of elements of the vector.
TPZCompEl * RightElement() const
Returns the right element from the element interface.
void MinMaxSolutionValues(TPZVec< STATE > &min, TPZVec< STATE > &max)
Returns minimum and maximum values for each state variable.
virtual TPZIntPoints * Clone() const =0
Make a clone of the related cubature rule.
This class implements a discontinuous element (for use with discontinuous Galerkin). Computational Element.
virtual void ComputeRequiredData(TPZMaterialData &data, TPZVec< REAL > &qsi)
Compute and fill data with requested attributes.
virtual REAL ElementRadius()
virtual REAL InnerRadius()
Returns the inner radius value.
Implements rectangular matrix which extends a solution vector of the coarse mesh to a solution vector...
virtual void Print(std::ostream &out=std::cout)
Print all relevant data of the element to cout.
int fPreferredOrder
Preferred polynomial order.
TPZManVector< std::pair< int, int64_t > > fVecShapeIndex
correspondence between normal vector index and index of the shape functions
void Print(const TPZCompMesh &mesh, std::ostream &out=std::cout)
Print the information for the connect element.
virtual void AdjustIntegrationRule()
Adjust the integration rule according to the polynomial order of shape functions. ...
Defines the interface of a computational element. Computational Element.
TPZSolVec sol
vector of the solutions at the integration point
virtual int HasDependency()
Returns 1 if the element has at least one dependent node. Returns 0 otherwise.
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 ExpandShape(int64_t cind, TPZVec< int64_t > &connectlist, TPZVec< int > &blocksize, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
REAL detjac
determinant of the jacobian
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.
void RemoveInterface(int side)
Remove interface which is neighbour from side side.
int Resequence(const int start=0)
Resequences blocks positioning.
TPZCompMesh * fMesh
Computational mesh to which the element belongs.
virtual void Print(std::ostream &out=std::cout) const override
Prints the relevant data of the element to the output stream.
virtual void Read(bool &val)
virtual void EvaluateError(std::function< void(const TPZVec< REAL > &loc, TPZVec< STATE > &val, TPZFMatrix< STATE > &deriv)> func, TPZVec< REAL > &errors, bool store_error) override
Performs an error estimate on the elemen.