Block-Structured AMR Software Framework
amrex::EBCellFlag Class Reference

#include <AMReX_EBCellFlag.H>

Public Member Functions

constexpr EBCellFlag () noexcept=default
 
 ~EBCellFlag () noexcept=default
 
constexpr EBCellFlag (const EBCellFlag &rhs) noexcept=default
 
constexpr EBCellFlag (EBCellFlag &&rhs) noexcept=default
 
constexpr EBCellFlagoperator= (const EBCellFlag &rhs) noexcept=default
 
constexpr EBCellFlagoperator= (EBCellFlag &&rhs) noexcept=default
 
constexpr EBCellFlag (uint32_t i) noexcept
 
constexpr EBCellFlagoperator= (uint32_t i) noexcept
 
AMREX_GPU_HOST_DEVICE EBCellFlagoperator+= (const EBCellFlag &)
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void setRegular () noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void setCovered () noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void setSingleValued () noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void setMultiValued (int n) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool operator== (const EBCellFlag &a_input) const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool operator!= (const EBCellFlag &a_input) const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int getNumVoFs () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool isRegular () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool isSingleValued () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool isMultiValued () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool isCovered () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool isConnected (const IntVect &iv) const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool isConnected (int i, int j, int k) const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool isDisconnected (const IntVect &iv) const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool isDisconnected (int i, int j, int k) const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void setDisconnected () noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void setDisconnected (const IntVect &iv) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void setDisconnected (int i, int j, int k) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void setConnected () noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void setConnected (const IntVect &iv) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void setConnected (int i, int j, int k) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int numNeighbors () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE uint32_t getValue () const noexcept
 

Static Public Member Functions

AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE EBCellFlag TheDefaultCell ()
 
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE EBCellFlag TheCoveredCell ()
 

Private Attributes

uint32_t flag = default_value
 

Static Private Attributes

static constexpr uint32_t one_lower_mask = 0x1f
 masks for lowest 5 bits (i.e., bit number 0-4) More...
 
static constexpr uint32_t zero_lower_mask = ~0x1f
 
static constexpr uint32_t one_type_mask = 0x3
 masks lowest 2 bits (i.e., bit number 0-1) More...
 
static constexpr uint32_t zero_type_mask = ~0x3
 
static constexpr uint32_t one_numvofs_mask = 0x1c
 masks for bit number 2-4 More...
 
static constexpr uint32_t zero_numvofs_mask = ~0x1c
 
static constexpr uint32_t regular_bits = 0x0
 
static constexpr uint32_t single_valued_bits = 0x1
 
static constexpr uint32_t multi_valued_bits = 0x2
 
static constexpr uint32_t covered_bits = 0x3
 
static constexpr uint32_t single_vof_bits = 0x4
 this represent single vof (regular is considered as single vof too) More...
 
static constexpr int w_lower_mask = 5
 
static constexpr int w_type = 2
 
static constexpr int w_numvofs = 3
 
static constexpr int pos_numvofs = 2
 
static constexpr uint32_t default_value = 0x7fc004
 regular connected with all neighbors More...
 
static constexpr uint32_t covered_value = 0x40003
 zero out all neighbors More...
 

Constructor & Destructor Documentation

◆ EBCellFlag() [1/4]

constexpr amrex::EBCellFlag::EBCellFlag ( )
constexprdefaultnoexcept

◆ ~EBCellFlag()

amrex::EBCellFlag::~EBCellFlag ( )
defaultnoexcept

◆ EBCellFlag() [2/4]

constexpr amrex::EBCellFlag::EBCellFlag ( const EBCellFlag rhs)
constexprdefaultnoexcept

◆ EBCellFlag() [3/4]

constexpr amrex::EBCellFlag::EBCellFlag ( EBCellFlag &&  rhs)
constexprdefaultnoexcept

◆ EBCellFlag() [4/4]

constexpr amrex::EBCellFlag::EBCellFlag ( uint32_t  i)
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ getNumVoFs()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int amrex::EBCellFlag::getNumVoFs ( ) const
inlinenoexcept

◆ getValue()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE uint32_t amrex::EBCellFlag::getValue ( ) const
inlinenoexcept

◆ isConnected() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::EBCellFlag::isConnected ( const IntVect iv) const
inlinenoexcept

◆ isConnected() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::EBCellFlag::isConnected ( int  i,
int  j,
int  k 
) const
inlinenoexcept

◆ isCovered()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::EBCellFlag::isCovered ( ) const
inlinenoexcept

◆ isDisconnected() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::EBCellFlag::isDisconnected ( const IntVect iv) const
inlinenoexcept

◆ isDisconnected() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::EBCellFlag::isDisconnected ( int  i,
int  j,
int  k 
) const
inlinenoexcept

◆ isMultiValued()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::EBCellFlag::isMultiValued ( ) const
inlinenoexcept

◆ isRegular()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::EBCellFlag::isRegular ( ) const
inlinenoexcept

◆ isSingleValued()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::EBCellFlag::isSingleValued ( ) const
inlinenoexcept

◆ numNeighbors()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int amrex::EBCellFlag::numNeighbors ( ) const
inlinenoexcept

◆ operator!=()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::EBCellFlag::operator!= ( const EBCellFlag a_input) const
inlinenoexcept

◆ operator+=()

AMREX_GPU_HOST_DEVICE EBCellFlag& amrex::EBCellFlag::operator+= ( const EBCellFlag )
inline

◆ operator=() [1/3]

constexpr EBCellFlag& amrex::EBCellFlag::operator= ( const EBCellFlag rhs)
constexprdefaultnoexcept

◆ operator=() [2/3]

constexpr EBCellFlag& amrex::EBCellFlag::operator= ( EBCellFlag &&  rhs)
constexprdefaultnoexcept

◆ operator=() [3/3]

constexpr EBCellFlag& amrex::EBCellFlag::operator= ( uint32_t  i)
inlineconstexprnoexcept

◆ operator==()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::EBCellFlag::operator== ( const EBCellFlag a_input) const
inlinenoexcept

◆ setConnected() [1/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::EBCellFlag::setConnected ( )
inlinenoexcept

◆ setConnected() [2/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::EBCellFlag::setConnected ( const IntVect iv)
inlinenoexcept

◆ setConnected() [3/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::EBCellFlag::setConnected ( int  i,
int  j,
int  k 
)
inlinenoexcept

◆ setCovered()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::EBCellFlag::setCovered ( )
inlinenoexcept

◆ setDisconnected() [1/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::EBCellFlag::setDisconnected ( )
inlinenoexcept

◆ setDisconnected() [2/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::EBCellFlag::setDisconnected ( const IntVect iv)
inlinenoexcept

◆ setDisconnected() [3/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::EBCellFlag::setDisconnected ( int  i,
int  j,
int  k 
)
inlinenoexcept

◆ setMultiValued()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::EBCellFlag::setMultiValued ( int  n)
inlinenoexcept

◆ setRegular()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::EBCellFlag::setRegular ( )
inlinenoexcept

< clean lower bits

◆ setSingleValued()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::EBCellFlag::setSingleValued ( )
inlinenoexcept

◆ TheCoveredCell()

AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE EBCellFlag amrex::EBCellFlag::TheCoveredCell ( )
inlinestaticconstexpr

◆ TheDefaultCell()

AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE EBCellFlag amrex::EBCellFlag::TheDefaultCell ( )
inlinestaticconstexpr

Member Data Documentation

◆ covered_bits

constexpr uint32_t amrex::EBCellFlag::covered_bits = 0x3
staticconstexprprivate

◆ covered_value

constexpr uint32_t amrex::EBCellFlag::covered_value = 0x40003
staticconstexprprivate

zero out all neighbors

◆ default_value

constexpr uint32_t amrex::EBCellFlag::default_value = 0x7fc004
staticconstexprprivate

regular connected with all neighbors

zero out "3d" neighbors

◆ flag

uint32_t amrex::EBCellFlag::flag = default_value
private

◆ multi_valued_bits

constexpr uint32_t amrex::EBCellFlag::multi_valued_bits = 0x2
staticconstexprprivate

◆ one_lower_mask

constexpr uint32_t amrex::EBCellFlag::one_lower_mask = 0x1f
staticconstexprprivate

masks for lowest 5 bits (i.e., bit number 0-4)

◆ one_numvofs_mask

constexpr uint32_t amrex::EBCellFlag::one_numvofs_mask = 0x1c
staticconstexprprivate

masks for bit number 2-4

◆ one_type_mask

constexpr uint32_t amrex::EBCellFlag::one_type_mask = 0x3
staticconstexprprivate

masks lowest 2 bits (i.e., bit number 0-1)

◆ pos_numvofs

constexpr int amrex::EBCellFlag::pos_numvofs = 2
staticconstexprprivate

◆ regular_bits

constexpr uint32_t amrex::EBCellFlag::regular_bits = 0x0
staticconstexprprivate

these represent cell types note that single-valued means single-value cut cell

◆ single_valued_bits

constexpr uint32_t amrex::EBCellFlag::single_valued_bits = 0x1
staticconstexprprivate

◆ single_vof_bits

constexpr uint32_t amrex::EBCellFlag::single_vof_bits = 0x4
staticconstexprprivate

this represent single vof (regular is considered as single vof too)

◆ w_lower_mask

constexpr int amrex::EBCellFlag::w_lower_mask = 5
staticconstexprprivate

There are 32 bits. The lowest 2 bits are used for cell type: regular, single-valued, multi-valued, and covered. The next 3 bits are for the number of vofs. The rest 27 bits are used for connectivity with neighbors.

◆ w_numvofs

constexpr int amrex::EBCellFlag::w_numvofs = 3
staticconstexprprivate

◆ w_type

constexpr int amrex::EBCellFlag::w_type = 2
staticconstexprprivate

◆ zero_lower_mask

constexpr uint32_t amrex::EBCellFlag::zero_lower_mask = ~0x1f
staticconstexprprivate

◆ zero_numvofs_mask

constexpr uint32_t amrex::EBCellFlag::zero_numvofs_mask = ~0x1c
staticconstexprprivate

◆ zero_type_mask

constexpr uint32_t amrex::EBCellFlag::zero_type_mask = ~0x3
staticconstexprprivate

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