1 #ifndef AMREX_MLTENSOR_K_H_
2 #define AMREX_MLTENSOR_K_H_
3 #include <AMReX_Config.H>
13 return (vel(i,j+1,k,n)+vel(i-1,j+1,k,n)-vel(i,j-1,k,n)-vel(i-1,j-1,k,n))*(Real(0.25)*dyi);
19 return (vel(i+1,j,k,n)+vel(i+1,j-1,k,n)-vel(i-1,j,k,n)-vel(i-1,j-1,k,n))*(Real(0.25)*dxi);
27 0,AMREX_SPACEDIM>
const& bct,
28 Dim3 const& dlo,
Dim3 const& dhi) noexcept
34 ddy = (bvxlo(i-1,j ,k,n) * Real(-1.5) +
35 bvxlo(i-1,j+1,k,n) * Real(2.) +
36 bvxlo(i-1,j+2,k,n) * Real(-0.5)) * dyi;
37 }
else if (j == dhi.y) {
38 ddy = -(bvxlo(i-1,j ,k,n) * Real(-1.5) +
39 bvxlo(i-1,j-1,k,n) * Real(2.) +
40 bvxlo(i-1,j-2,k,n) * Real(-0.5)) * dyi;
42 ddy = (bvxlo(i-1,j+1,k,n)-bvxlo(i-1,j-1,k,n))*(Real(0.5)*dyi);
45 ddy = (vel(i,j+1,k,n)-vel(i,j-1,k,n))*(Real(0.5)*dyi);
49 }
else if (i == dhi.x+1) {
52 ddy = (bvxhi(i,j ,k,n) * Real(-1.5) +
53 bvxhi(i,j+1,k,n) * Real(2.) +
54 bvxhi(i,j+2,k,n) * Real(-0.5)) * dyi;
55 }
else if (j == dhi.y) {
56 ddy = -(bvxhi(i,j ,k,n) * Real(-1.5) +
57 bvxhi(i,j-1,k,n) * Real(2.) +
58 bvxhi(i,j-2,k,n) * Real(-0.5)) * dyi;
60 ddy = (bvxhi(i,j+1,k,n)-bvxhi(i,j-1,k,n))*(Real(0.5)*dyi);
63 ddy = (vel(i-1,j+1,k,n)-vel(i-1,j-1,k,n))*(Real(0.5)*dyi);
78 0,AMREX_SPACEDIM>
const& bct,
79 Dim3 const& dlo,
Dim3 const& dhi) noexcept
85 ddx = (bvylo(i ,j-1,k,n) * Real(-1.5) +
86 bvylo(i+1,j-1,k,n) * Real(2.) +
87 bvylo(i+2,j-1,k,n) * Real(-0.5)) * dxi;
88 }
else if (i == dhi.x) {
89 ddx = -(bvylo(i ,j-1,k,n) * Real(-1.5) +
90 bvylo(i-1,j-1,k,n) * Real(2.) +
91 bvylo(i-2,j-1,k,n) * Real(-0.5)) * dxi;
93 ddx = (bvylo(i+1,j-1,k,n)-bvylo(i-1,j-1,k,n))*(Real(0.5)*dxi);
96 ddx = (vel(i+1,j,k,n)-vel(i-1,j,k,n))*(Real(0.5)*dxi);
100 }
else if (j == dhi.y+1) {
103 ddx = (bvyhi(i ,j,k,n) * Real(-1.5) +
104 bvyhi(i+1,j,k,n) * Real(2.) +
105 bvyhi(i+2,j,k,n) * Real(-0.5)) * dxi;
106 }
else if (i == dhi.x) {
107 ddx = -(bvyhi(i ,j,k,n) * Real(-1.5) +
108 bvyhi(i-1,j,k,n) * Real(2.) +
109 bvyhi(i-2,j,k,n) * Real(-0.5)) * dxi;
111 ddx = (bvyhi(i+1,j,k,n)-bvyhi(i-1,j,k,n))*(Real(0.5)*dxi);
114 ddx = (vel(i+1,j-1,k,n)-vel(i-1,j-1,k,n))*(Real(0.5)*dxi);
125 #if (AMREX_SPACEDIM == 1)
127 #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 mltensor_dx_on_yface(int i, int j, int k, int n, Array4< Real const > const &vel, Real dxi) noexcept
Definition: AMReX_MLTensor_K.H:17
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mltensor_dy_on_xface(int i, int j, int k, int n, Array4< Real const > const &vel, Real dyi) noexcept
Definition: AMReX_MLTensor_K.H:11
Definition: AMReX_Array.H:282
Definition: AMReX_Array4.H:61
Definition: AMReX_Dim3.H:12