#include <ERF_Interpolation_UPW.H>
|
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE | UPWIND3SL (const amrex::Array4< const amrex::Real > &phi, const amrex::Real) |
| |
| 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_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_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_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real | Evaluate (const amrex::Real &s, const amrex::Real &sm1, const amrex::Real &sm2) const |
| |
| int | GetUpwindCellNumber () const |
| |
|
| amrex::Array4< const amrex::Real > | m_phi |
| |
|
| static constexpr amrex::Real | eps =(amrex::Real(1.0e-16)) |
| |
| static constexpr amrex::Real | l1 =(amrex::Real(1)/amrex::Real(6.0)) |
| |
| static constexpr amrex::Real | l2 =(amrex::Real(1)/three) |
| |
Interpolation operators used for 3rd order upwind scheme
◆ UPWIND3SL()
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE UPWIND3SL::UPWIND3SL |
( |
const amrex::Array4< const amrex::Real > & |
phi, |
|
|
const amrex::Real |
|
|
) |
| |
|
inline |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real phi(amrex::Real d, amrex::Real z0, amrex::Real psi) noexcept
Definition: ERF_ImmersedWallCell.H:176
amrex::Array4< const amrex::Real > m_phi
Definition: ERF_Interpolation_UPW.H:324
◆ Evaluate()
| AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real UPWIND3SL::Evaluate |
( |
const amrex::Real & |
s, |
|
|
const amrex::Real & |
sm1, |
|
|
const amrex::Real & |
sm2 |
|
) |
| const |
|
inline |
315 amrex::Real rmh = (s - sm1) / ((sm1 - sm2) +
eps);
316 amrex::Real K =
l2 + amrex::Real(2)*
l2*rmh;
317 amrex::Real
phi = amrex::max(amrex::Real(0), amrex::min(amrex::Real(2)*rmh, amrex::min(amrex::Real(2), K)));
318 return (sm1 +
myhalf *
phi * (sm1 - sm2));
constexpr amrex::Real myhalf
Definition: ERF_NumericalConstants.H:41
static constexpr amrex::Real eps
Definition: ERF_Interpolation_UPW.H:325
static constexpr amrex::Real l2
Definition: ERF_Interpolation_UPW.H:327
Referenced by InterpolateInX(), InterpolateInY(), and InterpolateInZ().
◆ GetUpwindCellNumber()
| int UPWIND3SL::GetUpwindCellNumber |
( |
| ) |
const |
|
inline |
◆ InterpolateInX()
| AMREX_GPU_DEVICE AMREX_FORCE_INLINE void UPWIND3SL::InterpolateInX |
( |
const int & |
i, |
|
|
const int & |
j, |
|
|
const int & |
k, |
|
|
const int & |
qty_index, |
|
|
amrex::Real & |
val_lo, |
|
|
amrex::Real |
upw_lo |
|
) |
| const |
|
inline |
238 if (upw_lo != amrex::Real(0)) upw_lo = (upw_lo > 0) ? amrex::Real(1) : -amrex::Real(1);
241 amrex::Real sp1 =
m_phi(i+1, j , k , qty_index);
242 amrex::Real s =
m_phi(i , j , k , qty_index);
243 amrex::Real sm1 =
m_phi(i-1, j , k , qty_index);
244 amrex::Real sm2 =
m_phi(i-2, j , k , qty_index);
247 amrex::Real Fhi =
Evaluate(s ,sm1,sm2);
248 amrex::Real Flo =
Evaluate(sm1,s ,sp1);
251 val_lo = (amrex::Real(1) + upw_lo)/amrex::Real(2) * Fhi + (amrex::Real(1) - upw_lo)/amrex::Real(2) * Flo;
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Evaluate(const amrex::Real &s, const amrex::Real &sm1, const amrex::Real &sm2) const
Definition: ERF_Interpolation_UPW.H:311
◆ InterpolateInY()
| AMREX_GPU_DEVICE AMREX_FORCE_INLINE void UPWIND3SL::InterpolateInY |
( |
const int & |
i, |
|
|
const int & |
j, |
|
|
const int & |
k, |
|
|
const int & |
qty_index, |
|
|
amrex::Real & |
val_lo, |
|
|
amrex::Real |
upw_lo |
|
) |
| const |
|
inline |
265 if (upw_lo != amrex::Real(0)) upw_lo = (upw_lo > 0) ? amrex::Real(1) : -amrex::Real(1);
268 amrex::Real sp1 =
m_phi(i , j+1, k , qty_index);
269 amrex::Real s =
m_phi(i , j , k , qty_index);
270 amrex::Real sm1 =
m_phi(i , j-1, k , qty_index);
271 amrex::Real sm2 =
m_phi(i , j-2, k , qty_index);
274 amrex::Real Fhi =
Evaluate(s ,sm1,sm2);
275 amrex::Real Flo =
Evaluate(sm1,s ,sp1);
278 val_lo = (amrex::Real(1) + upw_lo)/amrex::Real(2) * Fhi + (amrex::Real(1) - upw_lo)/amrex::Real(2) * Flo;
◆ InterpolateInZ()
| AMREX_GPU_DEVICE AMREX_FORCE_INLINE void UPWIND3SL::InterpolateInZ |
( |
const int & |
i, |
|
|
const int & |
j, |
|
|
const int & |
k, |
|
|
const int & |
qty_index, |
|
|
amrex::Real & |
val_lo, |
|
|
amrex::Real |
upw_lo |
|
) |
| const |
|
inline |
292 if (upw_lo != amrex::Real(0)) upw_lo = (upw_lo > 0) ? amrex::Real(1) : -amrex::Real(1);
295 amrex::Real sp1 =
m_phi(i , j , k+1, qty_index);
296 amrex::Real s =
m_phi(i , j , k , qty_index);
297 amrex::Real sm1 =
m_phi(i , j , k-1, qty_index);
298 amrex::Real sm2 =
m_phi(i , j , k-2, qty_index);
301 amrex::Real Fhi =
Evaluate(s ,sm1,sm2);
302 amrex::Real Flo =
Evaluate(sm1,s ,sp1);
305 val_lo = (amrex::Real(1) + upw_lo)/amrex::Real(2) * Fhi + (amrex::Real(1) - upw_lo)/amrex::Real(2) * Flo;
◆ eps
| constexpr amrex::Real UPWIND3SL::eps =(amrex::Real(1.0e-16)) |
|
staticconstexprprivate |
◆ l1
| constexpr amrex::Real UPWIND3SL::l1 =(amrex::Real(1)/amrex::Real(6.0)) |
|
staticconstexprprivate |
◆ l2
| constexpr amrex::Real UPWIND3SL::l2 =(amrex::Real(1)/three) |
|
staticconstexprprivate |
◆ m_phi
| amrex::Array4<const amrex::Real> UPWIND3SL::m_phi |
|
private |
The documentation for this struct was generated from the following file: