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

Given a shape value, we can get the Shape::id() that is used internally. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/bump/views/UnstructuredTopologyMixedShapeView.hpp>

Public Member Functions

AXOM_HOST_DEVICE ShapeMap ()
 Constructor. More...
 
AXOM_HOST_DEVICE ShapeMap (const axom::ArrayView< IndexType > &shape_values, const axom::ArrayView< IndexType > &shape_ids)
 Constructor. More...
 
AXOM_HOST_DEVICE IndexType size () const
 Return the size of the shape map. More...
 
AXOM_HOST_DEVICE bool empty () const
 Return whether the shape map is empty. More...
 
AXOM_HOST_DEVICE IndexType operator[] (IndexType value) const
 Given a shape value (as in the Conduit shapes array), return the shape id. More...
 

Detailed Description

Given a shape value, we can get the Shape::id() that is used internally.

Note
If the view was to renumber the shapes array to use the Shape::id() values then operator[] could return its input value and skip binary_search.

Constructor & Destructor Documentation

◆ ShapeMap() [1/2]

AXOM_HOST_DEVICE axom::bump::views::ShapeMap::ShapeMap ( )
inline

Constructor.

◆ ShapeMap() [2/2]

AXOM_HOST_DEVICE axom::bump::views::ShapeMap::ShapeMap ( const axom::ArrayView< IndexType > &  shape_values,
const axom::ArrayView< IndexType > &  shape_ids 
)
inline

Constructor.

Parameters
shape_valuesA view of sorted values used in the Conduit data.
shape_idsA view of shape ids that correspond to the values from Conduit.

Member Function Documentation

◆ size()

AXOM_HOST_DEVICE IndexType axom::bump::views::ShapeMap::size ( ) const
inline

Return the size of the shape map.

Returns
The number of entries in the shape map.

References axom::ArrayView< T, DIM, SPACE >::size().

◆ empty()

AXOM_HOST_DEVICE bool axom::bump::views::ShapeMap::empty ( ) const
inline

Return whether the shape map is empty.

Returns
True if the map is empty; False otherwise.

References axom::ArrayView< T, DIM, SPACE >::empty().

◆ operator[]()

AXOM_HOST_DEVICE IndexType axom::bump::views::ShapeMap::operator[] ( IndexType  value) const
inline

Given a shape value (as in the Conduit shapes array), return the shape id.

Parameters
valueA value from the shapes array that we want to map to a shape id.
Returns
A shape id.

References axom::utilities::binary_search().


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