1 #ifndef AMREX_MULTIFAB_UTIL_ND_C_H_
2 #define AMREX_MULTIFAB_UTIL_ND_C_H_
3 #include <AMReX_Config.H>
17 int scomp,
int fcomp,
int ncomp,
20 const auto lo =
lbound(bx);
21 const auto hi =
ubound(bx);
23 int ilo = 0, jlo = 0, klo = 0;
24 int ihi = 0, jhi = 0, khi = 0;
26 Real weight = (coord - gd.ProbLo(dir)) / gd.CellSize(dir);
27 auto dirhi = std::floor(weight + Real(0.5));
28 auto dirlo = dirhi-Real(1.);
29 weight -= dirlo+Real(0.5);
59 for (
int n = 0; n < ncomp; ++n) {
60 const int ns = n + scomp;
61 const int nf = n + fcomp;
62 for (
int k = lo.z; k <= hi.z; ++k) {
63 for (
int j = lo.y; j <= hi.y; ++j) {
65 for (
int i = lo.x; i <= hi.x; ++i) {
66 slice(i,j,k,ns) = (Real(1.0)-weight)*
full(i+ilo,j+jlo,k+klo,nf)
67 + weight *
full(i+ihi,j+jhi,k+khi,nf);
#define AMREX_PRAGMA_SIMD
Definition: AMReX_Extension.H:80
#define AMREX_GPU_HOST_DEVICE
Definition: AMReX_GpuQualifiers.H:20
Definition: AMReX_Amr.cpp:49
AMREX_GPU_HOST_DEVICE void amrex_fill_slice_interp(Box const &bx, Array4< Real > slice, Array4< Real const > const &full, int scomp, int fcomp, int ncomp, int dir, Real coord, GeometryData const &gd) noexcept
Definition: AMReX_MultiFabUtil_nd_C.H:15
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Dim3 ubound(Array4< T > const &a) noexcept
Definition: AMReX_Array4.H:315
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Dim3 lbound(Array4< T > const &a) noexcept
Definition: AMReX_Array4.H:308
Definition: AMReX_Array4.H:61
Definition: AMReX_Geometry.H:25