Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::BCRec Class Reference

Boundary condition record storing low/high face types per coordinate. More...

#include <AMReX_BCRec.H>

Public Member Functions

__host__ __device__ BCRec () noexcept=default
 Default constructor leaves all face types set to BCType::bogus.
 
__host__ __device__ BCRec (int loX, int loY, int loZ, int hiX, int hiY, int hiZ) noexcept
 Construct a record with explicit low/high face types.
 
__host__ __device__ BCRec (const int *a_lo, const int *a_hi) noexcept
 Construct from arrays of low/high face types.
 
__host__ __device__ BCRec (const Box &bx, const Box &domain, const BCRec &bc_domain) noexcept
 Initialize boundary faces relative to a domain record.
 
__host__ __device__ void setLo (int dir, int bc_val) noexcept
 Set the low-face boundary for dimension dir.
 
__host__ __device__ void setHi (int dir, int bc_val) noexcept
 Set the high-face boundary for dimension dir.
 
__host__ __device__ void set (Orientation face, int bc_val) noexcept
 Explicitly set the boundary value for a given face.
 
__host__ __device__ const intvect () const &noexcept
 Return pointer to the internal boundary array (low faces, then high faces). Legacy name for Fortran callback compatibility.
 
const intvect () &&=delete
 
__host__ __device__ const intdata () const &noexcept
 Equivalent to vect(); returns the same pointer to the internal boundary array.
 
const intdata () &&=delete
 
__host__ __device__ const intlo () const &noexcept
 Return pointer to the low-end face array.
 
const intlo () &&=delete
 
__host__ __device__ const inthi () const &noexcept
 Return pointer to the high-end face array.
 
const inthi () &&=delete
 
__host__ __device__ int lo (int dir) const noexcept
 Return the low-end boundary code for dimension dir.
 
__host__ __device__ int hi (int dir) const noexcept
 Return the high-end boundary code for dimension dir.
 
__host__ __device__ bool operator== (const BCRec &rhs) const noexcept
 Compare two records for identical boundary condition values.
 
__host__ __device__ bool operator!= (const BCRec &rhs) const noexcept
 Logical negation of operator==.
 

Friends

std::ostream & operator<< (std::ostream &, const BCRec &)
 ASCII write to ostream.
 

Detailed Description

Boundary condition record storing low/high face types per coordinate.

BCRec has standard layout — this is a deliberate design constraint that must be preserved for compatibility with Fortran code, host/device transfers, and std::memcpy-based operations.

Constructor & Destructor Documentation

◆ BCRec() [1/4]

__host__ __device__ amrex::BCRec::BCRec ( )
defaultnoexcept

Default constructor leaves all face types set to BCType::bogus.

◆ BCRec() [2/4]

__host__ __device__ amrex::BCRec::BCRec ( int  loX,
int  loY,
int  loZ,
int  hiX,
int  hiY,
int  hiZ 
)
inlinenoexcept

Construct a record with explicit low/high face types.

The low-face values are provided first, followed by the high-face values.

Parameters
loXLow-face boundary type in the x direction.
loYLow-face boundary type in the y direction (used when AMREX_SPACEDIM >= 2).
loZLow-face boundary type in the z direction (used when AMREX_SPACEDIM >= 3).
hiXHigh-face boundary type in the x direction.
hiYHigh-face boundary type in the y direction (used when AMREX_SPACEDIM >= 2).
hiZHigh-face boundary type in the z direction (used when AMREX_SPACEDIM >= 3).

◆ BCRec() [3/4]

__host__ __device__ amrex::BCRec::BCRec ( const int a_lo,
const int a_hi 
)
inlinenoexcept

Construct from arrays of low/high face types.

Parameters
a_loPointer to AMREX_SPACEDIM low-face entries.
a_hiPointer to AMREX_SPACEDIM high-face entries.

◆ BCRec() [4/4]

__host__ __device__ amrex::BCRec::BCRec ( const Box bx,
const Box domain,
const BCRec bc_domain 
)
inlinenoexcept

Initialize boundary faces relative to a domain record.

Faces coincident with the domain inherit the boundary from bc_domain; interior faces default to BCType::int_dir.

Parameters
bxBox whose faces inherit domain or interior boundaries.
domainDomain box describing the physical region.
bc_domainBoundary record providing domain face types.

Member Function Documentation

◆ data() [1/2]

const int * amrex::BCRec::data ( ) &&
delete

◆ data() [2/2]

__host__ __device__ const int * amrex::BCRec::data ( ) const &
inlinenoexcept

Equivalent to vect(); returns the same pointer to the internal boundary array.

◆ hi() [1/3]

const int * amrex::BCRec::hi ( ) &&
delete

◆ hi() [2/3]

__host__ __device__ const int * amrex::BCRec::hi ( ) const &
inlinenoexcept

Return pointer to the high-end face array.

◆ hi() [3/3]

__host__ __device__ int amrex::BCRec::hi ( int  dir) const
inlinenoexcept

Return the high-end boundary code for dimension dir.

◆ lo() [1/3]

const int * amrex::BCRec::lo ( ) &&
delete

◆ lo() [2/3]

__host__ __device__ const int * amrex::BCRec::lo ( ) const &
inlinenoexcept

Return pointer to the low-end face array.

◆ lo() [3/3]

__host__ __device__ int amrex::BCRec::lo ( int  dir) const
inlinenoexcept

Return the low-end boundary code for dimension dir.

◆ operator!=()

__host__ __device__ bool amrex::BCRec::operator!= ( const BCRec rhs) const
inlinenoexcept

Logical negation of operator==.

◆ operator==()

__host__ __device__ bool amrex::BCRec::operator== ( const BCRec rhs) const
inlinenoexcept

Compare two records for identical boundary condition values.

◆ set()

__host__ __device__ void amrex::BCRec::set ( Orientation  face,
int  bc_val 
)
inlinenoexcept

Explicitly set the boundary value for a given face.

Parameters
faceOrientation describing the face.
bc_valBoundary type code.

◆ setHi()

__host__ __device__ void amrex::BCRec::setHi ( int  dir,
int  bc_val 
)
inlinenoexcept

Set the high-face boundary for dimension dir.

Parameters
dirCoordinate direction.
bc_valBoundary type code.

◆ setLo()

__host__ __device__ void amrex::BCRec::setLo ( int  dir,
int  bc_val 
)
inlinenoexcept

Set the low-face boundary for dimension dir.

Parameters
dirCoordinate direction.
bc_valBoundary type code.

◆ vect() [1/2]

const int * amrex::BCRec::vect ( ) &&
delete

◆ vect() [2/2]

__host__ __device__ const int * amrex::BCRec::vect ( ) const &
inlinenoexcept

Return pointer to the internal boundary array (low faces, then high faces). Legacy name for Fortran callback compatibility.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const BCRec b 
)
friend

ASCII write to ostream.


The documentation for this class was generated from the following file: