AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D > Class Template Reference

Implements Elvira algorithm for structured meshes. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/mir/ElviraAlgorithm.hpp>

Inheritance diagram for axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >:

Public Types

using TopologyView = axom::bump::views::StructuredTopologyView< IndexPolicy >
 
using ConnectivityType = typename TopologyView::ConnectivityType
 

Public Member Functions

 ElviraAlgorithm (const TopologyView &topoView, const CoordsetView &coordsetView, const MatsetView &matsetView)
 Constructor. More...
 
virtual ~ElviraAlgorithm ()=default
 Destructor. 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...
 
virtual void execute (const conduit::Node &n_input, const conduit::Node &n_options, conduit::Node &n_output)
 

Protected Types

using CoordType = typename CoordsetView::value_type
 
using ClipResultType = typename std::conditional< NDIMS==2, axom::primal::Polygon< CoordType, 2, axom::primal::PolygonArray::Static, MAX_VERTS_2D >, axom::primal::Polyhedron< CoordType, 3 > >::type
 
using VectorType = axom::primal::Vector< CoordType, NDIMS >
 
using PointType = axom::primal::Point< CoordType, NDIMS >
 
using PlaneType = axom::primal::Plane< CoordType, NDIMS >
 
using ShapeView = axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D >
 
using Builder = detail::TopologyBuilder< ExecSpace, CoordsetView, TopologyView, MatsetView, ClipResultType, NDIMS >
 
using BuilderView = typename Builder::View
 

Protected Member Functions

virtual void executeDomain (const conduit::Node &n_topo, const conduit::Node &n_coordset, const conduit::Node &n_fields, const conduit::Node &n_matset, const conduit::Node &n_options, conduit::Node &n_newTopo, conduit::Node &n_newCoordset, conduit::Node &n_newFields, conduit::Node &n_newMatset) override
 Perform material interface reconstruction on a single domain. More...
 
void merge (const std::string &topoName, conduit::Node &n_cleanOutput, conduit::Node &n_mirOutput, conduit::Node &n_merged) const
 Merge meshes for clean and MIR outputs. More...
 
void addOriginal (conduit::Node &n_field, const std::string &topoName, const std::string &association, axom::ArrayView< axom::IndexType > selectedZonesView) const
 Adds original ids field to supplied fields node. More...
 
void makeCleanZones (const axom::ArrayView< axom::IndexType > &cleanZones, const conduit::Node &n_root, const conduit::Node &n_topology, const conduit::Node &n_coordset, const conduit::Node &n_matset, const conduit::Node &n_options, conduit::Node &n_cleanOutput) const
 Take the mesh in n_root and extract the zones identified by the cleanZones array and store the results into the n_cleanOutput node. More...
 
void processMixedZones (const axom::ArrayView< axom::IndexType > mixedZonesView, const conduit::Node &n_topo, const conduit::Node &n_coordset, const conduit::Node &AXOM_UNUSED_PARAM(n_fields), const conduit::Node &n_matset, const conduit::Node &n_options, conduit::Node &n_newTopo, conduit::Node &n_newCoordset, conduit::Node &n_newFields, conduit::Node &n_newMatset)
 Perform material interface reconstruction on mixed zones. More...
 
void makeFragments (BuilderView buildView, axom::ArrayView< axom::IndexType > matZoneView, axom::ArrayView< axom::IndexType > matCountView, axom::ArrayView< axom::IndexType > matOffsetView, axom::ArrayView< typename MatsetView::IndexType > sortedMaterialIdsView, axom::ArrayView< double > fragmentVectorsView, axom::ArrayView< double > fragmentVFStencilView, int max_iterations, double tolerance)
 Use the normal vectors for each fragment to build the fragment shapes. More...
 
void reportErrors ([[maybe_unused]] int srcLine) const
 
void executeSetup (const conduit::Node &n_domain, const conduit::Node &n_options, conduit::Node &n_newDomain)
 Set up the new domain from the old one and invoke executeDomain. More...
 
void updateNames (const std::string &origTopoName, const std::string &newTopoName, const std::string &origCoordsetName, const std::string &newCoordsetName, const std::string &origMatsetName, const std::string &newMatsetName, conduit::Node &n_newTopo, conduit::Node &n_newCoordset, conduit::Node &n_newFields, conduit::Node &n_newMatset)
 Update names in some of the objects when we can tell they have been renamed. More...
 
void copyState (const conduit::Node &srcState, conduit::Node &destState) const
 Copy state from the src domain to the destination domain. More...
 
void printNode (const conduit::Node &n) const
 This is a utility method for printing a Conduit node with large limits for lines and element counts. More...
 
void saveMesh (const conduit::Node &n_mesh, const std::string &filebase) const
 Save a Blueprint mesh to disk (YAML and HDF5, if available). More...
 
std::string localPath (const conduit::Node &obj) const
 Return the local path name, stripping off a domain path prefix. Blueprint domains are typically written under top level nodes with names like "domain_{:05}" or "domain_{:07}". This method will strip off any path prefix beginning with "domain". More...
 

Static Protected Attributes

static constexpr int NDIMS = IndexPolicy::dimension()
 
static constexpr int StencilSize = elvira::getStencilSize(NDIMS)
 
static constexpr int numVectorComponents = 3
 

Detailed Description

template<typename ExecSpace, typename IndexPolicy, typename CoordsetView, typename MatsetView, int MAX_VERTS_2D = 12>
class axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >

Implements Elvira algorithm for structured meshes.

Template Parameters
ExecSpaceThe execution space where the algorithm will run.
IndexPolicyThe structured mesh indexing policy.
CoordsetViewThe view type that describes the coordinates.
MatsetViewThe view type that describes matset.
MAX_VERTS_2DThe maximum number of vertices allowed in a polygon. This value is used only in 2D.
Note
We template on IndexPolicy instead of TopologyView so we can enforce a StructuredTopologyView on the algorithm. This is done because ELVIRA assumes a structured mesh for stencils, etc.
This algorithm typically produces unstructured meshes of polygons or polyhedra, depending on the mesh dimension. However, if the input matset contains only "clean" zones consisting of 1 material per zone then the input coordset, topology, and matset will be copied to the output. In that case, the types will depend on the input types.

Member Typedef Documentation

◆ TopologyView

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
using axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::TopologyView = axom::bump::views::StructuredTopologyView<IndexPolicy>

◆ ConnectivityType

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
using axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::ConnectivityType = typename TopologyView::ConnectivityType

◆ CoordType

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
using axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::CoordType = typename CoordsetView::value_type
protected

◆ ClipResultType

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
using axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::ClipResultType = typename std::conditional< NDIMS == 2, axom::primal::Polygon<CoordType, 2, axom::primal::PolygonArray::Static, MAX_VERTS_2D>, axom::primal::Polyhedron<CoordType, 3> >::type
protected

◆ VectorType

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
using axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::VectorType = axom::primal::Vector<CoordType, NDIMS>
protected

◆ PointType

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
using axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::PointType = axom::primal::Point<CoordType, NDIMS>
protected

◆ PlaneType

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
using axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::PlaneType = axom::primal::Plane<CoordType, NDIMS>
protected

◆ ShapeView

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
using axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::ShapeView = axom::bump::PrimalAdaptor<TopologyView, CoordsetView, MAX_VERTS_2D>
protected

◆ Builder

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
using axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::Builder = detail::TopologyBuilder<ExecSpace, CoordsetView, TopologyView, MatsetView, ClipResultType, NDIMS>
protected

◆ BuilderView

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
using axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::BuilderView = typename Builder::View
protected

Constructor & Destructor Documentation

◆ ElviraAlgorithm()

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::ElviraAlgorithm ( const TopologyView topoView,
const CoordsetView &  coordsetView,
const MatsetView &  matsetView 
)
inline

Constructor.

Parameters
topoViewThe topology view to use for the input data.
coordsetViewThe coordset view to use for the input data.
matsetViewThe matset view to use for the input data.

◆ ~ElviraAlgorithm()

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
virtual axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::~ElviraAlgorithm ( )
virtualdefault

Destructor.

Member Function Documentation

◆ setAllocatorID()

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
void axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::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 IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
int axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::getAllocatorID ( ) const
inline

Get the allocator id to use when allocating memory.

Returns
The allocator id to use when allocating memory.

◆ executeDomain()

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
virtual void axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::executeDomain ( const conduit::Node &  n_topo,
const conduit::Node &  n_coordset,
const conduit::Node &  n_fields,
const conduit::Node &  n_matset,
const conduit::Node &  n_options,
conduit::Node &  n_newTopo,
conduit::Node &  n_newCoordset,
conduit::Node &  n_newFields,
conduit::Node &  n_newMatset 
)
inlineoverrideprotectedvirtual

Perform material interface reconstruction on a single domain.

Parameters
[in]n_topoThe Conduit node containing the topology that will be used for MIR.
[in]n_coordsetThe Conduit node containing the coordset.
[in]n_fieldsThe Conduit node containing the fields.
[in]n_matsetThe Conduit node containing the matset.
[in]n_optionsThe Conduit node containing the options that help govern MIR execution.
[out]n_newTopoA node that will contain the new clipped topology.
[out]n_newCoordsetA node that will contain the new coordset for the clipped topology.
[out]n_newFieldsA node that will contain the new fields for the clipped topology.
[out]n_newMatsetA Conduit node that will contain the new matset.

Implements axom::mir::MIRAlgorithm.

References axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::addOriginal(), AXOM_ANNOTATE_SCOPE, axom::bump::ZoneListBuilder< ExecSpace, TopologyView, MatsetView >::execute(), axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::getAllocatorID(), axom::mir::MIRAlgorithm::localPath(), axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::makeCleanZones(), axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::merge(), axom::bump::views::StructuredTopologyView< IndexPolicy >::numberOfZones(), axom::mir::MIRAlgorithm::printNode(), axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::processMixedZones(), axom::mir::MIRAlgorithm::saveMesh(), axom::bump::SelectedZones< ExecSpace >::selectionKey(), axom::bump::ZoneListBuilder< ExecSpace, TopologyView, MatsetView >::setAllocatorID(), axom::Array< T, DIM, SPACE, StoragePolicy >::size(), SLIC_ASSERT, SLIC_DEBUG, SLIC_ERROR_IF, SLIC_INFO, axom::Array< T, DIM, SPACE, StoragePolicy >::view(), and axom::bump::SelectedZones< ExecSpace >::view().

◆ merge()

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
void axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::merge ( const std::string &  topoName,
conduit::Node &  n_cleanOutput,
conduit::Node &  n_mirOutput,
conduit::Node &  n_merged 
) const
inlineprotected

Merge meshes for clean and MIR outputs.

Parameters
topoNameThe name of the topology.
n_cleanOutputThe mesh that contains the clean zones.
n_mirOutputThe mesh that contains the MIR output.
[out]n_mergedThe output node for the merged mesh.

References AXOM_ANNOTATE_SCOPE, and axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::getAllocatorID().

◆ addOriginal()

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
void axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::addOriginal ( conduit::Node &  n_field,
const std::string &  topoName,
const std::string &  association,
axom::ArrayView< axom::IndexType selectedZonesView 
) const
inlineprotected

Adds original ids field to supplied fields node.

Parameters
n_fieldThe new field node.
topoNameThe topology name for the field.
associationThe field association.
selectedZonesViewA view containing the values to store in the field.

References AXOM_ANNOTATE_SCOPE, AXOM_LAMBDA, axom::sidre::ConduitMemory::axomAllocIdToConduit(), axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::getAllocatorID(), axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::reportErrors(), and axom::ArrayView< T, DIM, SPACE >::size().

◆ makeCleanZones()

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
void axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::makeCleanZones ( const axom::ArrayView< axom::IndexType > &  cleanZones,
const conduit::Node &  n_root,
const conduit::Node &  n_topology,
const conduit::Node &  n_coordset,
const conduit::Node &  n_matset,
const conduit::Node &  n_options,
conduit::Node &  n_cleanOutput 
) const
inlineprotected

Take the mesh in n_root and extract the zones identified by the cleanZones array and store the results into the n_cleanOutput node.

Parameters
cleanZonesAn array of clean zone ids.
n_rootThe input mesh from which zones are being extracted.
n_topologyThe node that contains the topology for the input mesh.
n_coordsetThe node that contains the coordset for the input mesh.
n_matsetThe node that contains the matset for the input mesh.
n_optionsThe options to inherit.
[out]n_cleanOutputThe node that will contain the clean mesh output.
Returns
The number of nodes in the clean mesh output.

References axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::addOriginal(), AXOM_ANNOTATE_SCOPE, axom::bump::MakePointMesh< ExecSpace, TopologyView, CoordsetView >::execute(), axom::bump::MatsetSlicer< ExecSpace, MatsetView >::execute(), axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::getAllocatorID(), axom::mir::MIRAlgorithm::saveMesh(), axom::bump::MakePointMesh< ExecSpace, TopologyView, CoordsetView >::setAllocatorID(), axom::bump::MatsetSlicer< ExecSpace, MatsetView >::setAllocatorID(), and axom::primal::slice().

◆ processMixedZones()

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
void axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::processMixedZones ( const axom::ArrayView< axom::IndexType mixedZonesView,
const conduit::Node &  n_topo,
const conduit::Node &  n_coordset,
const conduit::Node &  AXOM_UNUSED_PARAMn_fields,
const conduit::Node &  n_matset,
const conduit::Node &  n_options,
conduit::Node &  n_newTopo,
conduit::Node &  n_newCoordset,
conduit::Node &  n_newFields,
conduit::Node &  n_newMatset 
)
inlineprotected

Perform material interface reconstruction on mixed zones.

Parameters
[in]mixedZonesViewA view that contains the list of mixed zones that we'll operate on.
[in]n_topoThe Conduit node containing the topology that will be used for MIR.
[in]n_coordsetThe Conduit node containing the coordset.
[in]n_fieldsThe Conduit node containing the fields.
[in]n_matsetThe Conduit node containing the matset.
[in]n_optionsThe Conduit node containing the options that help govern MIR execution.
[out]n_newTopoA node that will contain the new clipped topology.
[out]n_newCoordsetA node that will contain the new coordset for the clipped topology.
[out]n_newFieldsA node that will contain the new fields for the clipped topology.
[out]n_newMatsetA Conduit node that will contain the new matset.

References axom::utilities::abs(), AXOM_ANNOTATE_BEGIN, AXOM_ANNOTATE_END, AXOM_ANNOTATE_SCOPE, AXOM_LAMBDA, axom::utilities::clampVal(), axom::Array< T, DIM, SPACE, StoragePolicy >::clear(), axom::Array< T, DIM, SPACE, StoragePolicy >::data(), axom::ArrayView< T, DIM, SPACE >::data(), axom::bump::views::StructuredTopologyView< IndexPolicy >::dimension(), axom::ArrayView< T, DIM, SPACE >::empty(), axom::bump::MakeZoneCenters< ExecSpace, TopologyView, CoordsetView >::execute(), axom::serial::reductions::ReduceSum< ExecSpace, T >::get(), axom::serial::reductions::ReduceMax< ExecSpace, T >::get(), axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::getAllocatorID(), axom::bump::views::StructuredTopologyView< IndexPolicy >::indexing(), axom::slic::inherit::info, axom::mir::MIRAlgorithm::localPath(), axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::makeFragments(), axom::serial::reductions::ReduceMax< ExecSpace, T >::max(), axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::NDIMS, axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::numVectorComponents, axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::reportErrors(), axom::utilities::reverse_sort_multiple(), axom::Array< T, DIM, SPACE, StoragePolicy >::set(), axom::bump::MakeZoneCenters< ExecSpace, TopologyView, CoordsetView >::setAllocatorID(), axom::ArrayView< T, DIM, SPACE >::size(), SLIC_ASSERT, SLIC_INFO, axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::StencilSize, axom::bump::views::verify(), and axom::Array< T, DIM, SPACE, StoragePolicy >::view().

◆ makeFragments()

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
void axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::makeFragments ( BuilderView  buildView,
axom::ArrayView< axom::IndexType matZoneView,
axom::ArrayView< axom::IndexType matCountView,
axom::ArrayView< axom::IndexType matOffsetView,
axom::ArrayView< typename MatsetView::IndexType >  sortedMaterialIdsView,
axom::ArrayView< double >  fragmentVectorsView,
axom::ArrayView< double >  fragmentVFStencilView,
int  max_iterations,
double  tolerance 
)
inlineprotected

Use the normal vectors for each fragment to build the fragment shapes.

Parameters
buildViewA view that lets us add a shape to the Blueprint output.
matZoneViewA view containing zone ids sorted by material count in the zone.
matCountViewA view containing material counts for the zones in matZoneView.
matOffsetViewA view containing the offset where fragment data will be stored.
sortedMaterialIdsViewA view containing the material ids for each fragment sorted by volume fraction (high to low).
fragmentVectorsViewA view that contains the normals for each fragment.
fragmentVFStencilViewA view that contains the VF stencil for each fragment.
max_iterationsThe max allowable iterations to find the fragment shape.
toleranceThe volume tolerance for the fragment shape.

References AXOM_ANNOTATE_SCOPE, AXOM_LAMBDA, axom::primal::clip(), axom::primal::compute_bounding_box(), axom::ArrayView< T, DIM, SPACE >::data(), axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::NDIMS, axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::numVectorComponents, axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::reportErrors(), axom::ArrayView< T, DIM, SPACE >::size(), SLIC_DEBUG, SLIC_ERROR, and axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::StencilSize.

◆ reportErrors()

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
void axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::reportErrors ( [[maybe_unused] ] int  srcLine) const
inlineprotected

References SLIC_ERROR.

◆ execute()

virtual void axom::mir::MIRAlgorithm::execute ( const conduit::Node &  n_input,
const conduit::Node &  n_options,
conduit::Node &  n_output 
)
virtualinherited
\brief Perform material interface reconstruction on the mesh supplied by \a n_input.

\param[in] n_input The node that contains a mesh domain with the topology and matset
                   to be used for MIR.
\param[in] n_options A node that contains options that help govern MIR execution.
options:
topology: main
matset: matset
topologyName: mirtopo
coordsetName: mircoords
matsetName: cleanmat
fields:
- temperature
- pressure
selectedZones: [0,1,6,9]
mapping: 0

The "topology" option specifies which topology we'll reconstruct. It must have an associated matset. "new_topology" is the name of the topology that will be created in the output node. "new_coordset" is the name of the new coordset that will be created in the output node. If it is not provided then the name of the topology's coordset will be used.
"new_matset" is the name of the new matset that will be created in the output node. If it is not provided then the name of the topology's matset will be used.
"fields" is the name of the fields to map to the new topology. If fields is specified but empty, no fields will be mapped. If fields is not present then all fields will be mapped. "zones" is a list of zone indices from the topology that need to be reconstructed. If not present then all zones will be considered. "mapping" indicates whether we should include an originalElements field on the new topology to indicate where each new zone came from in the original topology.

Parameters
[out]n_outputA node that will contain the new entities.

◆ executeSetup()

void axom::mir::MIRAlgorithm::executeSetup ( const conduit::Node &  n_domain,
const conduit::Node &  n_options,
conduit::Node &  n_newDomain 
)
protectedinherited

Set up the new domain from the old one and invoke executeDomain.

Parameters
n_domainThe input domain.
n_optionsThe MIR options.
n_newDomainThe output domain.

◆ updateNames()

void axom::mir::MIRAlgorithm::updateNames ( const std::string &  origTopoName,
const std::string &  newTopoName,
const std::string &  origCoordsetName,
const std::string &  newCoordsetName,
const std::string &  origMatsetName,
const std::string &  newMatsetName,
conduit::Node &  n_newTopo,
conduit::Node &  n_newCoordset,
conduit::Node &  n_newFields,
conduit::Node &  n_newMatset 
)
protectedinherited

Update names in some of the objects when we can tell they have been renamed.

Parameters
origTopoNameThe topology name of the input mesh.
newTopoNameThe topology name of the output mesh.
origCoordsetNameThe coordset name of the input mesh.
newCoordsetNameThe coordset name of the output mesh.
origMatsetNameThe matset name of the input mesh.
newMatsetNameThe matset name of the output mesh.
n_newTopoThe node that contains the output topology.
n_newCoordsetThe node that contains the output coordset.
n_newFieldsThe node that contains the output fields.
n_newMatsetThe node that contains the output matset.
Note
This method is used internally mainly when MIR copies the input mesh to the output when MIR is no-op.

◆ copyState()

void axom::mir::MIRAlgorithm::copyState ( const conduit::Node &  srcState,
conduit::Node &  destState 
) const
protectedinherited

Copy state from the src domain to the destination domain.

Parameters
srcStateThe node that contains the state in the source domain.
destStateThe node that contains the state in the destination domain.

◆ printNode()

void axom::mir::MIRAlgorithm::printNode ( const conduit::Node &  n) const
protectedinherited

This is a utility method for printing a Conduit node with large limits for lines and element counts.

Parameters
nThe Conduit node to print.

◆ saveMesh()

void axom::mir::MIRAlgorithm::saveMesh ( const conduit::Node &  n_mesh,
const std::string &  filebase 
) const
protectedinherited

Save a Blueprint mesh to disk (YAML and HDF5, if available).

Parameters
n_meshThe mesh to save.
filebaseThe base filename to use when writing files. Extensions may be added.

◆ localPath()

std::string axom::mir::MIRAlgorithm::localPath ( const conduit::Node &  obj) const
protectedinherited

Return the local path name, stripping off a domain path prefix. Blueprint domains are typically written under top level nodes with names like "domain_{:05}" or "domain_{:07}". This method will strip off any path prefix beginning with "domain".

Parameters
[in]objThe object whose local path we want.
Returns
The path without the domain prefix.

Member Data Documentation

◆ NDIMS

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
constexpr int axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::NDIMS = IndexPolicy::dimension()
staticconstexprprotected

◆ StencilSize

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
constexpr int axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::StencilSize = elvira::getStencilSize(NDIMS)
staticconstexprprotected

◆ numVectorComponents

template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
constexpr int axom::mir::ElviraAlgorithm< ExecSpace, IndexPolicy, CoordsetView, MatsetView, MAX_VERTS_2D >::numVectorComponents = 3
staticconstexprprotected

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