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

Implements Meredith's Equi-Z algorithm on the GPU using Blueprint inputs/outputs. More...

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

Inheritance diagram for axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >:

Public Types

using ConnectivityType = typename TopologyView::ConnectivityType
 

Public Member Functions

 EquiZAlgorithm (const TopologyView &topoView, const CoordsetView &coordsetView, const MatsetView &matsetView)
 Constructor. More...
 
virtual ~EquiZAlgorithm ()=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 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 makeZoneLists (const conduit::Node &n_options, axom::Array< axom::IndexType > &cleanZones, axom::Array< axom::IndexType > &mixedZones) const
 Examine the zones and make separate lists of clean and mixed zones so we can process them specially since mixed zones require much more work. 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::IndexType nvalues) const
 Adds original ids field to supplied fields node. More...
 
void makeCleanZones (const conduit::Node &n_root, const std::string &topoName, const conduit::Node &n_options, const axom::ArrayView< axom::IndexType > &cleanZones, 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 createNodeMapAndSlice (conduit::Node &n_newFields, axom::Array< axom::IndexType > &nodeMap, axom::Array< axom::IndexType > &nodeSlice) const
 Create node map and node slice arrays for the MIR output that help merge it back with the clean output. More...
 
void processMixedZones (const conduit::Node &n_topo, const conduit::Node &n_coordset, const conduit::Node &n_fields, const conduit::Node &n_matset, conduit::Node &n_options, conduit::Node &n_newTopo, conduit::Node &n_newCoordset, conduit::Node &n_newFields, conduit::Node &n_newMatset) const
 Perform material interface reconstruction on mixed zones. More...
 
void classifyMaterials (const conduit::Node &n_matset, axom::bump::views::MaterialInformation &allMats, axom::bump::views::MaterialInformation &cleanMats, axom::bump::views::MaterialInformation &mixedMats) const
 Examine the materials and determine which are clean/mixed. More...
 
std::string zonalFieldName (int matId) const
 Return the name of the zonal material field for a given matId. More...
 
std::string nodalFieldName (int matId) const
 Return the name of the nodal material field for a given matId. More...
 
std::string zonalMaterialIDName () const
 Return the name of the zonal material id field. More...
 
std::string originalNodesFieldName () const
 Return the name of the original nodes field. More...
 
std::string newNodesFieldName () const
 Return the name of the new nodes field that identifies blended nodes in the MIR output. More...
 
void makeNodeCenteredVFs (const conduit::Node &n_topo, const conduit::Node &n_coordset, conduit::Node &n_fields, const axom::bump::views::MaterialInformation &mixedMats) const
 Makes node-cenetered volume fractions for the materials in the matset and attaches them as fields. More...
 
void makeWorkingFields (const conduit::Node &n_topo, conduit::Node &n_fields, const axom::bump::views::MaterialInformation &cleanMats, const axom::bump::views::MaterialInformation &AXOM_UNUSED_PARAM(mixedMats)) const
 Set up the "working fields", mainly a zonalMaterialID that includes the contributions from the clean materials and the first mixed material. More...
 
template<typename ITopologyView , typename ICoordsetView >
void iteration (int iter, const ITopologyView &topoView, const ICoordsetView &coordsetView, const axom::bump::views::MaterialInformation &allMats, const axom::bump::views::Material &currentMat, const conduit::Node &n_topo, const conduit::Node &n_coordset, conduit::Node &n_fields, const conduit::Node &n_options, conduit::Node &n_newTopo, conduit::Node &n_newCoordset, conduit::Node &n_newFields) const
 Perform one iteration of material clipping. More...
 
void buildNewMatset (const conduit::Node &n_matset, conduit::Node &n_newFields, conduit::Node &n_newMatset) const
 Build a new matset with only clean zones, representing the MIR output. More...
 
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...
 

Detailed Description

template<typename ExecSpace, typename TopologyView, typename CoordsetView, typename MatsetView>
class axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >

Implements Meredith's Equi-Z algorithm on the GPU using Blueprint inputs/outputs.

Template Parameters
ExecSpacethe execution space where the algorithm will run.
TopologyViewA topology view to be used for accessing zones in the mesh.
CoordsetViewA coordset view that accesses coordinates as primal::Point.
MatsetViewA matset view that interfaces to the Blueprint material set.
Note
This algorithm typically produces unstructured meshes of zoo elements. 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

◆ ConnectivityType

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
using axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::ConnectivityType = typename TopologyView::ConnectivityType

Constructor & Destructor Documentation

◆ EquiZAlgorithm()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::EquiZAlgorithm ( 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.

◆ ~EquiZAlgorithm()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
virtual axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::~EquiZAlgorithm ( )
virtualdefault

Destructor.

Member Function Documentation

◆ setAllocatorID()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
void axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, 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 CoordsetView , typename MatsetView >
int axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::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 TopologyView , typename CoordsetView , typename MatsetView >
virtual void axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::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. These are documented in the Sphinx documentation.
[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::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::addOriginal(), AXOM_ANNOTATE_SCOPE, axom::Array< T, DIM, SPACE, StoragePolicy >::data(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::getAllocatorID(), axom::mir::MIRAlgorithm::localPath(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::makeCleanZones(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::makeZoneLists(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::merge(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::newNodesFieldName(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::originalNodesFieldName(), axom::mir::MIRAlgorithm::printNode(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::processMixedZones(), axom::mir::MIRAlgorithm::saveMesh(), axom::Array< T, DIM, SPACE, StoragePolicy >::size(), SLIC_ERROR_IF, SLIC_INFO, and axom::Array< T, DIM, SPACE, StoragePolicy >::view().

◆ makeZoneLists()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
void axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::makeZoneLists ( const conduit::Node &  n_options,
axom::Array< axom::IndexType > &  cleanZones,
axom::Array< axom::IndexType > &  mixedZones 
) const
inlineprotected

◆ merge()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
void axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::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, axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::createNodeMapAndSlice(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::getAllocatorID(), and axom::Array< T, DIM, SPACE, StoragePolicy >::view().

◆ addOriginal()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
void axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::addOriginal ( conduit::Node &  n_field,
const std::string &  topoName,
const std::string &  association,
axom::IndexType  nvalues 
) 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.
nvaluesThe number of nodes in the field.
Note
This field is added to the mesh before feeding it through MIR so we will have an idea of which nodes are original nodes in the output. Blended nodes may not have good values but there is a mask field that can identify those nodes.

References AXOM_ANNOTATE_SCOPE, AXOM_LAMBDA, axom::sidre::ConduitMemory::axomAllocIdToConduit(), and axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::getAllocatorID().

◆ makeCleanZones()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
void axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::makeCleanZones ( const conduit::Node &  n_root,
const std::string &  topoName,
const conduit::Node &  n_options,
const axom::ArrayView< axom::IndexType > &  cleanZones,
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
n_rootThe input mesh from which zones are being extracted.
topoNameThe name of the topology.
n_optionsOptions to forward.
cleanZonesAn array of clean zone ids.
[out]n_cleanOutputThe node that will contain the clean mesh output.
Returns
The number of nodes in the clean mesh output.

References AXOM_ANNOTATE_BEGIN, AXOM_ANNOTATE_END, AXOM_ANNOTATE_SCOPE, axom::bump::ExtractZonesAndMatset< ExecSpace, TopologyView, CoordsetView, MatsetView >::execute(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::getAllocatorID(), axom::bump::Options::originalElementsField(), axom::mir::MIRAlgorithm::saveMesh(), and axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::setAllocatorID().

◆ createNodeMapAndSlice()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
void axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::createNodeMapAndSlice ( conduit::Node &  n_newFields,
axom::Array< axom::IndexType > &  nodeMap,
axom::Array< axom::IndexType > &  nodeSlice 
) const
inlineprotected

Create node map and node slice arrays for the MIR output that help merge it back with the clean output.

Parameters
n_newFieldsThe fields from the MIR output.
[out]nodeMapAn array used to map node ids from the MIR output to their node ids in the merged mesh.
[out]nodeSliceAn array that identifies new blended node ids in the MIR output so they can be appended into coordsets and fields during merge.

References axom::execution_space< ExecSpace >::allocatorID(), AXOM_ANNOTATE_SCOPE, AXOM_LAMBDA, axom::serial::reductions::ReduceSum< ExecSpace, T >::get(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::newNodesFieldName(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::originalNodesFieldName(), SLIC_ASSERT, and axom::Array< T, DIM, SPACE, StoragePolicy >::view().

◆ processMixedZones()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
void axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::processMixedZones ( const conduit::Node &  n_topo,
const conduit::Node &  n_coordset,
const conduit::Node &  n_fields,
const conduit::Node &  n_matset,
conduit::Node &  n_options,
conduit::Node &  n_newTopo,
conduit::Node &  n_newCoordset,
conduit::Node &  n_newFields,
conduit::Node &  n_newMatset 
) const
inlineprotected

Perform material interface reconstruction on mixed zones.

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.

References AXOM_ANNOTATE_SCOPE, AXOM_UNUSED_PARAM, axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::buildNewMatset(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::classifyMaterials(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::iteration(), axom::mir::MIRAlgorithm::localPath(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::makeNodeCenteredVFs(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::makeWorkingFields(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::nodalFieldName(), axom::mir::MIRAlgorithm::saveMesh(), axom::bump::views::typed_dispatch_unstructured_topology(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::zonalFieldName(), and axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::zonalMaterialIDName().

◆ classifyMaterials()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
void axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::classifyMaterials ( const conduit::Node &  n_matset,
axom::bump::views::MaterialInformation allMats,
axom::bump::views::MaterialInformation cleanMats,
axom::bump::views::MaterialInformation mixedMats 
) const
inlineprotected

Examine the materials and determine which are clean/mixed.

Parameters
n_matsetA Conduit node containing the matset.
[out]allMatsA vector of all of the materials.
[out]cleanMatsA vector of the clean materials.
[out]mixedMatsA vector of the mixed materials.

References AXOM_ANNOTATE_SCOPE, and axom::bump::views::materials().

◆ zonalFieldName()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
std::string axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::zonalFieldName ( int  matId) const
inlineprotected

Return the name of the zonal material field for a given matId.

Returns
The name of the zonal material field.

◆ nodalFieldName()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
std::string axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::nodalFieldName ( int  matId) const
inlineprotected

Return the name of the nodal material field for a given matId.

Returns
The name of the nodal material field.

◆ zonalMaterialIDName()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
std::string axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::zonalMaterialIDName ( ) const
inlineprotected

Return the name of the zonal material id field.

Returns
The name of the zonal material id field.

◆ originalNodesFieldName()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
std::string axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::originalNodesFieldName ( ) const
inlineprotected

Return the name of the original nodes field.

Returns
The name of the original nodes field.

◆ newNodesFieldName()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
std::string axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::newNodesFieldName ( ) const
inlineprotected

Return the name of the new nodes field that identifies blended nodes in the MIR output.

Returns
The name of the new nodes field.

◆ makeNodeCenteredVFs()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
void axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::makeNodeCenteredVFs ( const conduit::Node &  n_topo,
const conduit::Node &  n_coordset,
conduit::Node &  n_fields,
const axom::bump::views::MaterialInformation mixedMats 
) const
inlineprotected

◆ makeWorkingFields()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
void axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::makeWorkingFields ( const conduit::Node &  n_topo,
conduit::Node &  n_fields,
const axom::bump::views::MaterialInformation cleanMats,
const axom::bump::views::MaterialInformation AXOM_UNUSED_PARAMmixedMats 
) const
inlineprotected

Set up the "working fields", mainly a zonalMaterialID that includes the contributions from the clean materials and the first mixed material.

Parameters
n_topoA Conduit node containing the input topology pre-MIR.
n_fieldsA Conduit node containing the fields pre-MIR.
cleanMatsA vector of clean materials.
mixedMatsA vector of mixed materials.

References AXOM_ANNOTATE_SCOPE, AXOM_LAMBDA, axom::sidre::ConduitMemory::axomAllocIdToConduit(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::getAllocatorID(), and axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::zonalMaterialIDName().

◆ iteration()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
template<typename ITopologyView , typename ICoordsetView >
void axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::iteration ( int  iter,
const ITopologyView &  topoView,
const ICoordsetView &  coordsetView,
const axom::bump::views::MaterialInformation allMats,
const axom::bump::views::Material currentMat,
const conduit::Node &  n_topo,
const conduit::Node &  n_coordset,
conduit::Node &  n_fields,
const conduit::Node &  n_options,
conduit::Node &  n_newTopo,
conduit::Node &  n_newCoordset,
conduit::Node &  n_newFields 
) const
inlineprotected

Perform one iteration of material clipping.

Template Parameters
ITopologyViewThe topology view type for the intermediate topology.
ICoordsetViewThe topology view type for the intermediate coordset.
Parameters
iterThe iteration number.
topoViewThe topology view for the intermediate input topology.
coordsetViewThe coordset view for the intermediate input coordset.
allMatsA vector of Material information (all materials).
currentMatA Material object for the current material.
n_topoA Conduit node containing the intermediate input topology.
n_fieldsA Conduit node containing the intermediate input fields.
n_optionsMIR options.
n_newTopo[out]A Conduit node to contain the new topology.
n_newCoordset[out]A Conduit node to contain the new coordset.
n_newFields[out]A Conduit node to contain the new fields.
Note
This algorithm uses a TableBasedExtractor with a MaterialIntersector that gives it the ability to access nodal volume fraction fields and make intersection decisions with that data.

References axom::execution_space< ExecSpace >::allocatorID(), AXOM_ANNOTATE_SCOPE, AXOM_LAMBDA, AXOM_UNUSED_VAR, axom::Array< T, DIM, SPACE, StoragePolicy >::begin(), axom::copy(), axom::Array< T, DIM, SPACE, StoragePolicy >::data(), axom::Array< T, DIM, SPACE, StoragePolicy >::end(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::getAllocatorID(), axom::mir::MIRAlgorithm::localPath(), axom::bump::views::Material::m_number, axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::nodalFieldName(), axom::Array< T, DIM, SPACE, StoragePolicy >::push_back(), axom::mir::MIRAlgorithm::saveMesh(), axom::Array< T, DIM, SPACE, StoragePolicy >::size(), axom::sort(), axom::Array< T, DIM, SPACE, StoragePolicy >::view(), and axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::zonalMaterialIDName().

◆ buildNewMatset()

template<typename ExecSpace , typename TopologyView , typename CoordsetView , typename MatsetView >
void axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::buildNewMatset ( const conduit::Node &  n_matset,
conduit::Node &  n_newFields,
conduit::Node &  n_newMatset 
) const
inlineprotected

Build a new matset with only clean zones, representing the MIR output.

Parameters
n_matsetn_matset The Conduit node that contains the input matset.
[in,out]n_newFieldsThe Conduit node that contains the fields for the MIR output.
[out]n_newMatsetThe node that contains the new matset.

References AXOM_ANNOTATE_SCOPE, AXOM_LAMBDA, axom::sidre::ConduitMemory::axomAllocIdToConduit(), axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::getAllocatorID(), and axom::mir::EquiZAlgorithm< ExecSpace, TopologyView, CoordsetView, MatsetView >::zonalMaterialIDName().

◆ 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.

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