1 #ifndef AMREX_FILCC_1D_C_H_
2 #define AMREX_FILCC_1D_C_H_
3 #include <AMReX_Config.H>
15 const int dcomp,
const int numcomp,
16 Box const& domain_box,
const BCRec* bcr,
17 const int bcomp)
const noexcept
21 const auto& domain_lo = domain_box.loVect();
22 const auto& domain_hi = domain_box.hiVect();
23 const int ilo = domain_lo[0];
24 const int ihi = domain_hi[0];
28 for (
int n = dcomp; n < numcomp+dcomp; ++n)
30 const BCRec& bc = bcr[bcomp+n-dcomp];
35 case (BCType::foextrap):
37 q(i,0,0,n) = q(ilo,0,0,n);
40 case (BCType::hoextrap):
44 q(i,0,0,n) = q(ilo,0,0,n);
49 q(i,0,0,n) = Real(0.125)*(Real(15.)*q(i+1,0,0,n) - Real(10.)*q(i+2,0,0,n) + Real(3.)*q(i+3,0,0,n));
53 q(i,0,0,n) = Real(0.5)*(Real(3.)*q(i+1,0,0,n) - q(i+2,0,0,n));
57 case (BCType::hoextrapcc):
59 q(i,0,0,n) = Real(ilo-i)*(q(ilo,0,0,n) - q(ilo+1,0,0,n)) + q(ilo,0,0,n);
62 case (BCType::reflect_even):
64 q(i,0,0,n) = q(2*ilo-i-1,0,0,n);
67 case (BCType::reflect_odd):
69 q(i,0,0,n) = -q(2*ilo-i-1,0,0,n);
78 case (BCType::foextrap):
80 q(i,0,0,n) = q(ihi,0,0,n);
83 case (BCType::hoextrap):
87 q(i,0,0,n) = q(ihi,0,0,n);
92 q(i,0,0,n) = Real(0.125)*(Real(15.)*q(i-1,0,0,n) - Real(10.)*q(i-2,0,0,n) + Real(3.)*q(i-3,0,0,n));
96 q(i,0,0,n) = Real(0.5)*(Real(3.)*q(i-1,0,0,n) - q(i-2,0,0,n));
100 case (BCType::hoextrapcc):
102 q(i,0,0,n) = Real(i-ihi)*(q(ihi,0,0,n) - q(ihi-1,0,0,n)) + q(ihi,0,0,n);
105 case (BCType::reflect_even):
107 q(i,0,0,n) = q(2*ihi-i+1,0,0,n);
110 case (BCType::reflect_odd):
112 q(i,0,0,n) = -q(2*ihi-i+1,0,0,n);
#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
Definition: AMReX_Amr.cpp:49
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE const T & max(const T &a, const T &b) noexcept
Definition: AMReX_Algorithm.H:35
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE const T & min(const T &a, const T &b) noexcept
Definition: AMReX_Algorithm.H:21
Definition: AMReX_Array4.H:61
Definition: AMReX_FilCC_1D_C.H:12
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void operator()(const IntVect &iv, Array4< Real > const &q, const int dcomp, const int numcomp, Box const &domain_box, const BCRec *bcr, const int bcomp) const noexcept
Definition: AMReX_FilCC_1D_C.H:14