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

Bit-coded helper that classifies EB cells and neighbor connectivity. More...

#include <AMReX_EBCellFlag.H>

Public Member Functions

constexpr EBCellFlag () noexcept=default
 Default-construct a flag with all bits cleared (treated as regular).
 
 ~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
 Construct from a raw bit pattern.
 
constexpr EBCellFlagoperator= (uint32_t i) noexcept
 Assign a raw bit pattern to this flag.
 
__host__ __device__ EBCellFlagoperator+= (const EBCellFlag &)
 Disabled on purpose—EBCellFlag values are not additive.
 
__host__ __device__ void setRegular () noexcept
 Mark this cell as purely regular (single volume fraction, no cuts).
 
__host__ __device__ void setCovered () noexcept
 Mark the cell as completely covered (solid).
 
__host__ __device__ void setSingleValued () noexcept
 Mark the cell as single-valued (one cut)
 
__host__ __device__ void setMultiValued (int n) noexcept
 Mark the cell as multi-valued and store the number of VoFs (n).
 
__host__ __device__ bool operator== (const EBCellFlag &a_input) const noexcept
 Compare two flags for bitwise equality.
 
__host__ __device__ bool operator!= (const EBCellFlag &a_input) const noexcept
 Compare two flags for inequality.
 
__host__ __device__ int getNumVoFs () const noexcept
 Number of volume-of-fluid entries for this cell (1 for regular or single-valued, 0 for covered).
 
__host__ __device__ bool isRegular () const noexcept
 True if the stored type bits correspond to a regular cell.
 
__host__ __device__ bool isSingleValued () const noexcept
 True if the cell stores a single cut (one VoF).
 
__host__ __device__ bool isMultiValued () const noexcept
 True if the cell has multiple VoFs.
 
__host__ __device__ bool isCovered () const noexcept
 True if the cell is fully covered (solid).
 
__host__ __device__ bool isConnected (const IntVect &iv) const noexcept
 Return whether the EB cut is connected to the neighbor offset by iv.
 
__host__ __device__ bool isConnected (int i, int j, int k) const noexcept
 Return whether the EB cut connects to neighbor at offset (i,j,k).
 
__host__ __device__ bool isDisconnected (const IntVect &iv) const noexcept
 Inverse of isConnected(IntVect).
 
__host__ __device__ bool isDisconnected (int i, int j, int k) const noexcept
 Inverse of isConnected(i,j,k).
 
__host__ __device__ void setDisconnected () noexcept
 Clear all neighbor-connection bits.
 
__host__ __device__ void setDisconnected (const IntVect &iv) noexcept
 Clear connectivity to neighbor at offset iv.
 
__host__ __device__ void setDisconnected (int i, int j, int k) noexcept
 Clear connectivity to neighbor at offset (i,j,k).
 
__host__ __device__ void setConnected () noexcept
 Mark all neighbors as connected.
 
__host__ __device__ void setConnected (const IntVect &iv) noexcept
 Mark connectivity to neighbor offset by iv.
 
__host__ __device__ void setConnected (int i, int j, int k) noexcept
 Mark connectivity to neighbor at offset (i,j,k).
 
__host__ __device__ int numNeighbors () const noexcept
 Count how many neighbors are connected (including itself).
 
__host__ __device__ uint32_t getValue () const noexcept
 Raw 32-bit encoding stored in this flag.
 

Static Public Member Functions

__host__ static __device__ constexpr EBCellFlag TheDefaultCell ()
 Convenience flag representing a completely regular cell.
 
__host__ static __device__ constexpr EBCellFlag TheCoveredCell ()
 Convenience flag representing a fully covered cell.
 

Detailed Description

Bit-coded helper that classifies EB cells and neighbor connectivity.

Constructor & Destructor Documentation

◆ EBCellFlag() [1/4]

constexpr amrex::EBCellFlag::EBCellFlag ( )
constexprdefaultnoexcept

Default-construct a flag with all bits cleared (treated as regular).

◆ ~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

Construct from a raw bit pattern.

Member Function Documentation

◆ getNumVoFs()

__host__ __device__ int amrex::EBCellFlag::getNumVoFs ( ) const
inlinenoexcept

Number of volume-of-fluid entries for this cell (1 for regular or single-valued, 0 for covered).

◆ getValue()

__host__ __device__ uint32_t amrex::EBCellFlag::getValue ( ) const
inlinenoexcept

Raw 32-bit encoding stored in this flag.

◆ isConnected() [1/2]

__host__ __device__ bool amrex::EBCellFlag::isConnected ( const IntVect iv) const
inlinenoexcept

Return whether the EB cut is connected to the neighbor offset by iv.

◆ isConnected() [2/2]

__host__ __device__ bool amrex::EBCellFlag::isConnected ( int  i,
int  j,
int  k 
) const
inlinenoexcept

Return whether the EB cut connects to neighbor at offset (i,j,k).

◆ isCovered()

__host__ __device__ bool amrex::EBCellFlag::isCovered ( ) const
inlinenoexcept

True if the cell is fully covered (solid).

◆ isDisconnected() [1/2]

__host__ __device__ bool amrex::EBCellFlag::isDisconnected ( const IntVect iv) const
inlinenoexcept

Inverse of isConnected(IntVect).

◆ isDisconnected() [2/2]

__host__ __device__ bool amrex::EBCellFlag::isDisconnected ( int  i,
int  j,
int  k 
) const
inlinenoexcept

Inverse of isConnected(i,j,k).

◆ isMultiValued()

__host__ __device__ bool amrex::EBCellFlag::isMultiValued ( ) const
inlinenoexcept

True if the cell has multiple VoFs.

◆ isRegular()

__host__ __device__ bool amrex::EBCellFlag::isRegular ( ) const
inlinenoexcept

True if the stored type bits correspond to a regular cell.

◆ isSingleValued()

__host__ __device__ bool amrex::EBCellFlag::isSingleValued ( ) const
inlinenoexcept

True if the cell stores a single cut (one VoF).

◆ numNeighbors()

__host__ __device__ int amrex::EBCellFlag::numNeighbors ( ) const
inlinenoexcept

Count how many neighbors are connected (including itself).

◆ operator!=()

__host__ __device__ bool amrex::EBCellFlag::operator!= ( const EBCellFlag a_input) const
inlinenoexcept

Compare two flags for inequality.

◆ operator+=()

__host__ __device__ EBCellFlag & amrex::EBCellFlag::operator+= ( const EBCellFlag )
inline

Disabled on purpose—EBCellFlag values are not additive.

◆ 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

Assign a raw bit pattern to this flag.

◆ operator==()

__host__ __device__ bool amrex::EBCellFlag::operator== ( const EBCellFlag a_input) const
inlinenoexcept

Compare two flags for bitwise equality.

◆ setConnected() [1/3]

__host__ __device__ void amrex::EBCellFlag::setConnected ( )
inlinenoexcept

Mark all neighbors as connected.

◆ setConnected() [2/3]

__host__ __device__ void amrex::EBCellFlag::setConnected ( const IntVect iv)
inlinenoexcept

Mark connectivity to neighbor offset by iv.

◆ setConnected() [3/3]

__host__ __device__ void amrex::EBCellFlag::setConnected ( int  i,
int  j,
int  k 
)
inlinenoexcept

Mark connectivity to neighbor at offset (i,j,k).

◆ setCovered()

__host__ __device__ void amrex::EBCellFlag::setCovered ( )
inlinenoexcept

Mark the cell as completely covered (solid).

◆ setDisconnected() [1/3]

__host__ __device__ void amrex::EBCellFlag::setDisconnected ( )
inlinenoexcept

Clear all neighbor-connection bits.

◆ setDisconnected() [2/3]

__host__ __device__ void amrex::EBCellFlag::setDisconnected ( const IntVect iv)
inlinenoexcept

Clear connectivity to neighbor at offset iv.

◆ setDisconnected() [3/3]

__host__ __device__ void amrex::EBCellFlag::setDisconnected ( int  i,
int  j,
int  k 
)
inlinenoexcept

Clear connectivity to neighbor at offset (i,j,k).

◆ setMultiValued()

__host__ __device__ void amrex::EBCellFlag::setMultiValued ( int  n)
inlinenoexcept

Mark the cell as multi-valued and store the number of VoFs (n).

◆ setRegular()

__host__ __device__ void amrex::EBCellFlag::setRegular ( )
inlinenoexcept

Mark this cell as purely regular (single volume fraction, no cuts).

< clean lower bits

◆ setSingleValued()

__host__ __device__ void amrex::EBCellFlag::setSingleValued ( )
inlinenoexcept

Mark the cell as single-valued (one cut)

◆ TheCoveredCell()

__host__ static __device__ constexpr EBCellFlag amrex::EBCellFlag::TheCoveredCell ( )
inlinestaticconstexpr

Convenience flag representing a fully covered cell.

◆ TheDefaultCell()

__host__ static __device__ constexpr EBCellFlag amrex::EBCellFlag::TheDefaultCell ( )
inlinestaticconstexpr

Convenience flag representing a completely regular cell.


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