1 #ifndef AMREX_MLMG_1D_K_H_
2 #define AMREX_MLMG_1D_K_H_
3 #include <AMReX_Config.H>
15 for (
int n = 0; n < nc; ++n) {
17 for (
int i = lo.x; i <= hi.x; ++i) {
19 const int ioff = 2*(i-ic*2)-1;
20 ff(i,0,0,n) = T(0.75)*cc(ic,0,0,n) + T(0.25)*cc(ic+ioff,0,0,n);
33 for (
int n = 0; n < nc; ++n) {
35 for (
int i = lo.x; i <= hi.x; ++i) {
37 ff(i,0,0,n) = cc(ic,0,0,n);
48 bool i_is_odd = (ic*2 != i);
51 fine(i,0,0,n) = T(0.5)*(
crse(ic,0,0,n) +
crse(ic+1,0,0,n));
64 bool i_injection = (ic*4 == i);
68 fine(i,0,0,n) = T(0.25)*(
crse(ic ,0,0,n)*T(4*(ic+1)-i)
69 +
crse(ic+1,0,0,n)*T(i-4*ic));
#define AMREX_PRAGMA_SIMD
Definition: AMReX_Extension.H:80
#define AMREX_FORCE_INLINE
Definition: AMReX_Extension.H:119
#define AMREX_GPU_HOST_DEVICE
Definition: AMReX_GpuQualifiers.H:20
Array4< Real > fine
Definition: AMReX_InterpFaceRegister.cpp:90
Array4< Real const > crse
Definition: AMReX_InterpFaceRegister.cpp:92
static int ff(amrex::Real t, N_Vector y_data, N_Vector y_rhs, void *user_data)
Definition: AMReX_SundialsIntegrator.H:59
Definition: AMReX_Amr.cpp:49
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlmg_lin_cc_interp_r2(Box const &bx, Array4< T > const &ff, Array4< T const > const &cc, int nc) noexcept
Definition: AMReX_MLMG_1D_K.H:9
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlmg_lin_cc_interp_r4(Box const &bx, Array4< T > const &ff, Array4< T const > const &cc, int nc) noexcept
Definition: AMReX_MLMG_1D_K.H:27
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
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlmg_lin_nd_interp_r2(int i, int, int, int n, Array4< T > const &fine, Array4< T const > const &crse) noexcept
Definition: AMReX_MLMG_1D_K.H:44
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlmg_lin_nd_interp_r4(int i, int, int, int n, Array4< T > const &fine, Array4< T const > const &crse) noexcept
Definition: AMReX_MLMG_1D_K.H:60
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