|
| 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...
|
| |
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
-
| ExecSpace | The execution space where the algorithm will run. |
| IndexPolicy | The structured mesh indexing policy. |
| CoordsetView | The view type that describes the coordinates. |
| MatsetView | The view type that describes matset. |
| MAX_VERTS_2D | The 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.
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_topo | The Conduit node containing the topology that will be used for MIR. |
| [in] | n_coordset | The Conduit node containing the coordset. |
| [in] | n_fields | The Conduit node containing the fields. |
| [in] | n_matset | The Conduit node containing the matset. |
| [in] | n_options | The Conduit node containing the options that help govern MIR execution. |
| [out] | n_newTopo | A node that will contain the new clipped topology. |
| [out] | n_newCoordset | A node that will contain the new coordset for the clipped topology. |
| [out] | n_newFields | A node that will contain the new fields for the clipped topology. |
| [out] | n_newMatset | A 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().
template<typename ExecSpace , typename IndexPolicy , typename CoordsetView , typename MatsetView , int MAX_VERTS_2D = 12>
Adds original ids field to supplied fields node.
- Parameters
-
| n_field | The new field node. |
| topoName | The topology name for the field. |
| association | The field association. |
| selectedZonesView | A 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().
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
-
| cleanZones | An array of clean zone ids. |
| n_root | The input mesh from which zones are being extracted. |
| n_topology | The node that contains the topology for the input mesh. |
| n_coordset | The node that contains the coordset for the input mesh. |
| n_matset | The node that contains the matset for the input mesh. |
| n_options | The options to inherit. |
| [out] | n_cleanOutput | The 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().
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] | mixedZonesView | A view that contains the list of mixed zones that we'll operate on. |
| [in] | n_topo | The Conduit node containing the topology that will be used for MIR. |
| [in] | n_coordset | The Conduit node containing the coordset. |
| [in] | n_fields | The Conduit node containing the fields. |
| [in] | n_matset | The Conduit node containing the matset. |
| [in] | n_options | The Conduit node containing the options that help govern MIR execution. |
| [out] | n_newTopo | A node that will contain the new clipped topology. |
| [out] | n_newCoordset | A node that will contain the new coordset for the clipped topology. |
| [out] | n_newFields | A node that will contain the new fields for the clipped topology. |
| [out] | n_newMatset | A 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().
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
-
| buildView | A view that lets us add a shape to the Blueprint output. |
| matZoneView | A view containing zone ids sorted by material count in the zone. |
| matCountView | A view containing material counts for the zones in matZoneView. |
| matOffsetView | A view containing the offset where fragment data will be stored. |
| sortedMaterialIdsView | A view containing the material ids for each fragment sorted by volume fraction (high to low). |
| fragmentVectorsView | A view that contains the normals for each fragment. |
| fragmentVFStencilView | A view that contains the VF stencil for each fragment. |
| max_iterations | The max allowable iterations to find the fragment shape. |
| tolerance | The 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.