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

A Box with real dimensions. More...

#include <AMReX_RealBox.H>

Public Member Functions

constexpr RealBox () noexcept=default
 The default constructor. Builds invalid RealBox.
 
__host__ __device__ RealBox (const Real *a_lo, const Real *a_hi) noexcept
 Construct region given diagonal points.
 
 RealBox (const std::array< Real, 3 > &a_lo, const std::array< Real, 3 > &a_hi) noexcept
 
 RealBox (const Box &bx, const Real *dx, const Real *base) noexcept
 Construct region given index box, cell spacing and physical location of index (0,0,0).
 
__host__ __device__ RealBox (Real x0, Real y0, Real z0, Real x1, Real y1, Real z1) noexcept
 Explicit dimension specific constructors.
 
__host__ __device__ const Reallo () const &noexcept
 Returns lo side.
 
__host__ __device__ const Reallo () &&=delete
 
__host__ __device__ const Realhi () const &noexcept
 Returns hide side.
 
__host__ __device__ const Realhi () &&=delete
 
__host__ __device__ Real lo (int dir) const noexcept
 Returns length in specified direction.
 
__host__ __device__ Real hi (int dir) const noexcept
 Returns hi side in specified direction.
 
__host__ __device__ Real length (int dir) const noexcept
 Returns length in specified direction.
 
void setLo (const Real *a_lo) noexcept
 Sets lo side.
 
void setLo (const Vector< Real > &a_lo) noexcept
 Sets lo side.
 
void setLo (const RealVect &a_lo) noexcept
 Sets lo side.
 
void setLo (int dir, Real a_lo) noexcept
 Sets lo side in specified direction.
 
void setHi (const Real *a_hi) noexcept
 Sets hi side.
 
void setHi (const Vector< Real > &a_hi) noexcept
 Sets hi side.
 
void setHi (const RealVect &a_hi) noexcept
 Sets hi side.
 
void setHi (int dir, Real a_hi) noexcept
 Sets hi side in specified direction.
 
__host__ __device__ bool ok () const noexcept
 Is the RealBox OK; i.e. does it have non-negative volume?
 
__host__ __device__ Real volume () const noexcept
 
__host__ __device__ bool contains (const Real *point, Real eps=0.0) const noexcept
 Is the specified point contained in the RealBox?
 
__host__ __device__ bool contains (XDim3 point, Real eps=0.0) const noexcept
 Is the specified point contained in the RealBox?
 
__host__ __device__ bool contains (const RealVect &rv, Real eps=0.0) const noexcept
 Is the specified RealVect contained in this RealBox?
 
__host__ __device__ bool contains (const RealBox &rb, Real eps=0.0) const noexcept
 Is the specified RealBox contained in this RealBox?
 
__host__ __device__ bool intersects (const RealBox &bx) const noexcept
 Does the specified RealBox intersect with this RealBox?
 

Detailed Description

A Box with real dimensions.

A RealBox is OK iff volume >= 0.

Constructor & Destructor Documentation

◆ RealBox() [1/5]

constexpr amrex::RealBox::RealBox ( )
constexprdefaultnoexcept

The default constructor. Builds invalid RealBox.

◆ RealBox() [2/5]

__host__ __device__ amrex::RealBox::RealBox ( const Real a_lo,
const Real a_hi 
)
inlinenoexcept

Construct region given diagonal points.

◆ RealBox() [3/5]

amrex::RealBox::RealBox ( const std::array< Real, 3 > &  a_lo,
const std::array< Real, 3 > &  a_hi 
)
noexcept

◆ RealBox() [4/5]

amrex::RealBox::RealBox ( const Box bx,
const Real dx,
const Real base 
)
noexcept

Construct region given index box, cell spacing and physical location of index (0,0,0).

◆ RealBox() [5/5]

__host__ __device__ amrex::RealBox::RealBox ( Real  x0,
Real  y0,
Real  z0,
Real  x1,
Real  y1,
Real  z1 
)
inlinenoexcept

Explicit dimension specific constructors.

Member Function Documentation

◆ contains() [1/4]

__host__ __device__ bool amrex::RealBox::contains ( const Real point,
Real  eps = 0.0 
) const
inlinenoexcept

Is the specified point contained in the RealBox?

◆ contains() [2/4]

__host__ __device__ bool amrex::RealBox::contains ( const RealBox rb,
Real  eps = 0.0 
) const
inlinenoexcept

Is the specified RealBox contained in this RealBox?

◆ contains() [3/4]

__host__ __device__ bool amrex::RealBox::contains ( const RealVect rv,
Real  eps = 0.0 
) const
inlinenoexcept

Is the specified RealVect contained in this RealBox?

◆ contains() [4/4]

__host__ __device__ bool amrex::RealBox::contains ( XDim3  point,
Real  eps = 0.0 
) const
inlinenoexcept

Is the specified point contained in the RealBox?

◆ hi() [1/3]

__host__ __device__ const Real * amrex::RealBox::hi ( ) &&
delete

◆ hi() [2/3]

__host__ __device__ const Real * amrex::RealBox::hi ( ) const &
inlinenoexcept

Returns hide side.

◆ hi() [3/3]

__host__ __device__ Real amrex::RealBox::hi ( int  dir) const
inlinenoexcept

Returns hi side in specified direction.

◆ intersects()

__host__ __device__ bool amrex::RealBox::intersects ( const RealBox bx) const
inlinenoexcept

Does the specified RealBox intersect with this RealBox?

◆ length()

__host__ __device__ Real amrex::RealBox::length ( int  dir) const
inlinenoexcept

Returns length in specified direction.

◆ lo() [1/3]

__host__ __device__ const Real * amrex::RealBox::lo ( ) &&
delete

◆ lo() [2/3]

__host__ __device__ const Real * amrex::RealBox::lo ( ) const &
inlinenoexcept

Returns lo side.

◆ lo() [3/3]

__host__ __device__ Real amrex::RealBox::lo ( int  dir) const
inlinenoexcept

Returns length in specified direction.

◆ ok()

__host__ __device__ bool amrex::RealBox::ok ( ) const
inlinenoexcept

Is the RealBox OK; i.e. does it have non-negative volume?

◆ setHi() [1/4]

void amrex::RealBox::setHi ( const Real a_hi)
inlinenoexcept

Sets hi side.

◆ setHi() [2/4]

void amrex::RealBox::setHi ( const RealVect a_hi)
inlinenoexcept

Sets hi side.

◆ setHi() [3/4]

void amrex::RealBox::setHi ( const Vector< Real > &  a_hi)
inlinenoexcept

Sets hi side.

◆ setHi() [4/4]

void amrex::RealBox::setHi ( int  dir,
Real  a_hi 
)
inlinenoexcept

Sets hi side in specified direction.

◆ setLo() [1/4]

void amrex::RealBox::setLo ( const Real a_lo)
inlinenoexcept

Sets lo side.

◆ setLo() [2/4]

void amrex::RealBox::setLo ( const RealVect a_lo)
inlinenoexcept

Sets lo side.

◆ setLo() [3/4]

void amrex::RealBox::setLo ( const Vector< Real > &  a_lo)
inlinenoexcept

Sets lo side.

◆ setLo() [4/4]

void amrex::RealBox::setLo ( int  dir,
Real  a_lo 
)
inlinenoexcept

Sets lo side in specified direction.

◆ volume()

__host__ __device__ Real amrex::RealBox::volume ( ) const
inlinenoexcept

Returns the volume of the RealBox. If this RealBox is invalid, it's volume is considered to be zero.


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