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

Compact BlockDataType for an InOutOctree. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.5.0/src/axom/quest/InOutOctree.hpp>

Public Types

enum  LeafColor { Undetermined = -2, White = -1, Gray = 0, Black = 1 }
 

Public Member Functions

 InOutBlockData ()
 Default constructor for an InOutBlockData. More...
 
 InOutBlockData (int dataIdx)
 Constructor from a given index. More...
 
 InOutBlockData (const InOutBlockData &other)
 Copy constructor for an InOutBlockData instance. More...
 
InOutBlockDataoperator= (const InOutBlockData &other)
 Assignment operator for an InOutBlockData instance. More...
 
bool isLeaf () const
 Predicate to determine if the associated block is a leaf. More...
 
void setInternal ()
 Marks the associated block as internal. More...
 
void setNonBlock ()
 Marks the associated block as a non-block (i.e. not in the tree) More...
 
bool isBlock () const
 Predicate to determine if the associated block is in the tree. More...
 
void clear ()
 
bool hasData () const
 
const int & dataIndex () const
 
void setGray (int idx)
 Sets the block as gray, and provides index of its associated data. More...
 
void setBlack ()
 
void setWhite ()
 
void setData (int idx)
 
void setUncoloredLeaf ()
 
LeafColor color () const
 Find the 'color' of this LeafBlock. More...
 
bool isColored () const
 

Friends

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

Detailed Description

Compact BlockDataType for an InOutOctree.

Storage requirement is one integer per block to hold the color of a block and for gray block, the index of the associated triangles

Member Enumeration Documentation

◆ LeafColor

Enumerator
Undetermined 
White 
Gray 
Black 

Constructor & Destructor Documentation

◆ InOutBlockData() [1/3]

axom::quest::InOutBlockData::InOutBlockData ( )
inline

Default constructor for an InOutBlockData.

Note
Default constructed instances are assumed to be leaf blocks

◆ InOutBlockData() [2/3]

axom::quest::InOutBlockData::InOutBlockData ( int  dataIdx)
inlineexplicit

Constructor from a given index.

◆ InOutBlockData() [3/3]

axom::quest::InOutBlockData::InOutBlockData ( const InOutBlockData other)
inline

Copy constructor for an InOutBlockData instance.

Member Function Documentation

◆ operator=()

InOutBlockData& axom::quest::InOutBlockData::operator= ( const InOutBlockData other)
inline

Assignment operator for an InOutBlockData instance.

◆ isLeaf()

bool axom::quest::InOutBlockData::isLeaf ( ) const
inline

◆ setInternal()

void axom::quest::InOutBlockData::setInternal ( )
inline

Marks the associated block as internal.

Referenced by axom::quest::InOutOctree< DIM >::generateIndex().

◆ setNonBlock()

void axom::quest::InOutBlockData::setNonBlock ( )
inline

Marks the associated block as a non-block (i.e. not in the tree)

◆ isBlock()

bool axom::quest::InOutBlockData::isBlock ( ) const
inline

Predicate to determine if the associated block is in the tree.

Returns
True, if the block is in the tree (internal or leaf), False otherwise

◆ clear()

void axom::quest::InOutBlockData::clear ( )
inline

Clears the data associated with the block

Note
This function is currently a no-op

Referenced by axom::quest::InOutOctree< DIM >::generateIndex().

◆ hasData()

◆ dataIndex()

const int& axom::quest::InOutBlockData::dataIndex ( ) const
inline

Returns the index of the data associated with the block

Referenced by axom::quest::InOutOctree< DIM >::generateIndex(), and axom::quest::operator<<().

◆ setGray()

void axom::quest::InOutBlockData::setGray ( int  idx)
inline

Sets the block as gray, and provides index of its associated data.

Parameters
idxThe index of the data associated with the gray leaf block
Precondition
The block must be a leaf block
The passed in index, idx, must be a non-negative integer

References SLIC_ASSERT.

◆ setBlack()

void axom::quest::InOutBlockData::setBlack ( )
inline

Marks the block as Black (the entire domain is inside the surface)

References SLIC_ASSERT.

Referenced by axom::quest::InOutOctree< DIM >::generateIndex().

◆ setWhite()

void axom::quest::InOutBlockData::setWhite ( )
inline

Marks the block as Black (the entire domain is outside the surface)

References SLIC_ASSERT.

Referenced by axom::quest::InOutOctree< DIM >::generateIndex().

◆ setData()

void axom::quest::InOutBlockData::setData ( int  idx)
inline

Sets the data associated with the block to the given index idx

Referenced by axom::quest::InOutOctree< DIM >::generateIndex().

◆ setUncoloredLeaf()

void axom::quest::InOutBlockData::setUncoloredLeaf ( )
inline

Marks the block as uncolored

References SLIC_ASSERT.

◆ color()

LeafColor axom::quest::InOutBlockData::color ( ) const
inline

Find the 'color' of this LeafBlock.

'Black' indicates that the entire block is within the surface 'White' indicates that the entire block is outside the surface 'Gray' indicates that the block intersects the surface geometry Leaves that haven't been colored yet are 'Undetermined'

References SLIC_ASSERT_MSG.

Referenced by axom::quest::detail::InOutOctreeValidator< DIM >::checkNeighboringBlockColors(), axom::quest::detail::InOutOctreeMeshDumper< DIM >::dumpDifferentColoredNeighborsMeshVTK(), axom::quest::detail::InOutOctreeMeshDumper< DIM >::dumpTriMeshVTK(), axom::quest::InOutOctree< DIM >::generateIndex(), axom::quest::detail::InOutOctreeStats< DIM >::InOutOctreeStats(), axom::quest::operator<<(), and axom::quest::InOutOctree< DIM >::within().

◆ isColored()

bool axom::quest::InOutBlockData::isColored ( ) const
inline

Predicate to determine if the associated block has a color

Returns
True if the block has a color, false otherwise
See also
color()

Referenced by axom::quest::InOutOctree< DIM >::generateIndex().

Friends And Related Function Documentation

◆ operator==

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

Friend function to compare equality of two InOutBlockData instances


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