4 #include <AMReX_Config.H>
30 BCRec (AMREX_D_DECL(
int loX,
int loY,
int loZ),
31 AMREX_D_DECL(
int hiX,
int hiY,
int hiZ)) noexcept
39 BCRec (
const int* a_lo,
const int* a_hi) noexcept
50 const BCRec& bc_domain) noexcept
52 const int* bxlo = bx.loVect();
53 const int* bxhi = bx.hiVect();
54 const int* dlo = domain.loVect();
55 const int* dhi = domain.hiVect();
56 for (
int dir = 0; dir < AMREX_SPACEDIM; dir++)
59 int ihi = dir+AMREX_SPACEDIM;
60 bc[ilo] = ( bxlo[dir]<=dlo[dir] ? bc_domain.bc[ilo] : BCType::int_dir );
61 bc[ihi] = ( bxhi[dir]>=dhi[dir] ? bc_domain.bc[ihi] : BCType::int_dir );
68 void setLo (
int dir,
int bc_val) noexcept {
bc[dir] = bc_val; }
73 void setHi (
int dir,
int bc_val) noexcept {
bc[AMREX_SPACEDIM+dir] = bc_val; }
80 setLo(face.coordDir(), bc_val);
82 setHi(face.coordDir(), bc_val);
89 const int*
vect () const& noexcept{
return bc; }
90 const int*
vect () && =
delete;
93 const int*
data () const& noexcept {
return bc; }
94 const int*
data () && =
delete;
100 const int*
lo () const& noexcept {
return bc; }
101 const int*
lo () && =
delete;
106 const int*
hi () const& noexcept {
return bc+AMREX_SPACEDIM; }
107 const int*
hi () && =
delete;
112 int lo (
int dir)
const noexcept {
return bc[dir]; }
117 int hi (
int dir)
const noexcept {
return bc[AMREX_SPACEDIM+dir]; }
124 for (
int i = 0; i < 2*AMREX_SPACEDIM && retval; i++)
126 retval &=
bc[i] == rhs.bc[i];
144 int bc[2*AMREX_SPACEDIM]{
AMREX_D_DECL(BCType::bogus,BCType::bogus,BCType::bogus),
145 AMREX_D_DECL(BCType::bogus,BCType::bogus,BCType::bogus)};
155 const int* bxlo = bx.loVect();
156 const int* bxhi = bx.hiVect();
157 const int* dlo = domain.loVect();
158 const int* dhi = domain.hiVect();
159 for (
int dir = 0; dir < AMREX_SPACEDIM; dir++)
161 bcr.setLo(dir, ( bxlo[dir]<=dlo[dir] ? bc_dom.lo(dir) : BCType::int_dir ));
162 bcr.setHi(dir, ( bxhi[dir]>=dhi[dir] ? bc_dom.hi(dir) : BCType::int_dir ));
175 const Vector<BCRec>& bc_dom,
176 Vector<BCRec>& bcr) noexcept;
#define AMREX_FORCE_INLINE
Definition: AMReX_Extension.H:119
#define AMREX_GPU_HOST_DEVICE
Definition: AMReX_GpuQualifiers.H:20
#define AMREX_D_DECL(a, b, c)
Definition: AMReX_SPACE.H:104
Boundary Condition Records. Necessary information and functions for computing boundary conditions.
Definition: AMReX_BCRec.H:17
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void setHi(int dir, int bc_val) noexcept
Explicitly set hi bndry value.
Definition: AMReX_BCRec.H:73
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const int * hi() const &noexcept
Return high-end boundary data.
Definition: AMReX_BCRec.H:106
const int * hi() &&=delete
const int * data() &&=delete
const int * lo() &&=delete
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const int * vect() const &noexcept
Return bndry values (used in calls to FORTRAN).
Definition: AMReX_BCRec.H:89
friend std::ostream & operator<<(std::ostream &, const BCRec &)
ASCII write to ostream.
Definition: AMReX_BCRec.cpp:35
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void setLo(int dir, int bc_val) noexcept
Definition: AMReX_BCRec.H:68
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool operator!=(const BCRec &rhs) const noexcept
Not equal test.
Definition: AMReX_BCRec.H:134
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool operator==(const BCRec &rhs) const noexcept
Equal test.
Definition: AMReX_BCRec.H:122
AMREX_GPU_HOST_DEVICE BCRec() noexcept=default
The default constructor, which does NOT set valid boundary types.
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void set(Orientation face, int bc_val) noexcept
Explicitly set bndry value for given face.
Definition: AMReX_BCRec.H:78
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const int * data() const &noexcept
Definition: AMReX_BCRec.H:93
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int lo(int dir) const noexcept
Return low-end boundary data in direction <dir>.
Definition: AMReX_BCRec.H:112
AMREX_GPU_HOST_DEVICE BCRec(const Box &bx, const Box &domain, const BCRec &bc_domain) noexcept
Definition: AMReX_BCRec.H:48
int bc[2 *AMREX_SPACEDIM]
Array of integer values describing boundary conditions.
Definition: AMReX_BCRec.H:144
const int * vect() &&=delete
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 BCRec(const int *a_lo, const int *a_hi) noexcept
Another constructor.
Definition: AMReX_BCRec.H:39
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int hi(int dir) const noexcept
Return high-end boundary data in direction <dir>.
Definition: AMReX_BCRec.H:117
Encapsulation of the Orientation of the Faces of a Box.
Definition: AMReX_Orientation.H:29
Definition: AMReX_Amr.cpp:49
BoxND< AMREX_SPACEDIM > Box
Definition: AMReX_BaseFwd.H:27
void setBC(const Box &bx, const Box &domain, int src_comp, int dest_comp, int ncomp, const Vector< BCRec > &bc_dom, Vector< BCRec > &bcr) noexcept
Function for setting array of BCs.
Definition: AMReX_BCRec.cpp:8