1 #ifndef AMREX_MF_INTERP_C_H_
2 #define AMREX_MF_INTERP_C_H_
3 #include <AMReX_Config.H>
14 Real dc = Real(0.5) * (u(i+1,j,k,nu) - u(i-1,j,k,nu));
15 if (i == domain.
smallEnd(0) && (bc.
lo(0) == BCType::ext_dir ||
16 bc.
lo(0) == BCType::hoextrap)) {
18 dc = -Real(16./15.)*u(i-1,j,k,nu) + Real(0.5)*u(i,j,k,nu)
19 + Real(2./3.)*u(i+1,j,k,nu) - Real(0.1)*u(i+2,j,k,nu);
21 dc = Real(0.25)*(u(i+1,j,k,nu)+Real(5.)*u(i,j,k,nu)-Real(6.)*u(i-1,j,k,nu));
24 if (i == domain.
bigEnd(0) && (bc.
hi(0) == BCType::ext_dir ||
25 bc.
hi(0) == BCType::hoextrap)) {
27 dc = Real(16./15.)*u(i+1,j,k,nu) - Real(0.5)*u(i,j,k,nu)
28 - Real(2./3.)*u(i-1,j,k,nu) + Real(0.1)*u(i-2,j,k,nu);
30 dc = -Real(0.25)*(u(i-1,j,k,nu)+Real(5.)*u(i,j,k,nu)-Real(6.)*u(i+1,j,k,nu));
40 Real dc = Real(0.5) * (u(i,j+1,k,nu) - u(i,j-1,k,nu));
41 if (j == domain.
smallEnd(1) && (bc.
lo(1) == BCType::ext_dir ||
42 bc.
lo(1) == BCType::hoextrap)) {
44 dc = -Real(16./15.)*u(i,j-1,k,nu) + Real(0.5)*u(i,j,k,nu)
45 + Real(2./3.)*u(i,j+1,k,nu) - Real(0.1)*u(i,j+2,k,nu);
47 dc = Real(0.25)*(u(i,j+1,k,nu)+Real(5.)*u(i,j,k,nu)-Real(6.)*u(i,j-1,k,nu));
50 if (j == domain.
bigEnd(1) && (bc.
hi(1) == BCType::ext_dir ||
51 bc.
hi(1) == BCType::hoextrap)) {
53 dc = Real(16./15.)*u(i,j+1,k,nu) - Real(0.5)*u(i,j,k,nu)
54 - Real(2./3.)*u(i,j-1,k,nu) + Real(0.1)*u(i,j-2,k,nu);
56 dc = -Real(0.25)*(u(i,j-1,k,nu)+Real(5.)*u(i,j,k,nu)-Real(6.)*u(i,j+1,k,nu));
66 Real dc = Real(0.5) * (u(i,j,k+1,nu) - u(i,j,k-1,nu));
67 if (k == domain.
smallEnd(2) && (bc.
lo(2) == BCType::ext_dir ||
68 bc.
lo(2) == BCType::hoextrap)) {
70 dc = -Real(16./15.)*u(i,j,k-1,nu) + Real(0.5)*u(i,j,k,nu)
71 + Real(2./3.)*u(i,j,k+1,nu) - Real(0.1)*u(i,j,k+2,nu);
73 dc = Real(0.25)*(u(i,j,k+1,nu)+Real(5.)*u(i,j,k,nu)-Real(6.)*u(i,j,k-1,nu));
76 if (k == domain.
bigEnd(2) && (bc.
hi(2) == BCType::ext_dir ||
77 bc.
hi(2) == BCType::hoextrap)) {
79 dc = Real(16./15.)*u(i,j,k+1,nu) - Real(0.5)*u(i,j,k,nu)
80 - Real(2./3.)*u(i,j,k-1,nu) + Real(0.1)*u(i,j,k-2,nu);
82 dc = -Real(0.25)*(u(i,j,k-1,nu)+Real(5.)*u(i,j,k,nu)-Real(6.)*u(i,j,k+1,nu));
93 Real xx = u(i-1,j,k,nu) - 2.0_rt * u(i,j,k,nu) + u(i+1,j,k,nu);
94 if (i == domain.
smallEnd(0) && (bc.
lo(0) == BCType::ext_dir ||
95 bc.
lo(0) == BCType::hoextrap)) {
100 if (i == domain.
bigEnd(0) && (bc.
hi(0) == BCType::ext_dir ||
101 bc.
hi(0) == BCType::hoextrap)) {
114 Real yy = u(i,j-1,k,nu) - 2.0_rt * u(i,j,k,nu) + u(i,j+1,k,nu);
115 if (j == domain.
smallEnd(1) && (bc.
lo(1) == BCType::ext_dir ||
116 bc.
lo(1) == BCType::hoextrap)) {
121 if (j == domain.
bigEnd(1) && (bc.
hi(1) == BCType::ext_dir ||
122 bc.
hi(1) == BCType::hoextrap)) {
135 Real zz = u(i,j,k-1,nu) - 2.0_rt * u(i,j,k,nu) + u(i,j,k+1,nu);
136 if (k == domain.
smallEnd(2) && (bc.
lo(2) == BCType::ext_dir ||
137 bc.
lo(2) == BCType::hoextrap)) {
142 if (k == domain.
bigEnd(1) && (bc.
hi(2) == BCType::ext_dir ||
143 bc.
hi(2) == BCType::hoextrap)) {
156 Real xy = (1._rt/4._rt) * ( u(i-1,j-1,k,nu) - u(i+1,j-1,k,nu)
157 - u(i-1,j+1,k,nu) + u(i+1,j+1,k,nu) );
158 if (i == domain.
smallEnd(0) && (bc.
lo(0) == BCType::ext_dir ||
159 bc.
lo(0) == BCType::hoextrap)) {
164 if (i == domain.
bigEnd(0) && (bc.
hi(0) == BCType::ext_dir ||
165 bc.
hi(0) == BCType::hoextrap)) {
170 if (j == domain.
smallEnd(1) && (bc.
lo(1) == BCType::ext_dir ||
171 bc.
lo(1) == BCType::hoextrap)) {
176 if (j == domain.
bigEnd(1) && (bc.
hi(1) == BCType::ext_dir ||
177 bc.
hi(1) == BCType::hoextrap)) {
190 Real xz = (1._rt/4._rt) * ( u(i-1,j,k-1,nu) - u(i+1,j,k-1,nu)
191 - u(i-1,j,k+1,nu) + u(i+1,j,k+1,nu) );
192 if (i == domain.
smallEnd(0) && (bc.
lo(0) == BCType::ext_dir ||
193 bc.
lo(0) == BCType::hoextrap)) {
198 if (i == domain.
bigEnd(0) && (bc.
hi(0) == BCType::ext_dir ||
199 bc.
hi(0) == BCType::hoextrap)) {
204 if (k == domain.
smallEnd(2) && (bc.
lo(2) == BCType::ext_dir ||
205 bc.
lo(2) == BCType::hoextrap)) {
210 if (k == domain.
bigEnd(1) && (bc.
hi(2) == BCType::ext_dir ||
211 bc.
hi(2) == BCType::hoextrap)) {
224 Real yz = (1._rt/4._rt) * ( u(i,j-1,k-1,nu) - u(i,j-1,k+1,nu)
225 - u(i,j+1,k-1,nu) + u(i,j+1,k+1,nu) );
226 if (j == domain.
smallEnd(1) && (bc.
lo(1) == BCType::ext_dir ||
227 bc.
lo(1) == BCType::hoextrap)) {
232 if (j == domain.
bigEnd(1) && (bc.
hi(1) == BCType::ext_dir ||
233 bc.
hi(1) == BCType::hoextrap)) {
238 if (k == domain.
smallEnd(2) && (bc.
lo(2) == BCType::ext_dir ||
239 bc.
lo(2) == BCType::hoextrap)) {
244 if (k == domain.
bigEnd(1) && (bc.
hi(2) == BCType::ext_dir ||
245 bc.
hi(2) == BCType::hoextrap)) {
255 #if (AMREX_SPACEDIM == 1)
257 #elif (AMREX_SPACEDIM == 2)
#define AMREX_FORCE_INLINE
Definition: AMReX_Extension.H:119
#define AMREX_GPU_HOST_DEVICE
Definition: AMReX_GpuQualifiers.H:20
Boundary Condition Records. Necessary information and functions for computing boundary conditions.
Definition: AMReX_BCRec.H:17
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const int * hi() const &noexcept
Return high-end boundary data.
Definition: AMReX_BCRec.H:106
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const int * lo() const &noexcept
Return low-end boundary data.
Definition: AMReX_BCRec.H:100
AMREX_GPU_HOST_DEVICE const IntVectND< dim > & smallEnd() const &noexcept
Get the smallend of the BoxND.
Definition: AMReX_Box.H:105
AMREX_GPU_HOST_DEVICE const IntVectND< dim > & bigEnd() const &noexcept
Get the bigend.
Definition: AMReX_Box.H:116
Definition: AMReX_Amr.cpp:49
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mf_compute_slopes_y(int i, int j, int k, Array4< Real const > const &u, int nu, Box const &domain, BCRec const &bc)
Definition: AMReX_MFInterp_C.H:37
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mf_cell_quadratic_compute_slopes_yy(int i, int j, int k, Array4< Real const > const &u, int nu, Box const &domain, BCRec const &bc)
Definition: AMReX_MFInterp_C.H:110
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mf_cell_quadratic_compute_slopes_xy(int i, int j, int k, Array4< Real const > const &u, int nu, Box const &domain, BCRec const &bc)
Definition: AMReX_MFInterp_C.H:152
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mf_cell_quadratic_compute_slopes_yz(int i, int j, int k, Array4< Real const > const &u, int nu, Box const &domain, BCRec const &bc)
Definition: AMReX_MFInterp_C.H:220
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mf_cell_quadratic_compute_slopes_zz(int i, int j, int k, Array4< Real const > const &u, int nu, Box const &domain, BCRec const &bc)
Definition: AMReX_MFInterp_C.H:131
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mf_cell_quadratic_compute_slopes_xx(int i, int j, int k, Array4< Real const > const &u, int nu, Box const &domain, BCRec const &bc)
Definition: AMReX_MFInterp_C.H:89
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mf_cell_quadratic_compute_slopes_xz(int i, int j, int k, Array4< Real const > const &u, int nu, Box const &domain, BCRec const &bc)
Definition: AMReX_MFInterp_C.H:186
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mf_compute_slopes_x(int i, int j, int k, Array4< Real const > const &u, int nu, Box const &domain, BCRec const &bc)
Definition: AMReX_MFInterp_C.H:11
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mf_compute_slopes_z(int i, int j, int k, Array4< Real const > const &u, int nu, Box const &domain, BCRec const &bc)
Definition: AMReX_MFInterp_C.H:63
Definition: AMReX_Array4.H:61
Dim3 begin
Definition: AMReX_Array4.H:66
Dim3 end
Definition: AMReX_Array4.H:67
int x
Definition: AMReX_Dim3.H:12
int z
Definition: AMReX_Dim3.H:12
int y
Definition: AMReX_Dim3.H:12