AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::spin::BlockData Class Reference

Minimal implementation of a BlockDataType for an OctreeBase. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/latest/src/axom/spin/OctreeBase.hpp>

Public Member Functions

 BlockData ()
 
 BlockData (const BlockData &other)
 
BlockDataoperator= (const BlockData &other)
 
bool isLeaf () const
 Predicate to determine if this BlockData represents a leaf block in the tree. More...
 
void setData (int blockID)
 Sets the data associated with this block. More...
 
void setNonBlock ()
 
bool isBlock () const
 
int getID () const
 
const int & dataIndex () const
 
void setInternal ()
 Sets the block type to internal. More...
 

Protected Attributes

int m_id
 

Friends

bool operator== (const BlockData &lhs, const BlockData &rhs)
 

Detailed Description

Minimal implementation of a BlockDataType for an OctreeBase.

BlockData is default constructible and provides the following functions: isLeaf(), setInternal(), setNonBlock() and isBlock().

Note
This implementation uses ones-complement to differentiate between leaf and internal blocks. This has the nice properties that (a) all internal LeafData have an id with a negative number, (b) all BlockDatas – representing leaf and internal blocks can live in the same index space.

Constructor & Destructor Documentation

◆ BlockData() [1/2]

axom::spin::BlockData::BlockData ( )
inline

References m_id.

◆ BlockData() [2/2]

axom::spin::BlockData::BlockData ( const BlockData other)
inline

Member Function Documentation

◆ operator=()

BlockData& axom::spin::BlockData::operator= ( const BlockData other)
inline

References m_id.

◆ isLeaf()

bool axom::spin::BlockData::isLeaf ( ) const
inline

Predicate to determine if this BlockData represents a leaf block in the tree.

References m_id.

◆ setData()

void axom::spin::BlockData::setData ( int  blockID)
inline

Sets the data associated with this block.

References m_id.

◆ setNonBlock()

void axom::spin::BlockData::setNonBlock ( )
inline

Marks the block as not in the octree

References m_id.

◆ isBlock()

bool axom::spin::BlockData::isBlock ( ) const
inline

Predicate to check if the associated block is in the octree

References m_id.

◆ getID()

int axom::spin::BlockData::getID ( ) const
inline

Returns the normalized form of the id for this BlockData instance

Note
The normalized form is a non-negative integer.

References isLeaf(), and m_id.

◆ dataIndex()

const int& axom::spin::BlockData::dataIndex ( ) const
inline

References m_id.

◆ setInternal()

void axom::spin::BlockData::setInternal ( )
inline

Sets the block type to internal.

References isLeaf(), and m_id.

Friends And Related Function Documentation

◆ operator==

bool operator== ( const BlockData lhs,
const BlockData rhs 
)
friend

Equality operator for comparing two BlockData instances

Member Data Documentation

◆ m_id

int axom::spin::BlockData::m_id
protected

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