8 #ifndef STATE_COMPLEX //AQUIFRAN 23 static LoggerPtr logger(Logger::getLogger(
"pz.pzgradientreconstruction"));
31 if ((param != 1. && param !=2.) && distmesh) {
35 fDistortedMesh = distmesh;
70 GetDataDistortedMesh(useweight, paramK);
78 std::map<int, TPZMaterial * >::const_iterator mit;
90 rhs.
Redim(neq,numloadcases);
96 for(
int i=0; i<nelem; i++)
99 if(!cel || cel->
Dimension()!=dim)
continue;
104 fGradData->SetCel(cel, useweight, paramK);
107 std::stringstream sout;
108 fGradData->
Print(sout);
116 STATE cellAverage, slopeLimiter;
117 fGradData->GetData(centerPoint, gradient, cellAverage, slopeLimiter);
118 pGrad->
SetData(centerPoint,gradient,cellAverage,slopeLimiter);
122 ChangeMaterialIdIntoCompElement(cel, matid, matidl2proj);
135 AssembleGlobalMatrix(cel, ek, ef, *stiffmatrix, rhs);
141 ChangeMaterialIdIntoCompElement(cel, matidl2proj, matid);
149 step.
Solve(rhs, result);
191 if(LxLyLz.
size()==0 || MatIdBC.
size()==0) {
192 PZError <<
"TPZGradientReconstruction: uninitialized data.\n";
196 if(coordmin.size()!=coordmax.size() || coordmin.size()!=MatIdBC.
size()){
197 PZError <<
"TPZGradientReconstruction: Amount of coordinates may not be different from the number of indexes boundary condition.\n";
201 fGradData->UseGhostsNeighbors(LxLyLz, MatIdBC, coordmin, coordmax);
208 fSolCellAndNeighbors.resize(0);
209 fCenterPointCellAndNeighbors.resize(0);
210 fCelAndNeighbors.resize(0);
211 fCenterPointInterface.resize(0);
213 this->fForcingFunctionExact = NULL;
214 this->fUseForcinfFuncion =
false;
215 fGhostNeighbor =
false;
217 fWeightsGrad.resize(0);
226 fcoordminBC.Resize(0);
227 fcoordmaxBC.Resize(0);
291 std::cout <<
"\nError: Element does not exist or has dimension different to the geometric mesh\n";
295 fSolCellAndNeighbors.resize(0);
296 fCenterPointCellAndNeighbors.resize(0);
297 fCelAndNeighbors.resize(0);
298 fCenterPointInterface.resize(0);
301 fUseWeight = useweight;
304 InitializeGradData(cel);
306 if(fGhostNeighbor==
true) CreateGhostsNeighbors(cel);
310 ComputeSlopeLimiter3();
313 #pragma GCC diagnostic push 314 #pragma GCC diagnostic ignored "-Wformat" 317 #pragma clang diagnostic push 318 #pragma clang diagnostic ignored "-Wformat" 324 const char *name1 =
"Cell average";
325 const char *name2 =
"Center Point";
326 const char *name3 =
"Gradient";
327 const char *name4 =
"Slope limiter";
329 const char *name5 =
"Cel";
330 const char *name6 =
"Neigh";
331 const char *name7 =
"Center Point Interface";
336 sprintf(
string,
"\t%s", name1);
338 sprintf(
string,
"\t%s", name2);
340 sprintf(
string,
"\t\t%s", name3);
342 sprintf(
string,
"\t\t%s", name4);
346 sprintf(
string,
"%s", name5);
350 out << fSolCellAndNeighbors[0];
355 sprintf(
string,
"%f", fCenterPointCellAndNeighbors[0][j]);
368 out <<
"\t" << fSlopeLimiter <<
"\n";
371 for (i=1; i<fSolCellAndNeighbors.size(); i++)
375 out <<
"\t" << fSolCellAndNeighbors[i];
379 out << fCenterPointCellAndNeighbors[i][j];
385 out <<
"\n\n" << name7 <<
"\n";
386 for (i=0; i<fCenterPointInterface.size(); i++)
390 sprintf(
string,
"%f", fCenterPointInterface[i][j]);
400 #pragma GCC diagnostic pop 403 #pragma clang diagnostic pop 413 gel->
X(centerpsi,xcenter);
422 int it, npoints = pointIntRule->
NPoints();
429 for(it=0;it<npoints;it++)
431 pointIntRule->
Point(it,point,weight);
436 if (this->HasForcingFunctionExact()){
438 this->fForcingFunctionExact->Execute(xpoint, sol);
444 PZError <<
"TPZGradientReconstruction::TPZDataGradient: The number of solutions variable can not be other than 1.\n";
448 integral += weight*sol[0].real();
450 integral += weight*sol[0];
460 std::cout <<
"\nError: Element does not exist\n";
464 fCelAndNeighbors.Push(cel);
470 GetCenterPointAndCellAveraged(cel,xcenter,cellaveraged);
471 fCenterPointCellAndNeighbors.Push(xcenter);
472 fSolCellAndNeighbors.Push(cellaveraged);
485 std::set<TPZCompEl *> interfaces;
496 neighequal.
Push(neighbigger);
502 int nneighsmaller = neighsmaller.
size();
503 if(nneighs && nneighsmaller)
511 for(
int i =0; i<nneighs; i++)
514 if(!InterpEl)
continue;
517 if(neighequal[i].Side() <neighequal[i].Reference().Element()->NCornerNodes())
continue;
520 if(neighequal[i].Element()->Dimension() == fdim-1)
524 gelside.
X(point,xpoint);
525 fCenterPointInterface.Push(xpoint);
529 oldneighs = interfaces.size();
530 interfaces.insert(neighequal[i].Element());
531 newneighs = interfaces.size();
533 if(newneighs > oldneighs)
535 fCelAndNeighbors.Push(neighequal[i].Element());
537 GetCenterPointAndCellAveraged(neighequal[i].Element(),xcenter,cellaveraged);
538 fCenterPointCellAndNeighbors.Push(xcenter);
539 fSolCellAndNeighbors.Push(cellaveraged);
543 gelside.
X(point,xpoint);
544 fCenterPointInterface.Push(xpoint);
551 if(nneighsmaller != 0)
554 for(
int i =0; i<nneighsmaller; i++)
558 if(!InterpEl)
continue;
561 if(neighsmaller[i].Side() <neighsmaller[i].Reference().Element()->NCornerNodes())
continue;
564 if(neighequal[i].Element()->Dimension() == fdim-1)
568 gelside.
X(point,xpoint);
569 fCenterPointInterface.Push(xpoint);
573 oldneighs = interfaces.size();
574 interfaces.insert(neighsmaller[i].Element());
575 newneighs = interfaces.size();
577 if(newneighs > oldneighs)
579 fCelAndNeighbors.Push(neighsmaller[i].Element());
581 GetCenterPointAndCellAveraged(neighsmaller[i].Element(),xcenter,cellaveraged);
582 fCenterPointCellAndNeighbors.Push(xcenter);
583 fSolCellAndNeighbors.Push(cellaveraged);
587 gelside.
X(point,xpoint);
588 fCenterPointInterface.Push(xpoint);
595 for(
int side = 0; side < ncorn; side++)
600 gelside.
X(point,xpoint);
601 fCenterPointInterface.Push(xpoint);
615 #include <Accelerate/Accelerate.h> 623 if (fCenterPointInterface.size()<1 || fSolCellAndNeighbors.size()<1)
629 fGradient.Resize(3, 0.);
636 int nneighs = fCenterPointCellAndNeighbors.size()-1;
638 DeltaXcenter.
Redim(nneighs,fdim);
639 DeltaXcenterTranspose.
Redim(fdim,nneighs);
640 DifSol.
Redim(nneighs,1);
642 for(i = 0; i < nneighs; i++)
644 for(j=0; j<fdim; j++)
646 DeltaXcenter(i,j) = fCenterPointCellAndNeighbors[i+1][j] - fCenterPointCellAndNeighbors[0][j];
648 DifSol(i,0) = fSolCellAndNeighbors[i+1] - fSolCellAndNeighbors[0];
654 ComputeWeights(fparamK);
655 InsertWeights(DeltaXcenter, DifSol);
664 grad(0,0) = DifSol(0,0)/DeltaXcenter(0,0);
673 else if(nneighs==fdim)
684 QRFactorization(DeltaXcenter,DifSol);
693 DeltaXcenter.
Transpose(&DeltaXcenterTranspose);
694 A = DeltaXcenterTranspose*DeltaXcenter;
695 grad = DeltaXcenterTranspose*DifSol;
700 for (i = 0; i<grad.
Rows(); i++)
702 fGradient[i] = grad(i,0);
721 double *tau =
new double[n];
723 double *work =
new double[n];
726 double *A =
new double[m*n];
727 for(
int j = 0; j<n; j++){
728 for(
int i=0; i<
m; i++){
729 A[i+m*j] = matA(i,j);
733 dgeqrf_(&m, &n, A, &lda,tau,work,&lwork,&info);
737 for(
int j = 0; j<n; j++)
739 for(
int i=0; i<n; i++)
741 if(i<=j) matA(i,j)=A[i+m*j];
748 double *Q =
new double[m*n];
751 dorgqr_(&m, &n, &kk, Q, &lda,tau,work,&lwork,&info);
755 for(
int j = 0; j<n; j++){
756 for(
int i=0; i<
m; i++){
757 matQ(i,j) = Q[i+m*j];
803 if(fGradient.size()==0 || fSolCellAndNeighbors.size()==0 || fCenterPointInterface.size()==0){
804 PZError <<
"TPZGradientReconstruction::TPZDataGradient: gradient has size equal zero.\n";
808 int nneigh = fSolCellAndNeighbors.size()-1;
813 STATE solKmax, solKmin;
814 solKmin = fSolCellAndNeighbors[1];
815 solKmax = fSolCellAndNeighbors[1];
817 for(i = 2; i<= nneigh; i++)
819 if(solKmin > fSolCellAndNeighbors[i])
821 solKmin = fSolCellAndNeighbors[i];
825 if(solKmax < fSolCellAndNeighbors[i])
827 solKmax = fSolCellAndNeighbors[i];
834 int ninterf = fCenterPointInterface.size();
838 STATE solcel = fSolCellAndNeighbors[0];
840 for (i = 0; i<ninterf; i++)
843 for(j=0; j<fdim; j++)
845 solKside += (STATE)(fCenterPointInterface[i][j] - fCenterPointCellAndNeighbors[0][j])*fGradient[j];
849 if(
IsZero(solKside - solKmax) ||
IsZero(solKside - solKmin)) {
852 else if((solKside - solKmax) > 1.e-12)
854 temp = (solKmax - solcel)/(solKside-solcel);
855 if(temp<0.) temp =
fabs(temp);
856 if(temp>1.) temp = 1.;
858 else if((solKside - solKmin) < 1.e-12)
860 temp = (solKmin - solcel)/(solKside-solcel);
861 if(temp<0.) temp =
fabs(temp);
862 if(temp>1.) temp = 1.;
871 STATE alphaK = alphavec[0];
872 for (int64_t j=1; j<alphavec.
size(); j++)
874 if(alphaK > alphavec[j])
876 alphaK = alphavec[j];
879 fSlopeLimiter = alphaK;
881 if(alphaK<0. || alphaK>1.) {
889 if(fGradient.size()==0 || fSolCellAndNeighbors.size()==0 || fCenterPointInterface.size()==0){
890 PZError <<
"TPZGradientReconstruction::TPZDataGradient: gradient has size equal zero.\n";
894 int nneigh = fSolCellAndNeighbors.size()-1;
899 STATE solKmax, solKmin;
900 solKmin = fSolCellAndNeighbors[0];
901 solKmax = fSolCellAndNeighbors[0];
903 for(i = 1; i<= nneigh; i++)
905 if(solKmin > fSolCellAndNeighbors[i])
907 solKmin = fSolCellAndNeighbors[i];
911 if(solKmax < fSolCellAndNeighbors[i])
913 solKmax = fSolCellAndNeighbors[i];
920 int ninterf = fCenterPointInterface.size();
924 STATE solcel = fSolCellAndNeighbors[0];
926 for (i = 0; i<ninterf; i++)
929 for(j=0; j<fdim; j++)
931 solKside += (STATE)(fCenterPointInterface[i][j] - fCenterPointCellAndNeighbors[0][j])*fGradient[j];
935 if(
IsZero(solKside - solcel)) {
938 else if((solKside - solcel) > 1.e-12)
940 temp = (solKmax - solcel)/(solKside-solcel);
941 if(temp>1.) temp = 1.;
943 else if(solKside - solcel < 1.e-12)
945 temp = (solKmin-solcel)/(solKside-solcel);
946 if(temp<0.) temp =
fabs(temp);
947 if(temp>1.) temp = 1.;
956 STATE alphaK = alphavec[0];
957 for (int64_t j=1; j<alphavec.
size(); j++)
959 if(alphaK > alphavec[j])
961 alphaK = alphavec[j];
964 fSlopeLimiter = alphaK;
966 if(alphaK<0. || alphaK>1.) {
975 if(fGradient.size()==0 || fSolCellAndNeighbors.size()==0 || fCenterPointInterface.size()==0){
976 PZError <<
"TPZGradientReconstruction::TPZDataGradient: gradient has size equal zero.\n";
980 int nneigh = fSolCellAndNeighbors.size()-1;
985 STATE solKmax, solKmin;
986 solKmin = fSolCellAndNeighbors[0];
987 solKmax = fSolCellAndNeighbors[0];
989 for(i = 1; i<= nneigh; i++)
991 if(solKmin > fSolCellAndNeighbors[i])
993 solKmin = fSolCellAndNeighbors[i];
997 if(solKmax < fSolCellAndNeighbors[i])
999 solKmax = fSolCellAndNeighbors[i];
1006 int ninterf = fCenterPointInterface.size();
1010 STATE solcel = fSolCellAndNeighbors[0];
1012 for (i = 0; i<ninterf; i++)
1015 for(j=0; j<fdim; j++)
1017 solKside += (STATE)(fCenterPointInterface[i][j] - fCenterPointCellAndNeighbors[0][j])*fGradient[j];
1021 if(
IsZero(solKside - solcel)) {
1024 else if((solKside - solcel) > 1.e-12)
1026 temp = (solKmax - solcel)/(solKside-solcel);
1027 temp = (temp*temp + 2.*temp)/(temp*temp + temp + 2.);
1030 else if(solKside - solcel < 1.e-12)
1032 temp = (solKmin-solcel)/(solKside-solcel);
1033 temp = (temp*temp + 2.*temp)/(temp*temp + temp + 2.);
1038 alphavec.
Push(temp);
1042 STATE alphaK = alphavec[0];
1043 for (int64_t j=1; j<alphavec.
size(); j++)
1045 if(alphaK > alphavec[j])
1047 alphaK = alphavec[j];
1050 fSlopeLimiter = alphaK;
1061 NodeCloserCenterX(nodecelX);
1063 int64_t nneighs = fCelAndNeighbors.size()-1;
1068 for(
int in = 0; in < nneighs; in++)
1073 for(
int k=0; k<fdim; k++) centerneigh[k]=fCenterPointCellAndNeighbors[in+1][k];
1075 dist[in]=gel->
Distance(centerneigh, nodecelX);
1077 sum += 1./
pow((REAL)dist[in],paramk);
1080 fWeightsGrad.Resize(dist.
size(), 0.);
1083 for (
int id = 0;
id<dist.
size();
id++)
1085 temp = 1./
pow((REAL)dist[
id],paramk);
1086 fWeightsGrad[id] = temp/sum;
1087 if(fWeightsGrad[
id]<0 || fWeightsGrad[
id]>1)
DebugStop();
1100 for(
int k=0; k<fdim; k++) centercelX[k]=fCenterPointCellAndNeighbors[0][k];
1106 for (
int in = 0; in<nnodes; in++)
1111 dist[in]=gel->
Distance(centercelX, coordX);
1115 for(
int j=1; j<dist.
size(); j++){
1117 if(dist[
id] > dist[j]){
1131 int64_t ncH = DeltaH.
Cols();
1132 int64_t ncD = DifSol.
Cols();
1133 for (int64_t i = 0; i<fWeightsGrad.size(); i++) {
1135 for (int64_t j = 0; j<ncH; j++){
1136 DeltaH(i,j) = fWeightsGrad[i]*DeltaH(i,j);
1139 for (int64_t k = 0; k<ncD; k++){
1140 DifSol(i,k) = fWeightsGrad[i]*DifSol(i,k);
1147 int nbc = fMatIdBC.size();
1157 for(is = ncorn; is < nside; is++)
1164 for(in =0; in<nneighs; in++)
1167 if(!InterpEl)
continue;
1170 if(neighequal[in].Side() <neighequal[in].Reference().Element()->NCornerNodes())
continue;
1172 if(neighequal[in].Element()->Dimension() == fdim)
continue;
1175 if(neighequal[in].Element()->Dimension() == fdim-1){
1177 TPZCompEl *bccel = neighequal[in].Element();
1181 for(i=0; i<nbc; i++){
1183 if(mymat->
Id() == fMatIdBC[i])
1186 if(bcmat->
Type() != 1){
1187 PZError <<
"TPZGradientReconstruction::TPZDataGradient: boundary conditions is not of the type Neumann.\n";
1192 while (fcoordminBC[i][j] != fcoordmaxBC[i][j]){
1196 fCelAndNeighbors.Push(cel);
1197 fSolCellAndNeighbors.Push(fSolCellAndNeighbors[0]);
1198 xcent = fCenterPointCellAndNeighbors[0];
1200 if(xcent[j]>fLxLyLz[j]/2.){
1201 xcent[j] = fLxLyLz[j] + (fLxLyLz[j]- xcent[j]);
1202 }
else xcent[j] = fcoordminBC[i][j]- xcent[j];
1204 fCenterPointCellAndNeighbors.Push(xcent);
int64_t NElements() const
Number of computational elements allocated.
TPZGeoMesh * Reference() const
Returns a pointer to the geometrical mesh associated.
void ProjectionL2GradientReconstructed(TPZCompMesh *cmesh, int matidl2proj)
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
TPZCompMesh * Reference() const
Returns the currently loaded computational grid.
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.
TPZStack< TPZManVector< REAL, 3 > > fCenterPointCellAndNeighbors
bool IsZero(long double a)
Returns if the value a is close Zero as the allowable tolerance.
Contains definitions to LOGPZ_DEBUG, LOGPZ_INFO, LOGPZ_WARN, LOGPZ_ERROR and LOGPZ_FATAL, and the implementation of the inline InitializePZLOG(string) function using log4cxx library or not. It must to be called out of "#ifdef LOG4CXX" scope.
Contains the TPZGradient class which implements the methods to reconstruction gradient.
virtual int Decompose_LU(std::list< int64_t > &singular) override
LU Decomposition. Stores L and U matrices at the storage of the same matrix.
void GetCenterPointAndCellAveraged(TPZCompEl *cel, TPZManVector< REAL, 3 > &xcenter, STATE &solcel)
Contains declaration of TPZGeoNode class which defines a geometrical node.
void CreateGhostsNeighbors(TPZCompEl *cel)
Method to create ghosts neighbors of the element cel. This method is used only for regular domain...
int64_t NEquations()
This computes the number of equations associated with non-restrained nodes.
void AddFel(TPZFMatrix< TVar > &rhs, TPZVec< int64_t > &destination)
Performs a right hand side assemblage.
void ComputeSlopeLimiter2()
TPZGeoElSide Reference() const
Reference to the geometric element.
TPZFNMatrix< 1000, STATE > fMat
Pointer to a blocked matrix object.
static REAL Distance(TPZVec< REAL > ¢el, TPZVec< REAL > ¢face)
void NodeCloserCenterX(TPZManVector< REAL, 3 > &nodecelX)
Method to choose the node of the cell closer of your center point.
TPZAutoPointer< TPZFunction< STATE > > fForcingFunctionExact
Pointer to exact solution function, needed to calculate exact error.
Defines step solvers class. Solver.
TPZManVector< REAL, 3 > fWeightsGrad
virtual int Dimension() const =0
Dimension of the element.
virtual int NCornerNodes() const =0
Returns the number of corner nodes of the element.
virtual void CalcStiff(TPZElementMatrix &ek, TPZElementMatrix &ef)
Computes the element stifness matrix and right hand side.
TPZGradientReconstruction & operator=(const TPZGradientReconstruction ©)
void ComputeSlopeLimiter()
Methods to calculate the slope limiter (alphaK)
void QRFactorization(TPZFMatrix< REAL > &matA, TPZFMatrix< REAL > &vecb)
Contains the declaration of the TPZMultiphysicsElement class. This class is abstract.
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
void ChangeMaterialIdIntoCompElement(TPZCompEl *cel, int oldmatid, int newmatid)
TPZGradientData * fGradData
virtual int NSides() const =0
Returns the number of connectivities of the element.
void CenterPoint(TPZVec< REAL > ¢er) const
return the coordinates of the center in master element space (associated with the side) ...
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
TPZManVector< int64_t > fDestinationIndex
void ComputeDestinationIndices()
void InitializeGradData(TPZCompEl *cel)
Abstract class defining integration rules. Numerical Integration.
Implements SkyLine Structural Matrices. Structural Matrix.
This abstract class defines the behaviour which each derived class needs to implement.
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...
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.
void HigherLevelElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected elements which have level higher to the current element.
TPZGradientData & operator=(const TPZGradientData ©)
void Print(std::ostream &out)
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...
void LoadSolution(const TPZFMatrix< STATE > &sol)
Given the solution of the global system of equations, computes and stores the solution for the restri...
virtual TPZMatrix< STATE > * Create()
void Push(const T object)
Pushes a copy of the object on the stack.
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...
void ComputeWeights(REAL paramk)
Method to calculate the weights that we will use in distorted meshes.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
#define DebugStop()
Returns a message to user put a breakpoint in.
TPZManVector< TPZVec< REAL > > fcoordmaxBC
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
void X(TPZVec< REAL > &loc, TPZVec< REAL > &result) const
X coordinate of a point loc of the side.
This class defines the boundary condition for TPZMaterial objects.
TPZCompMesh * Mesh() const
Return a pointer to the grid of the element.
Contains the TPZSkylineStructMatrix class which implements SkyLine Structural Matrices.
int Dimension() const
Returns the dimension of the simulation.
void SetData(TPZManVector< REAL, 3 > ¢er, TPZManVector< STATE, 3 > &grad, STATE u0, STATE alphak)
virtual void SetMatrix(TPZAutoPointer< TPZMatrix< TVar > > Refmat)
Sets a matrix to the current object.
TPZCompEl * Reference() const
Return a pointer to the element referenced by the geometric element.
void InsertWeights(TPZFMatrix< REAL > &DeltaH, TPZFMatrix< REAL > &DifSol)
Method to insert the weights in the matrices of the system by least squares.
int64_t Rows() const
Returns number of rows.
virtual void AddKel(TPZFMatrix< TVar > &elmat, TPZVec< int64_t > &destinationindex)
Add a contribution of a stiffness matrix.
void Print(std::ostream &out) const
static int GetgOrder()
Set the default value of the interpolation order.
static int Substitution(const TVar *ptr, int64_t rows, TPZFMatrix< TVar > *B)
TPZManVector< int64_t > fSourceIndex
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.
void Solve(const TPZFMatrix< TVar > &F, TPZFMatrix< TVar > &result, TPZFMatrix< TVar > *residual=0) override
Solves the system of linear equations.
std::map< int,TPZMaterial *> & MaterialVec()
Returns a reference to the material pointers vector.
This class associates an element matrix with the coeficients of its contribution in the global stiffn...
TPZFNMatrix< 1000, STATE > fConstrMat
Pointer to the constrained matrix object.
Implements the interfaces for TPZCompElDisc, TPZInterfaceElement and TPZInterpolatedElement. Computational element.
void ApplyConstraints()
Apply the constraints applied to the nodes by transforming the tangent matrix and right hand side...
TPZFlopCounter pow(const TPZFlopCounter &orig, const TPZFlopCounter &xp)
Returns the power and increments the counter of the power.
TPZManVector< TPZVec< REAL > > fcoordminBC
REAL dist(TPZVec< T1 > &vec1, TPZVec< T1 > &vec2)
TPZGeoEl * Reference() const
Return a pointer to the corresponding geometric element if such exists, return 0 otherwise.
Implements a geometric node in the pz environment. Geometry.
virtual void X(TPZVec< REAL > &qsi, TPZVec< REAL > &result) const =0
Return the coordinate in real space of the point coordinate in the master element space...
virtual REAL RefElVolume()=0
Volume of the master element.
void SetForcingFunction(TPZAutoPointer< TPZFunction< STATE > > fp)
Sets a procedure as source function for the material.
Implements computational mesh. Computational Mesh.
~TPZGradientReconstruction()
virtual void Multiply(const TPZFMatrix< TVar > &A, TPZFMatrix< TVar > &res, int opt=0) const
It mutiplies itself by TPZMatrix<TVar>A putting the result in res.
TPZAdmChunkVector< TPZCompEl * > & ElementVec()
Returns a reference to the element pointers vector.
void SetCel(TPZCompEl *cel, bool useweight, REAL paramK)
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
void SetMaterialId(int id)
Sets the material index of the 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 TPZStepSolver class which defines step solvers class.
int64_t Cols() const
Returns number of cols.
void SetDataGhostsNeighbors(TPZVec< REAL > LxLyLz, TPZVec< int > MatIdBC, TPZManVector< TPZVec< REAL > > coordmin, TPZManVector< TPZVec< REAL > > coordmax)
Contains the TPZIntPoints class which defines integration rules.
TPZStack< STATE > fSolCellAndNeighbors
TPZStack< TPZManVector< REAL, 3 > > fCenterPointInterface
int64_t NElements() const
Returns the number of elements of the vector.
void AssembleGlobalMatrix(TPZCompEl *el, TPZElementMatrix &ek, TPZElementMatrix &ef, TPZMatrix< STATE > &stiffmatrix, TPZFMatrix< STATE > &rhs)
void SetDirect(const DecomposeType decomp)
TPZManVector< STATE, 3 > fGradient
clarg::argString m("-m", "input matrix file name (text format)", "matrix.txt")
void GetCoordinates(TPZVec< REAL > &co)
Fill the coordinates of the node.
Defines the interface of a computational element. Computational Element.
TPZGradientReconstruction(bool distmesh, REAL paramK)
virtual int HasDependency()
Returns 1 if the element has at least one dependent node. Returns 0 otherwise.
void Transpose(TPZMatrix< TVar > *const T) const override
It makes *T the transpose of current matrix.
void ComputeSlopeLimiter3()
TPZStack< TPZCompEl * > fCelAndNeighbors
Implements computational element based on an interpolation space. Computational Element.
virtual int SolveDirect(TPZFMatrix< TVar > &F, const DecomposeType dt, std::list< int64_t > &singular)
Solves the linear system using Direct methods.
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.
This class implements a reference counter mechanism to administer a dynamically allocated object...