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

Makes a centroids field using the input topology and coordset views. More...

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

Public Member Functions

 MakeZoneCenters (const TopologyView &topologyView, const CoordsetView &coordsetView)
 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 (const conduit::Node &n_topology, const conduit::Node &n_coordset, conduit::Node &n_outputField) const
 Create a new field from the input topology and place it in n_output. More...
 
void execute (axom::ArrayView< axom::IndexType > selectedZonesView, const conduit::Node &n_topology, const conduit::Node &n_coordset, conduit::Node &n_outputField) const
 Create a new field from the input topology and place it in n_output. More...
 

Detailed Description

template<typename ExecSpace, typename TopologyView, typename CoordsetView>
class axom::bump::MakeZoneCenters< ExecSpace, TopologyView, CoordsetView >

Makes a centroids field using the input topology and coordset views.

Template Parameters
ExecSpaceThe execution space for the algorithm.
TopologyViewThe topology view type.
CoordsetViewThe coordset view type.

Constructor & Destructor Documentation

◆ MakeZoneCenters()

template<typename ExecSpace , typename TopologyView , typename CoordsetView >
axom::bump::MakeZoneCenters< ExecSpace, TopologyView, CoordsetView >::MakeZoneCenters ( const TopologyView &  topologyView,
const CoordsetView &  coordsetView 
)
inline

Constructor.

Parameters
topologyViewThe view for the input topology.
coordsetViewThe view for the input coordset.

Member Function Documentation

◆ setAllocatorID()

template<typename ExecSpace , typename TopologyView , typename CoordsetView >
void axom::bump::MakeZoneCenters< ExecSpace, TopologyView, CoordsetView >::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 CoordsetView >
int axom::bump::MakeZoneCenters< ExecSpace, TopologyView, CoordsetView >::getAllocatorID ( ) const
inline

Get the allocator id to use when allocating memory.

Returns
The allocator id to use when allocating memory.

◆ execute() [1/2]

template<typename ExecSpace , typename TopologyView , typename CoordsetView >
void axom::bump::MakeZoneCenters< ExecSpace, TopologyView, CoordsetView >::execute ( const conduit::Node &  n_topology,
const conduit::Node &  n_coordset,
conduit::Node &  n_outputField 
) const
inline

Create a new field from the input topology and place it in n_output.

Parameters
n_topologyThe node that contains the input topology.
n_coordsetThe input coordset that we're blending.
[out]n_outputFieldThe output node that will contain the new zone centers field.
Note
The coordset view must agree with the coordset in n_coordset. We pass both a view and the coordset node since the view may not be able to contain some coordset metadata and remain trivially copyable.

References AXOM_LAMBDA, axom::bump::MakeZoneCenters< ExecSpace, TopologyView, CoordsetView >::getAllocatorID(), and axom::Array< T, DIM, SPACE, StoragePolicy >::view().

◆ execute() [2/2]

template<typename ExecSpace , typename TopologyView , typename CoordsetView >
void axom::bump::MakeZoneCenters< ExecSpace, TopologyView, CoordsetView >::execute ( axom::ArrayView< axom::IndexType selectedZonesView,
const conduit::Node &  n_topology,
const conduit::Node &  n_coordset,
conduit::Node &  n_outputField 
) const
inline

Create a new field from the input topology and place it in n_output.

Parameters
selectedZonesViewA view that contains a list of selected zones.
n_topologyThe node that contains the input topology.
n_coordsetThe input coordset that we're blending.
[out]n_outputFieldThe output node that will contain the new zone centers field.
Note
The coordset view must agree with the coordset in n_coordset. We pass both a view and the coordset node since the view may not be able to contain some coordset metadata and remain trivially copyable.
When passing selectedZones that is a subset of the zones in the mesh, be aware that the generated field may not be the right length for the input topology. This is okay because we may be using this routine to generate a field that is repurposed some other way.

References AXOM_LAMBDA, axom::sidre::ConduitMemory::axomAllocIdToConduit(), axom::bump::utilities::coordsetAxes(), axom::bump::MakeZoneCenters< ExecSpace, TopologyView, CoordsetView >::getAllocatorID(), axom::ArrayView< T, DIM, SPACE >::size(), and SLIC_ASSERT.


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