walberla::blockforest::BlockID Class Reference

#include <BlockID.h>

+ Inheritance diagram for walberla::blockforest::BlockID:

Public Member Functions

 BlockID ()
 
 BlockID (const BlockID &id)
 
 BlockID (const uint_t treeIndex, const uint_t treeIdMarker)
 
 BlockID (const BlockID &id, const uint_t branchId)
 
 BlockID (const std::vector< uint8_t > &array, const uint_t offset, const uint_t bytes)
 
void init (const uint_t treeIndex, const uint_t treeIdMarker)
 
void clear ()
 
uint_t getUsedBits () const
 
uint_t getUsedBytes () const
 
uint_t getTreeId () const
 
uint_t getTreeIndex () const
 
BlockID getSuperId () const
 
BlockID getFatherId () const
 
void appendBranchId (const uint_t branchId)
 
void removeBranchId ()
 
uint_t getBranchId () const
 
bool operator< (const IBlockID &rhs) const
 
bool operator== (const IBlockID &rhs) const
 
bool operator!= (const IBlockID &rhs) const
 
IDType getID () const
 returns a somehow simplified ID which can be used in maps More...
 
std::ostream & toStream (std::ostream &os) const
 
void toByteArray (std::vector< uint8_t > &array, const uint_t offset, const uint_t bytes) const
 
template<typename Buffer_T >
void toBuffer (Buffer_T &buffer) const
 
template<typename Buffer_T >
void fromBuffer (Buffer_T &buffer)
 
- Public Member Functions inherited from walberla::domain_decomposition::IBlockID
virtual ~IBlockID ()=default
 

Private Member Functions

 WALBERLA_STATIC_ASSERT (math::UINT_BITS > 31)
 
 WALBERLA_STATIC_ASSERT (!(math::UINT_BITS &(math::UINT_BITS - 1)))
 

Private Attributes

uint_t usedBits_
 
std::vector< uint_tblocks_
 

Static Private Attributes

static const uint_t SHIFT = math::UINT_BITS - 3
 

Additional Inherited Members

- Public Types inherited from walberla::domain_decomposition::IBlockID
using IDType = uint64_t
 ID type which can be used as a key in a map. More...
 

Constructor & Destructor Documentation

◆ BlockID() [1/5]

walberla::blockforest::BlockID::BlockID ( )
inline

◆ BlockID() [2/5]

walberla::blockforest::BlockID::BlockID ( const BlockID id)
inline

◆ BlockID() [3/5]

walberla::blockforest::BlockID::BlockID ( const uint_t  treeIndex,
const uint_t  treeIdMarker 
)
inline

◆ BlockID() [4/5]

walberla::blockforest::BlockID::BlockID ( const BlockID id,
const uint_t  branchId 
)
inline

◆ BlockID() [5/5]

walberla::blockforest::BlockID::BlockID ( const std::vector< uint8_t > &  array,
const uint_t  offset,
const uint_t  bytes 
)

Member Function Documentation

◆ appendBranchId()

void walberla::blockforest::BlockID::appendBranchId ( const uint_t  branchId)

◆ clear()

void walberla::blockforest::BlockID::clear ( )
inline

◆ fromBuffer()

template<typename Buffer_T >
void walberla::blockforest::BlockID::fromBuffer ( Buffer_T &  buffer)

◆ getBranchId()

uint_t walberla::blockforest::BlockID::getBranchId ( ) const
inline

◆ getFatherId()

BlockID walberla::blockforest::BlockID::getFatherId ( ) const
inline

◆ getID()

IBlockID::IDType walberla::blockforest::BlockID::getID ( ) const
inlinevirtual

returns a somehow simplified ID which can be used in maps

Implements walberla::domain_decomposition::IBlockID.

◆ getSuperId()

BlockID walberla::blockforest::BlockID::getSuperId ( ) const
inline

◆ getTreeId()

uint_t walberla::blockforest::BlockID::getTreeId ( ) const
inline

◆ getTreeIndex()

uint_t walberla::blockforest::BlockID::getTreeIndex ( ) const
inline

◆ getUsedBits()

uint_t walberla::blockforest::BlockID::getUsedBits ( ) const
inline

◆ getUsedBytes()

uint_t walberla::blockforest::BlockID::getUsedBytes ( ) const
inline

◆ init()

void walberla::blockforest::BlockID::init ( const uint_t  treeIndex,
const uint_t  treeIdMarker 
)
inline

◆ operator!=()

bool walberla::blockforest::BlockID::operator!= ( const IBlockID rhs) const
inlinevirtual

◆ operator<()

bool walberla::blockforest::BlockID::operator< ( const IBlockID rhs) const
inlinevirtual

◆ operator==()

bool walberla::blockforest::BlockID::operator== ( const IBlockID rhs) const
inlinevirtual

◆ removeBranchId()

void walberla::blockforest::BlockID::removeBranchId ( )

◆ toBuffer()

template<typename Buffer_T >
void walberla::blockforest::BlockID::toBuffer ( Buffer_T &  buffer) const

◆ toByteArray()

void walberla::blockforest::BlockID::toByteArray ( std::vector< uint8_t > &  array,
const uint_t  offset,
const uint_t  bytes 
) const

◆ toStream()

std::ostream & walberla::blockforest::BlockID::toStream ( std::ostream &  os) const
inlinevirtual

◆ WALBERLA_STATIC_ASSERT() [1/2]

walberla::blockforest::BlockID::WALBERLA_STATIC_ASSERT ( math::UINT_BITS &(math::UINT_BITS - 1))
private

◆ WALBERLA_STATIC_ASSERT() [2/2]

walberla::blockforest::BlockID::WALBERLA_STATIC_ASSERT ( math::UINT_BITS  ,
31   
)
private

Member Data Documentation

◆ blocks_

std::vector< uint_t > walberla::blockforest::BlockID::blocks_
private

◆ SHIFT

const uint_t walberla::blockforest::BlockID::SHIFT = math::UINT_BITS - 3
staticprivate

◆ usedBits_

uint_t walberla::blockforest::BlockID::usedBits_
private

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