#include <ERF_Interpolation_WENO_Z.H>
|
| WENO_MZQ3 (const amrex::Array4< const amrex::Real > &phi) |
|
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void | InterpolateInX (const int &i, const int &j, const int &k, const int &qty_index, amrex::Real &val_lo, amrex::Real upw_lo, const amrex::Real) const |
|
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void | InterpolateInY (const int &i, const int &j, const int &k, const int &qty_index, amrex::Real &val_lo, amrex::Real upw_lo, const amrex::Real) const |
|
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void | InterpolateInZ (const int &i, const int &j, const int &k, const int &qty_index, amrex::Real &val_lo, amrex::Real upw_lo, const amrex::Real) const |
|
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real | Evaluate (const amrex::Real &sm1, const amrex::Real &s, const amrex::Real &sp1) const |
|
|
amrex::Array4< const amrex::Real > | m_phi |
|
const amrex::Real | eps =1.0e-6 |
|
const amrex::Real | tol =1.0e-12 |
|
|
static constexpr amrex::Real | g1 =(1.0/3.0) |
|
static constexpr amrex::Real | g2 =(1.0/3.0) |
|
static constexpr amrex::Real | g3 =(1.0/3.0) |
|
Interpolation operators used for WENO_MZQ3 scheme
◆ WENO_MZQ3()
WENO_MZQ3::WENO_MZQ3 |
( |
const amrex::Array4< const amrex::Real > & |
phi | ) |
|
|
inline |
amrex::Array4< const amrex::Real > m_phi
Definition: ERF_Interpolation_WENO_Z.H:245
◆ Evaluate()
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real WENO_MZQ3::Evaluate |
( |
const amrex::Real & |
sm1, |
|
|
const amrex::Real & |
s, |
|
|
const amrex::Real & |
sp1 |
|
) |
| const |
|
inline |
221 amrex::Real b1 = (s - sm1) * (s - sm1);
222 amrex::Real b2 = (sp1 - s) * (sp1 - s);
223 amrex::Real b3 = ( (13.0 / 12.0) * ((sm1 - 2.0*s + sp1)*(sm1 - 2.0*s + sp1)) ) + ( ((sp1 - sm1)*(sp1 - sm1)) / 4.0 );
226 amrex::Real t5 = ( std::abs(b3 - b1) + std::abs(b3 - b2) ) / 32.0;
227 amrex::Real a1 =
g1 * ( 1.0 + (t5*t5) / ((
eps + b1) * (
eps + b1)) );
228 amrex::Real a2 =
g2 * ( 1.0 + (t5*t5) / ((
eps + b2) * (
eps + b2)) );
229 amrex::Real a3 =
g3 * ( 1.0 + (t5*t5) / ((
eps + b3) * (
eps + b3)) );
230 amrex::Real asum = a1 + a2 + a3;
231 amrex::Real w1 = a1 / asum;
232 amrex::Real w2 = a2 / asum;
233 amrex::Real w3 = a3 / asum;
236 amrex::Real v1 = (-sm1 + 3.0 * s) / 2.0;
237 amrex::Real v2 = ( s + sp1) / 2.0;
238 amrex::Real v3 = (-sm1 + 5.0 * s + 2.0 * sp1) / 6.0;
241 return ( (w3 /
g3) * (v3 -
g1 * v1 -
g2 * v2) + w1 * v1 + w2 * v2 );
static constexpr amrex::Real g2
Definition: ERF_Interpolation_WENO_Z.H:249
static constexpr amrex::Real g3
Definition: ERF_Interpolation_WENO_Z.H:250
const amrex::Real eps
Definition: ERF_Interpolation_WENO_Z.H:246
static constexpr amrex::Real g1
Definition: ERF_Interpolation_WENO_Z.H:248
Referenced by InterpolateInX(), InterpolateInY(), and InterpolateInZ().
◆ InterpolateInX()
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void WENO_MZQ3::InterpolateInX |
( |
const int & |
i, |
|
|
const int & |
j, |
|
|
const int & |
k, |
|
|
const int & |
qty_index, |
|
|
amrex::Real & |
val_lo, |
|
|
amrex::Real |
upw_lo, |
|
|
const amrex::Real |
|
|
) |
| const |
|
inline |
147 amrex::Real sp1 =
m_phi(i+1, j , k , qty_index);
148 amrex::Real s =
m_phi(i , j , k , qty_index);
149 amrex::Real sm1 =
m_phi(i-1, j , k , qty_index);
150 amrex::Real sm2 =
m_phi(i-2, j , k , qty_index);
154 }
else if (upw_lo < -
tol) {
157 val_lo = 0.5 * (s + sm1);
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Evaluate(const amrex::Real &sm1, const amrex::Real &s, const amrex::Real &sp1) const
Definition: ERF_Interpolation_WENO_Z.H:216
const amrex::Real tol
Definition: ERF_Interpolation_WENO_Z.H:247
◆ InterpolateInY()
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void WENO_MZQ3::InterpolateInY |
( |
const int & |
i, |
|
|
const int & |
j, |
|
|
const int & |
k, |
|
|
const int & |
qty_index, |
|
|
amrex::Real & |
val_lo, |
|
|
amrex::Real |
upw_lo, |
|
|
const amrex::Real |
|
|
) |
| const |
|
inline |
173 amrex::Real sp1 =
m_phi(i , j+1, k , qty_index);
174 amrex::Real s =
m_phi(i , j , k , qty_index);
175 amrex::Real sm1 =
m_phi(i , j-1, k , qty_index);
176 amrex::Real sm2 =
m_phi(i , j-2, k , qty_index);
180 }
else if (upw_lo < -
tol) {
183 val_lo = 0.5 * (s + sm1);
◆ InterpolateInZ()
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void WENO_MZQ3::InterpolateInZ |
( |
const int & |
i, |
|
|
const int & |
j, |
|
|
const int & |
k, |
|
|
const int & |
qty_index, |
|
|
amrex::Real & |
val_lo, |
|
|
amrex::Real |
upw_lo, |
|
|
const amrex::Real |
|
|
) |
| const |
|
inline |
199 amrex::Real sp1 =
m_phi(i , j , k+1, qty_index);
200 amrex::Real s =
m_phi(i , j , k , qty_index);
201 amrex::Real sm1 =
m_phi(i , j , k-1, qty_index);
202 amrex::Real sm2 =
m_phi(i , j , k-2, qty_index);
206 }
else if (upw_lo < -
tol) {
209 val_lo = 0.5 * (s + sm1);
◆ eps
const amrex::Real WENO_MZQ3::eps =1.0e-6 |
|
private |
◆ g1
constexpr amrex::Real WENO_MZQ3::g1 =(1.0/3.0) |
|
staticconstexprprivate |
◆ g2
constexpr amrex::Real WENO_MZQ3::g2 =(1.0/3.0) |
|
staticconstexprprivate |
◆ g3
constexpr amrex::Real WENO_MZQ3::g3 =(1.0/3.0) |
|
staticconstexprprivate |
◆ m_phi
amrex::Array4<const amrex::Real> WENO_MZQ3::m_phi |
|
private |
◆ tol
const amrex::Real WENO_MZQ3::tol =1.0e-12 |
|
private |
The documentation for this struct was generated from the following file: