AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces > Class Template Reference

Take a source topology with clean matset and a target topology and intersect the source and target zones to build up a new matset on the target mesh that represents how the source mesh overlaps the target mesh. More...

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

Public Types

using SrcShapeView = PrimalAdaptor< SrcTopologyView, SrcCoordsetView, MAX_VERTS_2D, makeFaces >
 
using TargetShapeView = PrimalAdaptor< TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D >
 

Public Member Functions

 TopologyMapper (const SrcTopologyView &srcTopoView, const SrcCoordsetView &srcCoordsetView, const SrcMatsetView &srcMatsetView, const TargetTopologyView &targetTopoView, const TargetCoordsetView &targetCoordsetView)
 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_srcMesh, const conduit::Node &n_options, conduit::Node &n_targetMesh) const
 Intersect the source and target topologies and map the source material onto the target mesh. More...
 

Public Attributes

SrcShapeView m_srcView
 
SrcMatsetView m_srcMatsetView
 
TargetShapeView m_targetView
 
int m_allocator_id
 

Detailed Description

template<typename ExecSpace, typename SrcTopologyView, typename SrcCoordsetView, typename SrcMatsetView, typename TargetTopologyView, typename TargetCoordsetView, int MAX_VERTS_2D = 12, bool makeFaces = true>
class axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces >

Take a source topology with clean matset and a target topology and intersect the source and target zones to build up a new matset on the target mesh that represents how the source mesh overlaps the target mesh.

Template Parameters
ExecSpaceThe execution space where the algorithm will execute.
SrcTopologyViewThe view type for the source topology.
SrcCoordsetViewThe view type for the source coordset.
SrcMatsetViewThe view type for the source matset.
TargetTopologyViewThe view type for the target topology.
TargetCoordsetViewThe view type for the target coordset.
MAX_VERTS_2DThe maximum number of vertices allowed in a polygon. This value is used only in 2D.
makeFacesMake faces instead of proper Polyhedron zones when polyhedra are involved. This enables faster conversion between Blueprint and Axom since making planes is less complicated than Axom's Polyhedron.
Note
The use of topology and coordset views as template parameters allows this class to be instantiated for use with various topology and coordset types. We also use the source matsetview so we can make an output matset with the same types.

Member Typedef Documentation

◆ SrcShapeView

template<typename ExecSpace , typename SrcTopologyView , typename SrcCoordsetView , typename SrcMatsetView , typename TargetTopologyView , typename TargetCoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = true>
using axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces >::SrcShapeView = PrimalAdaptor<SrcTopologyView, SrcCoordsetView, MAX_VERTS_2D, makeFaces>

◆ TargetShapeView

template<typename ExecSpace , typename SrcTopologyView , typename SrcCoordsetView , typename SrcMatsetView , typename TargetTopologyView , typename TargetCoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = true>
using axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces >::TargetShapeView = PrimalAdaptor<TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D>

Constructor & Destructor Documentation

◆ TopologyMapper()

template<typename ExecSpace , typename SrcTopologyView , typename SrcCoordsetView , typename SrcMatsetView , typename TargetTopologyView , typename TargetCoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = true>
axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces >::TopologyMapper ( const SrcTopologyView &  srcTopoView,
const SrcCoordsetView &  srcCoordsetView,
const SrcMatsetView &  srcMatsetView,
const TargetTopologyView &  targetTopoView,
const TargetCoordsetView &  targetCoordsetView 
)
inline

Constructor.

Parameters
srcTopoViewThe source topology view.
srcCoordsetViewThe source coordset view.
srcMatsetViewThe source matset view.
targetTopoViewThe target topology view.
targetCoordsetViewThe target coordset view.

Member Function Documentation

◆ setAllocatorID()

template<typename ExecSpace , typename SrcTopologyView , typename SrcCoordsetView , typename SrcMatsetView , typename TargetTopologyView , typename TargetCoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = true>
void axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces >::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(), axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces >::m_allocator_id, and SLIC_ERROR_IF.

◆ getAllocatorID()

template<typename ExecSpace , typename SrcTopologyView , typename SrcCoordsetView , typename SrcMatsetView , typename TargetTopologyView , typename TargetCoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = true>
int axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces >::getAllocatorID ( ) const
inline

Get the allocator id to use when allocating memory.

Returns
The allocator id to use when allocating memory.

References axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces >::m_allocator_id.

◆ execute()

template<typename ExecSpace , typename SrcTopologyView , typename SrcCoordsetView , typename SrcMatsetView , typename TargetTopologyView , typename TargetCoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = true>
void axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces >::execute ( const conduit::Node &  n_srcMesh,
const conduit::Node &  n_options,
conduit::Node &  n_targetMesh 
) const
inline

Intersect the source and target topologies and map the source material onto the target mesh.

Parameters
n_srcMeshThe Conduit node that contains the coordset, topology, matset for the source mesh.
n_optionsA Conduit node that contains the algorithm options. A copy will be made in the appropriate memory space.
n_targetMeshThe node that contains the coordset and topology for the source mesh.
* The n_options node must contain the following keys.
*
* source/matsetName: "name of source mesh matset"
* target/topologyName: "name of target mesh topology"
* target/matsetName "name of new target mesh matset"
*
* The n_options node may contain these optional parameters.
*
* source/selectedZones: [0,1,2,...]  # List of selected zone ids in source mesh.
* target/selectedZones: [0,1,2,...]  # List of selected zone ids in target mesh.
*
* 
Note
After executing, the n_targetMesh node will contain a new matset containing the results of the intersections with the src/target meshes.

References AXOM_ANNOTATE_BEGIN, AXOM_ANNOTATE_END, AXOM_ANNOTATE_SCOPE, AXOM_LAMBDA, AXOM_TM_ASSERT_OR_RETURN, axom::sidre::ConduitMemory::axomAllocIdToConduit(), axom::serial::reductions::ReduceSum< ExecSpace, T >::get(), axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces >::getAllocatorID(), axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces >::m_srcMatsetView, axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces >::m_srcView, axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces >::m_targetView, axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::numberOfZones(), axom::spin::BVH< NDIMS, ExecSpace, FloatType, BVHImpl >::setAllocatorID(), axom::bump::SelectedZones< ExecSpace >::setSorted(), axom::bump::detail::shapeOverlap(), axom::ArrayView< T, DIM, SPACE >::size(), SLIC_ASSERT, SLIC_ERROR, SLIC_ERROR_IF, axom::Array< T, DIM, SPACE, StoragePolicy >::view(), and axom::bump::SelectedZones< ExecSpace >::view().

Member Data Documentation

◆ m_srcView

template<typename ExecSpace , typename SrcTopologyView , typename SrcCoordsetView , typename SrcMatsetView , typename TargetTopologyView , typename TargetCoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = true>
SrcShapeView axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces >::m_srcView

◆ m_srcMatsetView

template<typename ExecSpace , typename SrcTopologyView , typename SrcCoordsetView , typename SrcMatsetView , typename TargetTopologyView , typename TargetCoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = true>
SrcMatsetView axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces >::m_srcMatsetView

◆ m_targetView

template<typename ExecSpace , typename SrcTopologyView , typename SrcCoordsetView , typename SrcMatsetView , typename TargetTopologyView , typename TargetCoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = true>
TargetShapeView axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces >::m_targetView

◆ m_allocator_id

template<typename ExecSpace , typename SrcTopologyView , typename SrcCoordsetView , typename SrcMatsetView , typename TargetTopologyView , typename TargetCoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = true>
int axom::bump::TopologyMapper< ExecSpace, SrcTopologyView, SrcCoordsetView, SrcMatsetView, TargetTopologyView, TargetCoordsetView, MAX_VERTS_2D, makeFaces >::m_allocator_id

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