NeoPZ
pzgradientflux.h
Go to the documentation of this file.
1 
6 #ifndef TPZGRADIENTFLUX_H
7 #define TPZGRADIENTFLUX_H
8 
9 #include "pzreal.h" // for STATE, REAL
10 #include "pzvec.h" // for TPZVec
11 class TPZMaterialData;
12 
18 
19 public:
26 
28  void ComputeFlux(TPZVec<STATE> &solL, TPZVec<STATE> &solR, const TPZVec<REAL> &normal, TPZVec<STATE> & F);
29 
31  void ApplyLimiter(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright);
32 
33 private:
34 
35  void ApplyVanAlbadaLimiter(STATE &soll, STATE &solr,
36  const TPZVec<STATE>& gradL, const TPZVec<STATE> &gradR,
37  const TPZVec<STATE> &normal,
38  const TPZVec<STATE> &dL, const TPZVec<STATE> & dR);
39 
41  void ApplyMinModLimiter(STATE &soll, STATE &solr,
42  const TPZVec<STATE>& gradL, const TPZVec<STATE> &gradR,
43  const TPZVec<STATE> &normal,
44  const TPZVec<STATE> &dL, const TPZVec<STATE> & dR);
45 
47  STATE Dot(const TPZVec<STATE> &A, const TPZVec<STATE> &B) {
48  double result = 0.;
49  int n = A.NElements();
50  for(int i = 0; i < n; i++) result += A[i]*B[i];
51  return result;
52  }
53 
54 };
55 
56 #endif
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)
Templated vector implementation.
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)
~TPZGradientFlux()
Destructor.
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.
int64_t NElements() const
Returns the number of elements of the vector.
Definition: pzvec.h:190
Contains the declaration of TPZFlopCounter class and TPZCounter struct.
TPZGradientFlux()
Default constructor.
DESCRIBE PLEASE.