24 static LoggerPtr logger(Logger::getLogger(
"pz.mesh.tpzinterfacelement"));
25 static LoggerPtr logdata(Logger::getLogger(
"pz.material.axisymetric.data"));
30 if(fLeftElSide.Element() && fRightElSide.Element()) this->DecreaseElConnected();
37 PZError << __PRETTY_FUNCTION__ <<
" - Left element is not a TPZInterpolatedElement or TPZCompElDisc.\n";
41 this->fLeftElSide.SetElement( left.
Element() );
42 this->fLeftElSide.SetSide( left.
Side() );
45 PZError << __PRETTY_FUNCTION__ <<
" - Left element is null.\n";
55 PZError << __PRETTY_FUNCTION__ <<
" - Right element is not a TPZInterpolatedElement or TPZCompElDisc.\n";
59 this->fRightElSide.SetElement( right.
Element() );
60 this->fRightElSide.SetSide( right.
Side() );
63 PZError << __PRETTY_FUNCTION__ <<
" - Right element is null.\n";
68 this->ComputeCenterNormal(fCenterNormal);
72 fCenterNormal.Resize(3, 0.);
76 this->IncrementElConnected();
78 this->InitializeIntegrationRule();
79 this->PrepareIntPtIndices();
84 const int ncon = this->NConnects();
85 for(
int i = 0; i < ncon; i++){
86 int index = this->ConnectIndex(i);
87 fMesh->ConnectVec()[index].DecrementElConnected();
92 const int ncon = this->NConnects();
93 for(
int i = 0; i < ncon; i++){
94 int index = this->ConnectIndex(i);
95 fMesh->ConnectVec()[index].IncrementElConnected();
100 DecreaseElConnected();
127 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" left or right null elements\n";
129 if (left.
Side() == -1 || right.
Side() == -1){
130 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" at line " << __LINE__ <<
" Side should not be -1\n";
159 cout <<
"Something wrong with clone of interface element\n";
163 cout <<
"The discontinuous elements should be cloned before the interface elements\n";
181 PZError <<
"ERROR at " << __PRETTY_FUNCTION__ <<
" at line " << __LINE__ <<
" - this->Reference() is NULL\n";
189 std::map<int64_t,int64_t> &gl2lcConIdx,
190 std::map<int64_t,int64_t> &gl2lcElIdx) :
200 if (gl2lcElIdx.find(cplftIdx) == gl2lcElIdx.end() || gl2lcElIdx.find(cprgtIdx) == gl2lcElIdx.end())
202 std::stringstream sout;
203 sout <<
"ERROR in " << __PRETTY_FUNCTION__
204 <<
" trying to generate an interface for discontinuous elements that are not cloned." 205 <<
" Right idx = " << cprgtIdx <<
" left index = " << cplftIdx;
218 cout <<
"Something wrong with clone of interface element\n";
222 cout <<
"The discontinuous elements should be cloned before the interface elements\n";
235 PZError <<
"ERROR at " << __PRETTY_FUNCTION__ <<
" at line " << __LINE__ <<
" - this->Reference() is NULL\n";
261 cout <<
"TPZInterfaceElement::TPZInterfaceElement Something wrong with clone of interface element\n";
265 cout <<
"TPZInterfaceElement::TPZInterfaceElement The discontinuous elements should be cloned " 266 <<
"before the interface elements\n";
277 PZError <<
"ERROR at " << __PRETTY_FUNCTION__ <<
" at line " << __LINE__ <<
" - this->Reference() is NULL\n";
297 if(!mat || mat->
Name() ==
"no_name"){
298 PZError <<
"TPZInterfaceElement::CalcResidual interface material null, do nothing\n";
309 if (!left || !right){
310 PZError <<
"\nError at TPZInterfaceElement::CalcResidual null neighbour\n";
316 PZError <<
"\n Error at TPZInterfaceElement::CalcResidual null material\n";
338 const int p = (datal.
p > datar.
p) ? datal.
p : datar.
p;
351 const int npoints = intrule->
NPoints();
361 for(
int ip = 0; ip < npoints; ip++){
363 intrule->
Point(ip,intpoint,weight);
369 TransfLeft.
Apply( intpoint, LeftIntPoint );
370 TransfRight.
Apply( intpoint, RightIntPoint );
393 if (!LeftEl)
return 0;
399 if (!RightEl)
return 0;
407 if (!left || !right)
return -1;
411 int p = (leftmaxp > rightmaxp) ? leftmaxp : rightmaxp;
419 const int ncon = nleftcon + nrightcon;
421 if(i < 0 || i >= ncon){
422 PZError <<
"TPZInterfaceElement::ConnectIndex wrong argument i, i = " << i << endl;
429 if (leftmesh ==
Mesh()) {
444 if (rightmesh ==
Mesh()) {
462 out <<
"\nInterface element : \n";
481 out <<
"\tNormal vector (at center point): ";
486 cout <<
"TPZInterfaceElement::SetConnectIndex should never be called\n";
498 int64_t iel,iside,nel = cmesh.
NElements();
500 int InterfaceDimension;
502 for(iel=0;iel<nel;iel++){
508 PZError <<
"TPZInterfaceElement::main computational element with null reference\n";
511 int nsides = geo->
NSides();
512 for(iside=0;iside<nsides;iside++){
513 if(geo->
SideDimension(iside) != InterfaceDimension)
continue;
518 PZError <<
"TPZInterfaceEl::main interface error\t->\t";
520 PZError <<
"number of existing interfaces : " << nint << endl;
535 PZError <<
"TPZInterfaceElement::ExistInterfaces null argument, do nothing it verify\n";
547 while(neigh.Exists() && neigh != geo){
548 if(neigh.Element()->Reference()){
549 PZError <<
"TPZInterfaceElement::ExistInterfaces error of data structure\n";
552 neigh = neigh.Neighbour();
564 PZError <<
"TPZInterfaceElement::ExistInterfaces error of data structure\n";
577 if(exists != 1)
return 0;
584 for(iel=0;iel<nel;iel++){
590 PZError <<
"TPZInterfaceElement::FreeInterface computational element with null reference\n";
594 int nsides = gel->
NSides();
606 if(exists < 1 || exists > 2)
return 0;
636 if (!LeftElMaterial || !RightElMaterial) {
637 std::cout <<
"Interface elements created between elements without material\n";
638 std::cout <<
"Material Ids missing ";
641 std::cout << std::endl;
652 int faceleft,faceright;
661 TPZManVector<REAL, 3> centleft(leftdim),centright(rightdim),point(3,0.),result(3,0.),xint(3),xvolleft(3),xvolright(3),vec(3),rib(3);
668 for(i=0;i<3;i++) vec[i] = xvolright[i]-xvolleft[i];
672 if (myinterfacedim != InterfaceDimension) {
673 std::stringstream sout;
674 sout << __PRETTY_FUNCTION__ <<
"the dimension of the interface element " << myinterfacedim <<
" is not compatible with the dimension of the material " << InterfaceDimension <<
681 InterfaceDimension = myinterfacedim;
685 REAL vecnorm =
sdot(vec, vec);
686 if(InterfaceDimension && vecnorm < 1.e-10)
688 int index =
fabs(axes(0,0)) <
fabs(axes(0,1)) ? 0 : 1;
689 index =
fabs(axes(0,index)) <
fabs(axes(0,2)) ? index : 2;
691 LOGPZ_WARN(logger,
"Left and Right element centers coincide")
695 switch(InterfaceDimension){
702 for(i=0;i<3;i++) rib[i] = axes(0,i);
707 for(i=0;i<3;i++) normalize += normal[i]*normal[i];
710 PZError << __PRETTY_FUNCTION__ <<
" null normal vetor\n";
713 std::stringstream sout;
721 normalize =
sqrt(normalize);
722 for(i=0;i<3;i++) normal[i] = normal[i]/normalize;
726 for(
int iax = 0; iax < 3; iax++){
727 axes1[iax] = axes(0,iax);
728 axes2[iax] = axes(1,iax);
734 PZError <<
"TPZInterfaceElement::NormalToFace in case that not treated\n";
742 for(i=0; i<3; i++) dot += normal[i]*vec[i];
744 for(i=0; i<3; i++) normal[i] = -normal[i];
751 kvet[0] = ivet[1]*jvet[2] - ivet[2]*jvet[1];
752 kvet[1] = -ivet[0]*jvet[2] + ivet[2]*jvet[0];
753 kvet[2] = ivet[0]*jvet[1] - ivet[1]*jvet[0];
759 for(
int i = 0; i < n; i++) CenterNormal[i] =
fCenterNormal[i];
809 if ( (this->
Index() < leftelindex) || (this->
Index() < rightelindex) ){
810 PZError << __PRETTY_FUNCTION__ << endl
811 <<
"Indices of neighbours are less than interface index:" << endl
812 <<
"Left: " << leftelindex <<
", Right: " << rightelindex <<
", this: " << this->
Index() << endl;
819 buf.
Write(&leftelindex,1);
820 buf.
Write(&leftside,1);
821 buf.
Write(&rightelindex,1);
822 buf.
Write(&rightside,1);
835 int64_t rightelindex;
836 int leftside, rightside;
838 buf.
Read(&leftelindex,1);
839 buf.
Read(&leftside,1);
840 buf.
Read(&rightelindex,1);
841 buf.
Read(&rightside,1);
856 if (!left || !right){
857 PZError <<
"\nError at TPZInterfaceElement::InitializeElementMatrix null neighbour\n";
863 PZError <<
"\n Error at TPZInterfaceElement::InitializeElementMatrix null material\n";
873 int nshapel = left ->
NShapeF();
874 int nshaper = right->
NShapeF();
884 const int neql = nshapel * nstatel;
885 const int neqr = nshaper * nstater;
886 const int neq = neql + neqr;
894 for(int64_t i = 0; i < n; i++) {
897 const int con_neq = nstatel * nshape;
905 (ef.
fConnect)[ic] = ConnectIndexL[i];
909 for(int64_t i = 0; i < n; i++) {
912 const int con_neq = nstater * nshape;
920 (ef.
fConnect)[ic] = ConnectIndexR[i];
933 if (!left || !right){
934 PZError <<
"\nError at TPZInterfaceElement::InitializeElementMatrix null neighbour\n";
941 PZError <<
"\n Error at TPZInterfaceElement::InitializeElementMatrix null material\n";
956 int nshapel = left ->
NShapeF();
957 int nshaper = right->
NShapeF();
967 const int neql = nshapel * nstatel;
968 const int neqr = nshaper * nstater;
969 const int neq = neql + neqr;
984 for(
int i = 0; i < n; i++) {
987 const int con_neq = nstatel * nshape;
996 (ef.
fConnect)[ic] = ConnectIndexL[i];
997 (ek.
fConnect)[ic] = ConnectIndexL[i];
1003 for (
int ip=0; ip<blsize; ip++)
1011 for(int64_t i = 0; i < n; i++) {
1014 const int con_neq = nstater * nshape;
1022 (ef.
fConnect)[ic] = ConnectIndexR[i];
1023 (ek.
fConnect)[ic] = ConnectIndexR[i];
1029 for (
int ip=0; ip<blsize; ip++)
1038 if(logdata->isDebugEnabled())
1040 std::stringstream sout;
1042 sout <<
"ElementSolution = { " << solutionvec <<
" }/1000000000000000.;" << std::endl;
1054 if (logger->isDebugEnabled())
1056 std::stringstream sout;
1057 sout <<
"elemento de interface " <<
Index() <<
" Indice deste Material--> " <<this->
Material()->
Id()<< std::endl;
1064 if(!mat || mat->Name() ==
"no_name"){
1065 PZError <<
"TPZInterfaceElement::CalcStiff interface material null, do nothing\n";
1074 if (!left || !right){
1075 PZError <<
"\nError at TPZInterfaceElement::CalcStiff null neighbour\n";
1081 PZError <<
"\n Error at TPZInterfaceElement::CalcStiff null material\n";
1096 mat->FillDataRequirementsInterface(data);
1104 if( !dataleft.
x.
size() ||!dataright.
x.
size() ){
1105 PZError <<
"\n Error at TPZInterfaceElement::CalcStiff null interface\n";
1118 if (logger->isDebugEnabled())
1120 if (logger->isDebugEnabled())
1122 std::stringstream sout;
1123 sout <<
"ordem maxima na esquerda " << leftmaxp<<std::endl;
1124 sout <<
"ordem maxima na direita " << rightmaxp<<std::endl;
1132 const int p = (leftmaxp > rightmaxp) ? leftmaxp : rightmaxp;
1138 const int npoints = intrule->
NPoints();
1148 for(
int ip = 0; ip < npoints; ip++){
1150 intrule->
Point(ip,intpoint,weight);
1154 TransfLeft.
Apply( intpoint, LeftIntPoint );
1155 TransfRight.
Apply( intpoint, RightIntPoint );
1169 data.
x = dataleft.
x;
1170 data.
p = dataright.
p;
1171 if (dataleft.
p > data.
p) {
1172 data.
p = dataleft.
p;
1175 mat->ContributeInterface(data,dataleft,dataright, weight, ek.
fMat, ef.
fMat);
1193 if (logger->isDebugEnabled())
1195 if (logger->isDebugEnabled())
1197 std::stringstream sout;
1198 sout <<
"ordem maxima na esquerda " << leftmaxp<<std::endl;
1199 sout <<
"ordem maxima na direita " << rightmaxp<<std::endl;
1207 const int p = (leftmaxp > rightmaxp) ? leftmaxp : rightmaxp;
1225 connects.
Fill(NULL);
1226 connectindex.
Resize(ncon);
1227 connectindex.
Fill(-1);
1229 for(
int i = 0; i < ncon; i++){
1231 if (elmesh != thismesh) {
1235 connectindex[i] = index;
1250 if(!mat || mat->
Name() ==
"no_name"){
1251 PZError <<
"TPZInterfaceElement::EvaluateInterfaceJump interface material null, do nothing\n";
1259 const int njump = (nstatel > nstater) ? nstatel : nstater;
1267 order.
Fill(maxorder);
1269 const int npoints = intrule->
NPoints();
1274 int64_t numbersol = jump.
size();
1275 for (int64_t is=0; is<numbersol; is++) {
1280 for(
int ip = 0; ip < npoints; ip++){
1281 intrule->
Point(ip,intpoint,weight);
1283 ref->
X(intpoint,data.
x);
1302 for (int64_t is=0; is<numbersol; is++) {
1303 localjump[is].
Resize(njump,0.);
1307 for (int64_t is=0; is<numbersol; is++) {
1309 for(int64_t ier = 0; ier < njump; ier++){
1310 jump[is][ier] += localjump[is][ier]*localjump[is][ier]*(STATE)weight;
1314 for(int64_t ier = 0; ier < njump; ier++){
1315 if(
fabs(localjump[is][ier]) >
fabs(jump[is][ier]) ){
1316 jump[is][ier] =
fabs( localjump[is][ier] );
1324 for (int64_t is=0; is<numbersol; is++) {
1326 for(int64_t ier = 0; ier < njump; ier++){
1327 jump[is][ier] =
sqrt(jump[is][ier]);
1340 PZError <<
"TPZInterfaceElement::ComputeErrorFace interface material null, do nothing\n";
1349 if (!left || !right){
1350 PZError <<
"\nError at TPZInterfaceElement::ComputeErrorFace null neighbour\n";
1355 PZError <<
"\n Error at TPZInterfaceElement::ComputeErrorFace null material\n";
1376 const int p = (datal.
p > datar.
p) ? datal.
p : datar.
p;
1388 const int npoints = intrule->
NPoints();
1398 for(
int ip = 0; ip < npoints; ip++){
1400 intrule->
Point(ip,intpoint,weight);
1406 TransfLeft.
Apply( intpoint, LeftIntPoint );
1407 TransfRight.
Apply( intpoint, RightIntPoint );
1439 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" : no material for this element\n";
1444 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" : no reference element\n";
1451 if (!left || !right){
1452 PZError <<
"\nError at TPZInterfaceElement::IntegrateInterface null neighbour\n";
1457 PZError <<
"\n Error at TPZInterfaceElement::IntegrateInterface null material\n";
1475 const int p = (datal.
p > datar.
p) ? datal.
p : datar.
p;
1489 const int npoints = intrule->
NPoints();
1494 for(ip=0;ip<npoints;ip++){
1495 intrule->
Point(ip,intpoint,weight);
1502 discgal->
SolutionDisc(data, datal, datar, variable, locval);
1503 for(iv = 0; iv < varsize; iv++) {
1504 #ifdef STATE_COMPLEX 1505 value[iv] += locval[iv].real()*weight;
1507 value[iv] += locval[iv]*weight;
1521 if(logger->isDebugEnabled())
1523 std::stringstream sout;
1524 sout <<
"thisgeoside = \n";
1525 thisgeoside.
Print(sout);
1526 sout <<
"neighgeoside = \n";
1527 neighgeoside.Print(sout);
1534 transf = neighgeoside.SideToSideTransform(highdim).
Multiply(LocalTransf);
1540 Transf.
Apply( qsi, NeighIntPoint );
1553 int i, n = FaceXPoint.NElements();
1555 PZError << __PRETTY_FUNCTION__ << std::endl
1556 <<
"Face X point and LeftElement X point have not same dimension." << std::endl;
1560 for(i = 0; i < n; i++){
1561 erro += (XPoint[i] - FaceXPoint[i])*(XPoint[i] - FaceXPoint[i]);
1565 PZError << __PRETTY_FUNCTION__ << std::endl
1566 <<
"Face X point and LeftElement X point are not same." << std::endl;
1577 const int neighdim = neighel->
Dimension();
1579 this->
MapQsi(Neighbor, qsi, NeighIntPoint);
1612 this->
Normal(qsi, normal);
1621 PZError <<
"FATAL ERROR AT " << __PRETTY_FUNCTION__ <<
"\n";
1687 data.
HSize = faceSize;
1703 if (!left || !right ) {
int64_t NElements() const
Number of computational elements allocated.
Defines the interface which material objects need to implement for discontinuous Galerkin formulation...
virtual void GetOrder(TPZVec< int > &ord) const =0
Gets the order of the integration rule for each dimension of the master element.
bool CheckConsistencyOfMappedQsi(TPZCompElSide &Neighbor, TPZVec< REAL > &qsi, TPZVec< REAL > &NeighIntPoint)
Check consistency of mapped qsi performed by method TPZInterfaceElement::MapQsi by comparing the X co...
int64_t ConnectIndex(int i) const override
Its return the connects of the left and right element associates.
virtual void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
void SolutionDisc(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, int var, TPZVec< STATE > &Solout)
Returns the solution associated with the var index based on the finite element approximation.
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
Contains the TPZInt1d, TPZIntTriang, TPZIntQuad, TPZIntCube3D, TPZIntTetra3D, TPZIntPyram3D and TPZIn...
virtual void BuildCornerConnectList(std::set< int64_t > &connectindexes) const =0
adds the connect indexes associated with base shape functions to the set
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.
void Normal(TPZFMatrix< REAL > &axes, TPZVec< REAL > &normal)
Returns normal based on already computed axes matrix.
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 declaration of TPZGeoElSide class which represents an element and its side, and TPZGeoElSideIndex class which represents an TPZGeoElSide index.
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...
virtual MElementType Type()
Return the type of the element.
int MaterialId() const
Returns the material index of the element.
bool fNeedsNeighborCenter
TPZManVector< REAL, 3 > fCenterNormal
Normal to the face element.
TPZCompElSide fRightElSide
Element the right of the normal a interface.
virtual int NConnectShapeF(int icon, int order) const =0
Returns the number of shapefunctions associated with a connect.
TPZStack< int64_t > fConnect
Vector of pointers to TPZConnect objects.
void GetConnects(TPZCompElSide &elside, TPZVec< TPZConnect *> &connects, TPZVec< int64_t > &connectindex)
Extract connects from element el.
TPZGeoElSide Reference() const
Reference to the geometric element.
TPZFNMatrix< 1000, STATE > fMat
Pointer to a blocked matrix object.
virtual int Dimension() const =0
Dimension of the element.
void SetAllRequirements(bool set)
Set all flags at once.
void ComputeSideTransform(TPZCompElSide &Neighbor, TPZTransform<> &transf)
Contains declaration of TPZInterpolationSpace class which implements the interface for interpolated c...
void SetLeftRightElements(TPZCompElSide &left, TPZCompElSide &right)
Set neighbors.
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
double sdot(TPZVec< T1 > &x, TPZVec< T1 > &y)
Performs a sdot operation: dot <- Transpose[x] * y.
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...
TPZCompEl * CloneInterface(TPZCompMesh &aggmesh, int64_t &index, TPZCompElSide &left, TPZCompElSide &right) const
Method used in TPZAgglomerateElement::CreateAgglomerateMesh.
virtual void Integrate(int variable, TPZVec< STATE > &value) override
Integrate a variable over the element.
virtual void CalcStiff(TPZElementMatrix &ek, TPZElementMatrix &ef) override
CalcStiff computes the element stiffness matrix and right hand side.
REAL val(STATE &number)
Returns value of the variable.
#define LOGPZ_WARN(A, B)
Define log for warnings.
TPZGeoElSide Neighbour() const
TPZGeoMesh * Mesh() const
Returns the mesh to which the element belongs.
virtual int NSides() const =0
Returns the number of connectivities of the element.
static int ExistInterfaces(TPZCompElSide &comp)
Verifies the existence of interfaces associates with the side of an element.
TPZBlock< STATE > fBlock
Block structure associated with fMat.
virtual void FillDataRequirementsInterface(TPZMaterialData &data) override
Fill material data parameter with necessary requirements for the ContributeInterface method...
TPZCompElSide fLeftElSide
Element the left of the normal a interface.
virtual void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
static TPZSavable * GetInstance(const int64_t &objId)
void Print(std::ostream &out=std::cout) const override
Prints attributes of the object.
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.
void VetorialProd(TPZVec< REAL > &ivet, TPZVec< REAL > &jvet, TPZVec< REAL > &kvet)
TPZFNMatrix< 9, REAL > jacobian
value of the jacobian at the integration point
TPZFNMatrix< 220, REAL > phi
vector of shapefunctions (format is dependent on the value of shapetype)
int p
maximum polinomial order of the shape functions
void SetElement(TPZCompEl *el)
Sets computational element pointer.
void SetSide(int side)
Sets the side index.
virtual void InitializeIntegrationRule() override
Pointer to the integration rule.
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.
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...
TPZInterfaceElement()
Empty constructor.
void NeighbourSolution(TPZCompElSide &Neighbor, TPZVec< REAL > &qsi, TPZSolVec &sol, TPZGradSolVec &dsol, TPZFMatrix< REAL > &NeighborAxes)
Compute solution at neighbour element in a given master coordinate qsi. It returns the axes at which ...
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...
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
virtual TPZMaterial * Material() const
Identify the material object associated with the element.
int NRightConnects() const
Returns the number from connectivities of the element related to right neighbour. ...
void HigherLevelElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected elements which have level higher to the current element.
~TPZInterfaceElement()
Destructor.
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 int ClassId() const override
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.
TPZManVector< REAL, 3 > XCenter
value of the coordinate at the center of the element
virtual std::string Name() override
Returns the name of the material.
void Read(TPZStream &buf, void *context) override
Read the element data from a stream.
virtual void ComputeErrorFace(int errorid, TPZVec< STATE > &errorL, TPZVec< STATE > &errorR)
ComputeError computes the element error estimator.
void Push(const T object)
Pushes a copy of the object on the stack.
int DecrementNumInterfaces()
Decrement number of TPZInterfaceElement pointing to this.
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)
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
virtual void CalcResidual(TPZElementMatrix &ef) override
CalcResidual only computes the element residual.
int Dimension() const override
Returns the dimension from the element interface.
int64_t Index() const
Returns the index of the element within the element vector of the mesh.
virtual void SetIntegrationRule(TPZIntPoints *intrule)
Method to set a dynamically allocated integration rule.
#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.
TPZCompElSide & LeftElementSide()
Returns left neighbor.
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
TPZCompMesh * Mesh() const
Return a pointer to the grid of the element.
virtual void ContributeInterface(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef)
It computes a contribution to stiffness matrix and load vector at one integration point...
int NumInterfaces()
Returns number of TPZInterfaceElement pointing to this.
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 ...
void IntegrateInterface(int variable, TPZVec< REAL > &value)
int NLeftConnects() const
Returns the number from connectivities of the element related to left neighbour.
virtual int64_t PutinSuperMesh(int64_t local, TPZCompMesh *super)
Put an local connection in the supermesh - Supermesh is one mesh who contains the analised submesh...
unsigned int NShape() const
void CenterNormal(TPZVec< REAL > &CenterNormal) const
Returns the normal of this interface which goes from left to right neighbors.
void DecreaseElConnected()
Informs the connects that this element is no longer connected to it.
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
void InitializeElementMatrix(TPZElementMatrix &ef)
const TPZBlock< STATE > & Block() const
Access the block structure of the solution vector.
TPZCompElSide & RightElementSide()
Returns right neighbor.
int Exists() const
Verifies if the object is non null (initialized)
Contains declaration of TPZCompelDisc class which implements a computational element for discontinuou...
TPZIntPoints * fIntegrationRule
Integration rule established by the user.
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 int HasForcingFunction()
Directive that gives true if the material has a forcing function.
int intGlobPtIndex
global point index
#define LOGPZ_ERROR(A, B)
Define log for errors (cout)
int SetNBlocks(const int num_of_blocks)
Sets number of blocks on diagonal matrix.
void ComputeRequiredData(TPZMaterialData &data, TPZInterpolationSpace *elem, TPZVec< REAL > &IntPoint)
Compute and fill data with requested attributes for neighbouring element.
virtual void ComputeSolution(TPZVec< REAL > &qsi, TPZMaterialData &data)
void ComputeCenterNormal(TPZVec< REAL > &normal)
Computes normal for linear geometric 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.
int intLocPtIndex
Index of the current integration point being evaluated.
unsigned char NState() const
Number of state variables associated with the connect.
virtual void ContributeInterfaceErrors(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZVec< STATE > &nkL, TPZVec< STATE > &nkR, int &errorid)
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
virtual void InterfaceJump(TPZVec< REAL > &x, TPZSolVec &leftu, TPZSolVec &rightu, TPZSolVec &jump)
Computes interface jump = leftu - rightu.
TPZGeoEl * Element() const
virtual void ComputeSolution(TPZVec< REAL > &qsi, TPZVec< REAL > &normal, TPZSolVec &leftsol, TPZGradSolVec &dleftsol, TPZFMatrix< REAL > &leftaxes, TPZSolVec &rightsol, TPZGradSolVec &drightsol, TPZFMatrix< REAL > &rightaxes) override
Computes solution and its derivatives in the local coordinate qsi.
Contains declaration of TPZSubCompMesh class which implements a group of computational elements as a ...
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.
TPZGeoEl * Reference() const
Return a pointer to the corresponding geometric element if such exists, return 0 otherwise.
void IncrementElConnected()
Informs the connects that this element is connected to it.
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.
virtual void X(TPZVec< REAL > &qsi, TPZVec< REAL > &result) const =0
Return the coordinate in real space of the point coordinate in the master element space...
TPZCompElSide Reference() const
Returns a pointer to the elementside referenced by the geometric elementside.
static int main(TPZCompMesh &cmesh)
void ComputeNormal(TPZVec< REAL > &qsi, TPZVec< REAL > &normal)
Computes normal at qsi point.
virtual int NConnects() const override
Returns the number from connectivities of the element.
This class implements a geometric mesh for the pz environment. Geometry.
virtual int GetMaxOrder() const
Returns the minimum order to integrate polinomials exactly for all implemented cubature rules...
void ResetReference()
Reset the element referenced by the geometric element to NULL.
void Reset(TPZCompMesh *mesh=NULL, MType type=Unknown)
Reset the data structure.
void Print(std::ostream &out) const
print geometric characteristics of the element/side
Implements computational mesh. Computational Mesh.
int Size(const int block_diagonal) const
Returns block dimension.
TPZAdmChunkVector< TPZCompEl * > & ElementVec()
Returns a reference to the element pointers vector.
virtual void Print(std::ostream &out=std::cout) const
Prints element data.
void RemoveConnectivities()
It removes the connectivities of the element.
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...
int NumLoadCases()
returns the number of load cases for this material object
virtual TPZCompMesh * CommonMesh(TPZCompMesh *mesh)
Gives the commom father mesh of the specified mesh and the current submesh.
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.
void Write(TPZStream &buf, int withclassid) const override
Save the element data to a stream.
virtual int MaxOrder()
Returns the max order of interpolation.
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.
Contains the TPZConservationLaw class which implements the interface for conservation laws...
int ComputeIntegrationOrder() const override
Returns the unique identifier for reading/writing objects to streams.
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 REAL ElementRadius()
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.
static int FreeInterface(TPZCompMesh &cmesh)
void EvaluateInterfaceJump(TPZSolVec &jump, int opt)
REAL ZeroTolerance()
Returns the tolerance to Zero value. Actually: .
Defines the interface of a computational element. Computational Element.
int IncrementNumInterfaces()
Increments number of TPZInterfaceElement pointing to this.
TPZSolVec sol
vector of the solutions at the integration point
void SetConnectIndex(int node, int64_t index) override
This function should not be called.
virtual void BuildCornerConnectList(std::set< int64_t > &connectindexes) const override
adds the connect indexes associated with base shape functions to the set
int64_t ElementIndex(TPZGeoEl *gel)
Returns the index of the given element into the fElementVec.
void InitMaterialData(TPZMaterialData &data, TPZInterpolationSpace *left)
Initialize a material data and its attributes based on element dimension, number of state variables a...
REAL detjac
determinant of the jacobian
static void WritePointer(const TPZSavable *obj, TPZStream *stream)
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 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.
virtual void Read(bool &val)
virtual int64_t GetFromSuperMesh(int64_t superind, TPZCompMesh *super)
Get an external connection from the supermesh - Supermesh is one mesh who contains the analised subme...
TPZAdmChunkVector< TPZGeoEl * > & ElementVec()
Methods for handling pzlists.
void MapQsi(TPZCompElSide &Neighbor, TPZVec< REAL > &qsi, TPZVec< REAL > &NeighIntPoint)
Maps qsi coordinate at this master element to qsi coordinate at neighbor master element.