1 #ifndef ERF_INTERPOLATE_WENO_Z_H_
2 #define ERF_INTERPOLATE_WENO_Z_H_
11 WENO_Z3 (
const amrex::Array4<const amrex::Real>& phi,
26 if (upw_lo != 0.) upw_lo = (upw_lo > 0) ? 1. : -1.;
39 val_lo = (1.0 + upw_lo)/2.0 * Fhi + (1.0 - upw_lo)/2.0 * Flo;
53 if (upw_lo != 0.) upw_lo = (upw_lo > 0) ? 1. : -1.;
66 val_lo = (1.0 + upw_lo)/2.0 * Fhi + (1.0 - upw_lo)/2.0 * Flo;
80 if (upw_lo != 0.) upw_lo = (upw_lo > 0) ? 1. : -1.;
93 val_lo = (1.0 + upw_lo)/2.0 * Fhi + (1.0 - upw_lo)/2.0 * Flo;
120 return ( (w1 * v1 + w2 * v2) / (2.0 * wsum) );
124 amrex::Array4<const amrex::Real>
m_phi;
145 const int& qty_index,
150 if (upw_lo != 0.) upw_lo = (upw_lo > 0) ? 1. : -1.;
163 val_lo = (1.0 + upw_lo)/2.0 * Fhi + (1.0 - upw_lo)/2.0 * Flo;
172 const int& qty_index,
177 if (upw_lo != 0.) upw_lo = (upw_lo > 0) ? 1. : -1.;
190 val_lo = (1.0 + upw_lo)/2.0 * Fhi + (1.0 - upw_lo)/2.0 * Flo;
199 const int& qty_index,
204 if (upw_lo != 0.) upw_lo = (upw_lo > 0) ? 1. : -1.;
217 val_lo = (1.0 + upw_lo)/2.0 * Fhi + (1.0 - upw_lo)/2.0 * Flo;
230 amrex::Real b3 = ( (13.0 / 12.0) * ((sm1 - 2.0*s + sp1)*(sm1 - 2.0*s + sp1)) ) + ( ((sp1 - sm1)*(sp1 - sm1)) / 4.0 );
233 amrex::Real t5 = ( std::abs(b3 - b1) + std::abs(b3 - b2) ) / 32.0;
245 amrex::Real v3 = (-sm1 + 5.0 * s + 2.0 * sp1) / 6.0;
248 return ( (w3 /
g3) * (v3 -
g1 * v1 -
g2 * v2) + w1 * v1 + w2 * v2 );
252 amrex::Array4<const amrex::Real>
m_phi;
264 WENO_Z5 (
const amrex::Array4<const amrex::Real>& phi,
274 const int& qty_index,
279 if (upw_lo != 0.) upw_lo = (upw_lo > 0) ? 1. : -1.;
294 val_lo = (1.0 + upw_lo)/2.0 * Fhi + (1.0 - upw_lo)/2.0 * Flo;
303 const int& qty_index,
308 if (upw_lo != 0.) upw_lo = (upw_lo > 0) ? 1. : -1.;
323 val_lo = (1.0 + upw_lo)/2.0 * Fhi + (1.0 - upw_lo)/2.0 * Flo;
332 const int& qty_index,
337 if (upw_lo != 0.) upw_lo = (upw_lo > 0) ? 1. : -1.;
352 val_lo = (1.0 + upw_lo)/2.0 * Fhi + (1.0 - upw_lo)/2.0 * Flo;
365 amrex::Real b1 =
c1 * (sm2 - 2.0 * sm1 + s) * (sm2 - 2.0 * sm1 + s) +
366 0.25 * (sm2 - 4.0 * sm1 + 3.0 * s) * (sm2 - 4.0 * sm1 + 3.0 * s);
367 amrex::Real b2 =
c1 * (sm1 - 2.0 * s + sp1) * (sm1 - 2.0 * s + sp1) +
368 0.25 * (sm1 - sp1) * (sm1 - sp1);
369 amrex::Real b3 =
c1 * (s - 2.0 * sp1 + sp2) * (s - 2.0 * sp1 + sp2) +
370 0.25 * (3.0 * s - 4.0 * sp1 + sp2) * (3.0 * s - 4.0 * sp1 + sp2);
387 return ( (w1 * v1 + w2 * v2 + w3 * v3) / (6.0 * wsum) );
391 amrex::Array4<const amrex::Real>
m_phi;
404 WENO_Z7 (
const amrex::Array4<const amrex::Real>& phi,
414 const int& qty_index,
419 if (upw_lo != 0.) upw_lo = (upw_lo > 0) ? 1. : -1.;
436 val_lo = (1.0 + upw_lo)/2.0 * Fhi + (1.0 - upw_lo)/2.0 * Flo;
445 const int& qty_index,
450 if (upw_lo != 0.) upw_lo = (upw_lo > 0) ? 1. : -1.;
467 val_lo = (1.0 + upw_lo)/2.0 * Fhi + (1.0 - upw_lo)/2.0 * Flo;
476 const int& qty_index,
481 if (upw_lo != 0.) upw_lo = (upw_lo > 0) ? 1. : -1.;
498 val_lo = (1.0 + upw_lo)/2.0 * Fhi + (1.0 - upw_lo)/2.0 * Flo;
514 - sm3 * sm2 * 2623./160.0
515 + sm3 * sm1 * 9449./480.0
516 - sm3 * s * 11389./1440.0
517 + sm2 * sm2 * 28547./960.0
518 - sm2 * sm1 * 35047./480.0
519 + sm2 * s * 14369./480.0
520 + sm1 * sm1 * 44747./960.0
521 - sm1 * s * 6383./160.0
522 + s * s * 25729./2880.0 );
524 - sm2 * sm1 * 3229/480.0
525 + sm2 * s * 3169/480.0
526 - sm2 * sp1 * 2989/1440.0
527 + sm1 * sm1 * 11147/960.0
528 - sm1 * s * 11767/480.0
529 + sm1 * sp1 * 1283/160.0
530 + s * s * 13667/960.0
531 - s * sp1 * 5069/480.0
532 + sp1 * sp1 * 6649/2880.0 );
534 - sm1 * s * 5069./480.0
535 + sm1 * sp1 * 1283./160.0
536 - sm1 * sp2 * 2989./1440.0
537 + s * s * 13667./960.0
538 - s * sp1 * 11767./480.0
539 + s * sp2 * 3169./480.0
540 + sp1 * sp1 * 11147./960.0
541 - sp1 * sp2 * 3229./480.0
542 + sp2 * sp2 * 3169./2880.0 );
544 - s * sp1 * 6383./160.
545 + s * sp2 * 14369./480.
546 - s * sp3 * 11389./1440.
547 + sp1 * sp1 * 44747./960.
548 - sp1 * sp2 * 35047./480.
549 + sp1 * sp3 * 9449./480.
550 + sp2 * sp2 * 28547./960.
551 - sp2 * sp3 * 2623./160.
552 + sp3 * sp3 * 6649./2880. );
565 amrex::Real v1 = (-0.3125)*sm3 + ( 1.3125)*sm2 + (-2.1875)*sm1 + ( 2.1875)*s;
566 amrex::Real v2 = ( 0.0625)*sm2 + (-0.3125)*sm1 + ( 0.9375)*s + ( 0.3125)*sp1;
567 amrex::Real v3 = (-0.0625)*sm1 + ( 0.5625)*s + ( 0.5625)*sp1 + (-0.0625)*sp2;
568 amrex::Real v4 = ( 0.3125)*s + ( 0.9375)*sp1 + (-0.3125)*sp2 + ( 0.0625)*sp3;
571 return ( (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4) / (wsum) );
575 amrex::Array4<const amrex::Real>
m_phi;
amrex::Real Real
Definition: ERF_ShocInterface.H:16
real(c_double), parameter a2
Definition: ERF_module_model_constants.F90:95
real(c_double), parameter a3
Definition: ERF_module_model_constants.F90:96
Definition: ERF_Interpolation_WENO_Z.H:134
static constexpr amrex::Real g2
Definition: ERF_Interpolation_WENO_Z.H:255
amrex::Array4< const amrex::Real > m_phi
Definition: ERF_Interpolation_WENO_Z.H:252
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
Definition: ERF_Interpolation_WENO_Z.H:196
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:223
static constexpr amrex::Real g3
Definition: ERF_Interpolation_WENO_Z.H:256
WENO_MZQ3(const amrex::Array4< const amrex::Real > &phi, const amrex::Real)
Definition: ERF_Interpolation_WENO_Z.H:135
const amrex::Real eps
Definition: ERF_Interpolation_WENO_Z.H:253
static constexpr amrex::Real g1
Definition: ERF_Interpolation_WENO_Z.H:254
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
Definition: ERF_Interpolation_WENO_Z.H:142
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
Definition: ERF_Interpolation_WENO_Z.H:169
Definition: ERF_Interpolation_WENO_Z.H:10
const amrex::Real eps
Definition: ERF_Interpolation_WENO_Z.H:125
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
Definition: ERF_Interpolation_WENO_Z.H:72
amrex::Array4< const amrex::Real > m_phi
Definition: ERF_Interpolation_WENO_Z.H:124
WENO_Z3(const amrex::Array4< const amrex::Real > &phi, const amrex::Real)
Definition: ERF_Interpolation_WENO_Z.H:11
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:99
static constexpr amrex::Real g2
Definition: ERF_Interpolation_WENO_Z.H:127
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
Definition: ERF_Interpolation_WENO_Z.H:18
static constexpr amrex::Real g1
Definition: ERF_Interpolation_WENO_Z.H:126
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
Definition: ERF_Interpolation_WENO_Z.H:45
Definition: ERF_Interpolation_WENO_Z.H:263
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Evaluate(const amrex::Real &sm2, const amrex::Real &sm1, const amrex::Real &s, const amrex::Real &sp1, const amrex::Real &sp2) const
Definition: ERF_Interpolation_WENO_Z.H:358
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
Definition: ERF_Interpolation_WENO_Z.H:329
static constexpr amrex::Real g3
Definition: ERF_Interpolation_WENO_Z.H:396
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
Definition: ERF_Interpolation_WENO_Z.H:300
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
Definition: ERF_Interpolation_WENO_Z.H:271
static constexpr amrex::Real g1
Definition: ERF_Interpolation_WENO_Z.H:394
amrex::Array4< const amrex::Real > m_phi
Definition: ERF_Interpolation_WENO_Z.H:391
static constexpr amrex::Real c1
Definition: ERF_Interpolation_WENO_Z.H:393
const amrex::Real eps
Definition: ERF_Interpolation_WENO_Z.H:392
static constexpr amrex::Real g2
Definition: ERF_Interpolation_WENO_Z.H:395
WENO_Z5(const amrex::Array4< const amrex::Real > &phi, const amrex::Real)
Definition: ERF_Interpolation_WENO_Z.H:264
Definition: ERF_Interpolation_WENO_Z.H:403
static constexpr amrex::Real g1
Definition: ERF_Interpolation_WENO_Z.H:577
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Evaluate(const amrex::Real &sm3, const amrex::Real &sm2, const amrex::Real &sm1, const amrex::Real &s, const amrex::Real &sp1, const amrex::Real &sp2, const amrex::Real &sp3) const
Definition: ERF_Interpolation_WENO_Z.H:504
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
Definition: ERF_Interpolation_WENO_Z.H:411
amrex::Array4< const amrex::Real > m_phi
Definition: ERF_Interpolation_WENO_Z.H:575
const amrex::Real eps
Definition: ERF_Interpolation_WENO_Z.H:576
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
Definition: ERF_Interpolation_WENO_Z.H:473
WENO_Z7(const amrex::Array4< const amrex::Real > &phi, const amrex::Real)
Definition: ERF_Interpolation_WENO_Z.H:404
static constexpr amrex::Real g4
Definition: ERF_Interpolation_WENO_Z.H:580
static constexpr amrex::Real g2
Definition: ERF_Interpolation_WENO_Z.H:578
static constexpr amrex::Real g3
Definition: ERF_Interpolation_WENO_Z.H:579
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
Definition: ERF_Interpolation_WENO_Z.H:442