1#ifndef AMREX_EBCELLFLAG_H_
2#define AMREX_EBCELLFLAG_H_
3#include <AMReX_Config.H>
67 return (
flag == (a_input.flag));
73 return (
flag != (a_input.flag));
107 return flag & (1 << n);
113 return flag & (1 << n);
121 return !(
flag & (1 << n));
127 return !(
flag & (1 << n));
181#if (AMREX_SPACEDIM == 3)
258 static constexpr std::array<std::array<std::array<int,3>,3>,3> pos_ngbr
271#if AMREX_SPACEDIM == 3
298 Arena* ar =
nullptr);
#define AMREX_ASSERT(EX)
Definition AMReX_BLassert.H:38
#define AMREX_FORCE_INLINE
Definition AMReX_Extension.H:119
#define AMREX_GPU_HOST_DEVICE
Definition AMReX_GpuQualifiers.H:20
#define AMREX_D_TERM(a, b, c)
Definition AMReX_SPACE.H:172
A virtual base class for objects that manage their own dynamic memory allocation.
Definition AMReX_Arena.H:105
A FortranArrayBox(FAB)-like object.
Definition AMReX_BaseFab.H:183
Definition AMReX_EBCellFlag.H:287
int getNumRegularCells(const Box &bx) const noexcept
Returns the number of regular cells in the given Box.
Definition AMReX_EBCellFlag.cpp:147
~EBCellFlagFab() override=default
void setType(FabType t) noexcept
Definition AMReX_EBCellFlag.H:340
void resetType(int ng)
Reset FabType.
Definition AMReX_EBCellFlag.cpp:132
FabType m_type
Definition AMReX_EBCellFlag.H:351
std::map< Box, NumCells > m_typemap
Definition AMReX_EBCellFlag.H:352
EBCellFlagFab & operator=(const EBCellFlagFab &)=delete
EBCellFlagFab(EBCellFlagFab &&rhs)=default
int getNumCutCells(const Box &bx) const noexcept
Returns the number of cut cells in the given Box.
Definition AMReX_EBCellFlag.cpp:188
int getNumCoveredCells(const Box &bx) const noexcept
Returns the number of covered cells in the given Box.
Definition AMReX_EBCellFlag.cpp:226
FabType getType() const noexcept
Returns FabType of the whole EBCellFlagFab.
Definition AMReX_EBCellFlag.H:313
EBCellFlagFab(const EBCellFlagFab &)=delete
Definition AMReX_EBCellFlag.H:17
__host__ __device__ bool isConnected(int i, int j, int k) const noexcept
Definition AMReX_EBCellFlag.H:111
__host__ __device__ void setDisconnected(int i, int j, int k) noexcept
Definition AMReX_EBCellFlag.H:144
__host__ __device__ int getNumVoFs() const noexcept
Definition AMReX_EBCellFlag.H:77
static constexpr int w_numvofs
Definition AMReX_EBCellFlag.H:255
__host__ __device__ void setMultiValued(int n) noexcept
Definition AMReX_EBCellFlag.H:57
__host__ __device__ void setCovered() noexcept
Definition AMReX_EBCellFlag.H:45
static constexpr uint32_t zero_lower_mask
Definition AMReX_EBCellFlag.H:228
__host__ __device__ void setConnected() noexcept
Definition AMReX_EBCellFlag.H:150
__host__ __device__ void setSingleValued() noexcept
Definition AMReX_EBCellFlag.H:50
static constexpr int pos_numvofs
Definition AMReX_EBCellFlag.H:256
__host__ __device__ EBCellFlag & operator+=(const EBCellFlag &)
Definition AMReX_EBCellFlag.H:32
static constexpr uint32_t one_type_mask
masks lowest 2 bits (i.e., bit number 0-1)
Definition AMReX_EBCellFlag.H:231
static constexpr uint32_t covered_value
zero out all neighbors
Definition AMReX_EBCellFlag.H:277
static constexpr uint32_t one_numvofs_mask
masks for bit number 2-4
Definition AMReX_EBCellFlag.H:235
__host__ __device__ void setConnected(const IntVect &iv) noexcept
Definition AMReX_EBCellFlag.H:155
__host__ __device__ int numNeighbors() const noexcept
Definition AMReX_EBCellFlag.H:169
static constexpr uint32_t zero_numvofs_mask
Definition AMReX_EBCellFlag.H:236
static constexpr int w_type
Definition AMReX_EBCellFlag.H:254
__host__ __device__ void setDisconnected(const IntVect &iv) noexcept
Definition AMReX_EBCellFlag.H:136
__host__ __device__ void setDisconnected() noexcept
Definition AMReX_EBCellFlag.H:131
__host__ __device__ void setRegular() noexcept
Definition AMReX_EBCellFlag.H:38
constexpr EBCellFlag() noexcept=default
static constexpr uint32_t single_vof_bits
this represent single vof (regular is considered as single vof too)
Definition AMReX_EBCellFlag.H:246
static constexpr uint32_t multi_valued_bits
Definition AMReX_EBCellFlag.H:242
static constexpr uint32_t default_value
regular connected with all neighbors
Definition AMReX_EBCellFlag.H:272
static constexpr uint32_t regular_bits
Definition AMReX_EBCellFlag.H:240
static constexpr int w_lower_mask
Definition AMReX_EBCellFlag.H:253
__host__ __device__ bool isSingleValued() const noexcept
Definition AMReX_EBCellFlag.H:88
__host__ __device__ bool isDisconnected(int i, int j, int k) const noexcept
Definition AMReX_EBCellFlag.H:125
__host__ __device__ bool operator!=(const EBCellFlag &a_input) const noexcept
Definition AMReX_EBCellFlag.H:71
__host__ __device__ bool isCovered() const noexcept
Definition AMReX_EBCellFlag.H:98
uint32_t flag
Definition AMReX_EBCellFlag.H:279
__host__ __device__ bool isDisconnected(const IntVect &iv) const noexcept
Definition AMReX_EBCellFlag.H:117
static constexpr uint32_t one_lower_mask
masks for lowest 5 bits (i.e., bit number 0-4)
Definition AMReX_EBCellFlag.H:227
__host__ __device__ bool operator==(const EBCellFlag &a_input) const noexcept
Definition AMReX_EBCellFlag.H:65
static constexpr uint32_t zero_type_mask
Definition AMReX_EBCellFlag.H:232
__host__ __device__ bool isConnected(const IntVect &iv) const noexcept
Definition AMReX_EBCellFlag.H:103
__host__ static __device__ constexpr EBCellFlag TheDefaultCell()
Definition AMReX_EBCellFlag.H:216
static constexpr uint32_t single_valued_bits
Definition AMReX_EBCellFlag.H:241
__host__ __device__ bool isMultiValued() const noexcept
Definition AMReX_EBCellFlag.H:93
static constexpr uint32_t covered_bits
Definition AMReX_EBCellFlag.H:243
__host__ __device__ void setConnected(int i, int j, int k) noexcept
Definition AMReX_EBCellFlag.H:163
__host__ static __device__ constexpr EBCellFlag TheCoveredCell()
Definition AMReX_EBCellFlag.H:222
__host__ __device__ bool isRegular() const noexcept
Definition AMReX_EBCellFlag.H:83
constexpr EBCellFlag & operator=(const EBCellFlag &rhs) noexcept=default
__host__ __device__ uint32_t getValue() const noexcept
Definition AMReX_EBCellFlag.H:210
Definition AMReX_Amr.cpp:49
MakeType
Definition AMReX_MakeType.H:7
FabType
Definition AMReX_FabFactory.H:18
void Abort(const std::string &msg)
Print out message to cerr and exit via abort().
Definition AMReX.cpp:230
std::ostream & operator<<(std::ostream &os, AmrMesh const &amr_mesh)
Definition AMReX_AmrMesh.cpp:1236
void * alloc(std::size_t sz) const noexcept
Definition AMReX_DataAllocator.H:16
Definition AMReX_EBCellFlag.H:342
FabType type
Definition AMReX_EBCellFlag.H:347
int nmulti
Definition AMReX_EBCellFlag.H:345
int nsingle
Definition AMReX_EBCellFlag.H:344
int ncovered
Definition AMReX_EBCellFlag.H:346
int nregular
Definition AMReX_EBCellFlag.H:343
Definition AMReX_TypeTraits.H:274