1 #ifndef AMREX_MLEBTENSOR_K_H_
2 #define AMREX_MLEBTENSOR_K_H_
3 #include <AMReX_Config.H>
11 return (d==2) ? Real(0.5) : ((d==1) ? Real(1.0) : Real(0.0));
18 int jhip,
int jhim,
int jlop,
int jlom) noexcept
20 return Real(0.5)*dyi * ((vel(i ,jhip,k,n)-vel(i ,jhim,k,n))*whi +
21 (vel(i-1,jlop,k,n)-vel(i-1,jlom,k,n))*wlo);
28 int ihip,
int ihim,
int ilop,
int ilom) noexcept
30 return Real(0.5)*dxi * ((vel(ihip,j ,k,n)-vel(ihim,j ,k,n))*whi +
31 (vel(ilop,j-1,k,n)-vel(ilom,j-1,k,n))*wlo);
41 0,AMREX_SPACEDIM>
const& bct,
44 int jhip,
int jhim,
int jlop,
int jlom) noexcept
50 ddy = (bvxlo(i-1,j ,k,n) * Real(-1.5) +
51 bvxlo(i-1,j+1,k,n) * Real(2.) +
52 bvxlo(i-1,j+2,k,n) * Real(-0.5)) * dyi;
53 }
else if (j == dhi.y) {
54 ddy = -(bvxlo(i-1,j ,k,n) * Real(-1.5) +
55 bvxlo(i-1,j-1,k,n) * Real(2.) +
56 bvxlo(i-1,j-2,k,n) * Real(-0.5)) * dyi;
58 ddy = wlo*dyi*(bvxlo(i-1,jlop,k,n)-bvxlo(i-1,jlom,k,n));
61 ddy = whi*dyi*(vel(i,jhip,k,n)-vel(i,jhim,k,n));
65 }
else if (i == dhi.x+1) {
68 ddy = (bvxhi(i,j ,k,n) * Real(-1.5) +
69 bvxhi(i,j+1,k,n) * Real(2.) +
70 bvxhi(i,j+2,k,n) * Real(-0.5)) * dyi;
71 }
else if (j == dhi.y) {
72 ddy = -(bvxhi(i,j ,k,n) * Real(-1.5) +
73 bvxhi(i,j-1,k,n) * Real(2.) +
74 bvxhi(i,j-2,k,n) * Real(-0.5)) * dyi;
76 ddy = whi*dyi*(bvxhi(i,jhip,k,n)-bvxhi(i,jhim,k,n));
79 ddy = wlo*dyi*(vel(i-1,jlop,k,n)-vel(i-1,jlom,k,n));
84 ddy =
mlebtensor_dy_on_xface(i,j,k,n,vel,dyi,whi,wlo,jhip,jhim,jlop,jlom);
96 0,AMREX_SPACEDIM>
const& bct,
99 int ihip,
int ihim,
int ilop,
int ilom) noexcept
105 ddx = (bvylo(i ,j-1,k,n) * Real(-1.5) +
106 bvylo(i+1,j-1,k,n) * Real(2.) +
107 bvylo(i+2,j-1,k,n) * Real(-0.5)) * dxi;
108 }
else if (i == dhi.x) {
109 ddx = -(bvylo(i ,j-1,k,n) * Real(-1.5) +
110 bvylo(i-1,j-1,k,n) * Real(2.) +
111 bvylo(i-2,j-1,k,n) * Real(-0.5)) * dxi;
113 ddx = wlo*dxi*(bvylo(ilop,j-1,k,n)-bvylo(ilom,j-1,k,n));
116 ddx = whi*dxi*(vel(ihip,j,k,n)-vel(ihim,j,k,n));
120 }
else if (j == dhi.y+1) {
123 ddx = (bvyhi(i ,j,k,n) * Real(-1.5) +
124 bvyhi(i+1,j,k,n) * Real(2.) +
125 bvyhi(i+2,j,k,n) * Real(-0.5)) * dxi;
126 }
else if (i == dhi.x) {
127 ddx = -(bvyhi(i ,j,k,n) * Real(-1.5) +
128 bvyhi(i-1,j,k,n) * Real(2.) +
129 bvyhi(i-2,j,k,n) * Real(-0.5)) * dxi;
131 ddx = whi*dxi*(bvyhi(ihip,j,k,n)-bvyhi(ihim,j,k,n));
134 ddx = wlo*dxi*(vel(ilop,j-1,k,n)-vel(ilom,j-1,k,n));
139 ddx =
mlebtensor_dx_on_yface(i,j,k,n,vel,dxi,whi,wlo,ihip,ihim,ilop,ilom);
146 #if (AMREX_SPACEDIM == 1)
147 #elif (AMREX_SPACEDIM == 2)
#define AMREX_FORCE_INLINE
Definition: AMReX_Extension.H:119
#define AMREX_GPU_HOST_DEVICE
Definition: AMReX_GpuQualifiers.H:20
#define AMREX_LO_NEUMANN
Definition: AMReX_LO_BCTYPES.H:6
#define AMREX_LO_DIRICHLET
Definition: AMReX_LO_BCTYPES.H:5
Maintain an identifier for boundary condition types.
Definition: AMReX_BoundCond.H:20
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE int yhi() noexcept
Int value of the y-hi-face.
Definition: AMReX_Orientation.H:110
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE int ylo() noexcept
Int value of the y-lo-face.
Definition: AMReX_Orientation.H:106
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE int xlo() noexcept
Int value of the x-lo-face.
Definition: AMReX_Orientation.H:98
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE int xhi() noexcept
Int value of the x-hi-face.
Definition: AMReX_Orientation.H:102
Definition: AMReX_Amr.cpp:49
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mlebtensor_weight(int d)
Definition: AMReX_MLEBTensor_K.H:10
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mlebtensor_dx_on_yface(int, int j, int k, int n, Array4< Real const > const &vel, Real dxi, Real whi, Real wlo, int ihip, int ihim, int ilop, int ilom) noexcept
Definition: AMReX_MLEBTensor_K.H:25
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mlebtensor_dy_on_xface(int i, int, int k, int n, Array4< Real const > const &vel, Real dyi, Real whi, Real wlo, int jhip, int jhim, int jlop, int jlom) noexcept
Definition: AMReX_MLEBTensor_K.H:15
Definition: AMReX_Array.H:282
Definition: AMReX_Array4.H:61
Definition: AMReX_Dim3.H:12