1 #ifndef AMREX_INTERP_BNDRYDATA_2D_K_H_
2 #define AMREX_INTERP_BNDRYDATA_2D_K_H_
3 #include <AMReX_Config.H>
13 Array4<T>
const& bdry,
int nb,
14 Array4<T const>
const&
crse,
int nc, Dim3
const& r) noexcept
18 bdry(i,j,0,n+nb) =
crse(ic,jc,0,n+nc);
24 Array4<T>
const& bdry,
int nb,
25 Array4<T const>
const&
crse,
int nc, Dim3
const& r,
26 Array4<int const>
const&
mask,
int not_covered,
int max_width) noexcept
33 y[0] =
crse(ic,jc,0,n+nc);
36 if (
mask(i,j-
r.y,0) == not_covered) {
38 y[NN] =
crse(ic,jc-1,0,n+nc);
40 }
else if (max_width >= 2 &&
44 y[NN] =
crse(ic,jc+2,0,n+nc);
48 if (
mask(i,j+
r.y,0) == not_covered) {
50 y[NN] =
crse(ic,jc+1,0,n+nc);
52 }
else if (max_width >= 2 &&
56 y[NN] =
crse(ic,jc-2,0,n+nc);
60 if ( (
mask(i,j-
r.y,0) != not_covered) && (
mask(i,j+
r.y,0) != not_covered) ) {
64 T xInt = -T(0.5) + (j-jc*
r.y+T(0.5))/
r.y;
67 for (
int m = 0; m < NN; ++m) {
85 y[0] =
crse(ic,jc,0,n+nc);
88 if (
mask(i-
r.x,j,0) == not_covered) {
90 y[NN] =
crse(ic-1,jc,0,n+nc);
92 }
else if (max_width >= 2 &&
96 y[NN] =
crse(ic+2,jc,0,n+nc);
100 if (
mask(i+
r.x,j,0) == not_covered) {
102 y[NN] =
crse(ic+1,jc,0,n+nc);
104 }
else if (max_width >= 2 &&
108 y[NN] =
crse(ic-2,jc,0,n+nc);
112 if ( (
mask(i-
r.x,j,0) != not_covered) && (
mask(i+
r.x,j,0) != not_covered) ) {
116 T xInt = -T(0.5) + (i-ic*
r.x+T(0.5))/
r.x;
119 for (
int m = 0; m < NN; ++m) {
122 bdry(i,j,0,n+nb) =
b;
#define AMREX_FORCE_INLINE
Definition: AMReX_Extension.H:119
#define AMREX_GPU_HOST_DEVICE
Definition: AMReX_GpuQualifiers.H:20
Array4< int const > mask
Definition: AMReX_InterpFaceRegister.cpp:93
Array4< Real const > crse
Definition: AMReX_InterpFaceRegister.cpp:92
Definition: AMReX_Amr.cpp:49
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void interpbndrydata_y_o3(int i, int j, int, int n, Array4< T > const &bdry, int nb, Array4< T const > const &crse, int nc, Dim3 const &r, Array4< int const > const &mask, int not_covered, int max_width) noexcept
Definition: AMReX_InterpBndryData_2D_K.H:75
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void poly_interp_coeff(T xInt, T const *AMREX_RESTRICT x, int N, T *AMREX_RESTRICT c) noexcept
Definition: AMReX_LOUtil_K.H:24
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void interpbndrydata_x_o3(int i, int, int, int n, Array4< T > const &bdry, int nb, Array4< T const > const &crse, int nc, Dim3 const &r, Array4< int const > const &, int, int) noexcept
Definition: AMReX_InterpBndryData_1D_K.H:22
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void interpbndrydata_o1(int i, int, int, int n, Array4< T > const &bdry, int nb, Array4< T const > const &crse, int nc, Dim3 const &r) noexcept
Definition: AMReX_InterpBndryData_1D_K.H:11
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE BoxND< dim > coarsen(const BoxND< dim > &b, int ref_ratio) noexcept
Coarsen BoxND by given (positive) refinement ratio. NOTE: if type(dir) = CELL centered: lo <- lo/rati...
Definition: AMReX_Box.H:1304
Definition: AMReX_Array4.H:61
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool contains(int i, int j, int k) const noexcept
Definition: AMReX_Array4.H:251
Definition: AMReX_Dim3.H:12