AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::bump::ZoneListBuilder< ExecSpace, TopologyView, MatsetView > Class Template Reference

This struct builds lists of clean and mixed zones using the input topology and matset views. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/main/src/axom/bump/ZoneListBuilder.hpp>

Public Types

using SelectedZonesView = axom::ArrayView< axom::IndexType >
 
using ZoneType = typename TopologyView::ShapeType
 

Public Member Functions

 ZoneListBuilder (const TopologyView &topoView, const MatsetView &matsetView)
 Constructor. More...
 
void setAllocatorID (int allocator_id)
 Set the allocator id to use when allocating memory. More...
 
int getAllocatorID () const
 Get the allocator id to use when allocating memory. More...
 
void execute (axom::IndexType nnodes, axom::Array< axom::IndexType > &cleanIndices, axom::Array< axom::IndexType > &mixedIndices) const
 Build the list of clean and mixed zones using the number of materials per zone, maxed to the nodes. More...
 
void execute (axom::IndexType nnodes, const SelectedZonesView selectedZonesView, axom::Array< axom::IndexType > &cleanIndices, axom::Array< axom::IndexType > &mixedIndices) const
 Build the list of clean and mixed zones using the number of materials per zone, maxed to the nodes. Limit the number of zones. More...
 
void execute (const SelectedZonesView selectedZonesView, axom::Array< axom::IndexType > &cleanIndices, axom::Array< axom::IndexType > &mixedIndices) const
 Build the list of clean and mixed zones using the number of materials per zone. This method essentially partitions the input selectedZonesView into clean and mixed lists. More...
 

Detailed Description

template<typename ExecSpace, typename TopologyView, typename MatsetView>
class axom::bump::ZoneListBuilder< ExecSpace, TopologyView, MatsetView >

This struct builds lists of clean and mixed zones using the input topology and matset views.

Template Parameters
ExecSpaceThe execution space where the algorithm will run.
TopologyViewThe topology view type on which the algorithm will run.
MatsetViewThe matset view type on which the algorithm will run.

Member Typedef Documentation

◆ SelectedZonesView

template<typename ExecSpace , typename TopologyView , typename MatsetView >
using axom::bump::ZoneListBuilder< ExecSpace, TopologyView, MatsetView >::SelectedZonesView = axom::ArrayView<axom::IndexType>

◆ ZoneType

template<typename ExecSpace , typename TopologyView , typename MatsetView >
using axom::bump::ZoneListBuilder< ExecSpace, TopologyView, MatsetView >::ZoneType = typename TopologyView::ShapeType

Constructor & Destructor Documentation

◆ ZoneListBuilder()

template<typename ExecSpace , typename TopologyView , typename MatsetView >
axom::bump::ZoneListBuilder< ExecSpace, TopologyView, MatsetView >::ZoneListBuilder ( const TopologyView &  topoView,
const MatsetView &  matsetView 
)
inline

Constructor.

Parameters
topoViewThe topology view to use for creating the zone lists.
matsetViewThe matset view to use for creating the zone lists.

Member Function Documentation

◆ setAllocatorID()

template<typename ExecSpace , typename TopologyView , typename MatsetView >
void axom::bump::ZoneListBuilder< ExecSpace, TopologyView, MatsetView >::setAllocatorID ( int  allocator_id)
inline

Set the allocator id to use when allocating memory.

Parameters
allocator_idThe allocator id to use when allocating memory.

References axom::isValidAllocatorID(), and SLIC_ERROR_IF.

◆ getAllocatorID()

template<typename ExecSpace , typename TopologyView , typename MatsetView >
int axom::bump::ZoneListBuilder< ExecSpace, TopologyView, MatsetView >::getAllocatorID ( ) const
inline

Get the allocator id to use when allocating memory.

Returns
The allocator id to use when allocating memory.

◆ execute() [1/3]

template<typename ExecSpace , typename TopologyView , typename MatsetView >
void axom::bump::ZoneListBuilder< ExecSpace, TopologyView, MatsetView >::execute ( axom::IndexType  nnodes,
axom::Array< axom::IndexType > &  cleanIndices,
axom::Array< axom::IndexType > &  mixedIndices 
) const
inline

Build the list of clean and mixed zones using the number of materials per zone, maxed to the nodes.

Parameters
nnodesThe number of nodes in the topology's coordset.
[out]cleanIndicesAn array that will contain the list of clean material zone ids.
[out]mixedIndicesAn array that will contain the list of mixed material zone ids.
Note
The clean/mixed index arrays are not strictly what could be determined by the matset alone. We figure out which nodes touch multiple materials. Then we iterate over the zones and those that touch only nodes that have 1 material are marked clean, otherwise they are considered mixed as we might have to split those zones.

References AXOM_ANNOTATE_BEGIN, AXOM_ANNOTATE_END, AXOM_ANNOTATE_SCOPE, AXOM_LAMBDA, axom::Array< T, DIM, SPACE, StoragePolicy >::empty(), axom::serial::reductions::ReduceSum< ExecSpace, T >::get(), axom::bump::ZoneListBuilder< ExecSpace, TopologyView, MatsetView >::getAllocatorID(), and axom::Array< T, DIM, SPACE, StoragePolicy >::view().

◆ execute() [2/3]

template<typename ExecSpace , typename TopologyView , typename MatsetView >
void axom::bump::ZoneListBuilder< ExecSpace, TopologyView, MatsetView >::execute ( axom::IndexType  nnodes,
const SelectedZonesView  selectedZonesView,
axom::Array< axom::IndexType > &  cleanIndices,
axom::Array< axom::IndexType > &  mixedIndices 
) const
inline

Build the list of clean and mixed zones using the number of materials per zone, maxed to the nodes. Limit the number of zones.

Parameters
nnodesThe number of nodes in the topology's coordset.
selectedZonesViewA view containing the zone indices we're considering. We pass it by value so it can be captured into lambdas.
[out]cleanIndicesAn array that will contain the list of clean material zone ids.
[out]mixedIndicesAn array that will contain the list of mixed material zone ids.
Note
The clean/mixed index arrays are not strictly what could be determined by the matset alone. We figure out which nodes touch multiple materials. Then we iterate over the zones and those that touch only nodes that have 1 material are marked clean, otherwise they are considered mixed as we might have to split those zones.

References AXOM_ANNOTATE_BEGIN, AXOM_ANNOTATE_END, AXOM_ANNOTATE_SCOPE, AXOM_LAMBDA, axom::ArrayView< T, DIM, SPACE >::data(), axom::Array< T, DIM, SPACE, StoragePolicy >::empty(), axom::serial::reductions::ReduceSum< ExecSpace, T >::get(), axom::bump::ZoneListBuilder< ExecSpace, TopologyView, MatsetView >::getAllocatorID(), axom::ArrayView< T, DIM, SPACE >::size(), SLIC_ASSERT, and axom::Array< T, DIM, SPACE, StoragePolicy >::view().

◆ execute() [3/3]

template<typename ExecSpace , typename TopologyView , typename MatsetView >
void axom::bump::ZoneListBuilder< ExecSpace, TopologyView, MatsetView >::execute ( const SelectedZonesView  selectedZonesView,
axom::Array< axom::IndexType > &  cleanIndices,
axom::Array< axom::IndexType > &  mixedIndices 
) const
inline

Build the list of clean and mixed zones using the number of materials per zone. This method essentially partitions the input selectedZonesView into clean and mixed lists.

Parameters
selectedZonesViewA view containing the zone indices we're considering. We pass it by value so it can be captured into lambdas.
[out]cleanIndicesAn array that will contain the list of clean material zone ids.
[out]mixedIndicesAn array that will contain the list of mixed material zone ids.

References AXOM_ANNOTATE_BEGIN, AXOM_ANNOTATE_END, AXOM_ANNOTATE_SCOPE, AXOM_LAMBDA, axom::serial::reductions::ReduceSum< ExecSpace, T >::get(), axom::bump::ZoneListBuilder< ExecSpace, TopologyView, MatsetView >::getAllocatorID(), axom::ArrayView< T, DIM, SPACE >::size(), and axom::Array< T, DIM, SPACE, StoragePolicy >::view().


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