26 for(
int i = 0; i < nstate; i++){
27 for(
int id = 0;
id < dim;
id++){
28 F[i*dim+id] = 0.5*(solL[i]+solR[i])*normal[
id];
34 int numbersol = dataleft.
sol.
size();
42 for(
int id = 0;
id < dim;
id++){
43 dL[id] = data.
x[id] - dataleft.
XCenter[id];
44 dR[id] = data.
x[id] - dataright.
XCenter[id];
48 for(
int is = 0; is < nstate; is++){
49 for(
int id = 0;
id < dim;
id++){
50 gradL[id] = dataleft.
sol[0][ nstate + is*dim +id ];
51 gradR[id] = dataright.
sol[0][ nstate + is*dim +id ];
54 for (
int i=0; i<3; i++) {
55 stnormal[i] = data.
normal[i];
66 const STATE sL = this->
Dot(gradL,normal);
67 const STATE sR = this->
Dot(gradR,normal);
73 soll = soll + k*this->
Dot(gradL,dL);
74 solr = solr + k*this->
Dot(gradL,dR);
78 soll = soll + k*this->
Dot(gradR,dL);
79 solr = solr + k*this->
Dot(gradR,dR);
83 soll = soll + k*this->
Dot(gradL,dL);
84 solr = solr + k*this->
Dot(gradR,dR);
91 const double sL = this->
Dot(gradL,normal);
92 const double sR = this->
Dot(gradR,normal);
96 const double r = sR/sL;
97 double phi = (r <= 0.) ? 0. : ((r*r+r)/(1.+r*r));
99 soll = soll + phi*this->
Dot(gradL,dL);
100 solr = solr + phi*this->
Dot(gradR,dR);
void ApplyVanAlbadaLimiter(STATE &soll, STATE &solr, const TPZVec< STATE > &gradL, const TPZVec< STATE > &gradR, const TPZVec< STATE > &normal, const TPZVec< STATE > &dL, const TPZVec< STATE > &dR)
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
TPZManVector< REAL, 3 > normal
normal to the element at the integration point
Contains the TPZGradientFlux class.
TPZManVector< REAL, 3 > x
value of the coordinate at the integration point
Implements a vector class which allows to use external storage provided by the user. Utility.
void ApplyLimiter(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright)
Apply limiter.
void ComputeFlux(TPZVec< STATE > &solL, TPZVec< STATE > &solR, const TPZVec< REAL > &normal, TPZVec< STATE > &F)
Computes numerical flux.
STATE Dot(const TPZVec< STATE > &A, const TPZVec< STATE > &B)
Computes the dot product (scalar)
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...
TPZManVector< REAL, 3 > XCenter
value of the coordinate at the center of the element
~TPZGradientFlux()
Destructor.
#define DebugStop()
Returns a message to user put a breakpoint in.
void ApplyMinModLimiter(STATE &soll, STATE &solr, const TPZVec< STATE > &gradL, const TPZVec< STATE > &gradR, const TPZVec< STATE > &normal, const TPZVec< STATE > &dL, const TPZVec< STATE > &dR)
It corrects and values.
Contains the TPZMaterialData class which implements an interface between TPZCompEl::CalcStiff and TPZ...
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.
TPZGradientFlux()
Default constructor.
TPZSolVec sol
vector of the solutions at the integration point