Make a new topology and coordset by extracting certain zones from the input mesh.
More...
|
| axom::ArrayView< axom::IndexType > | zoneSliceView (const SelectedZonesView &selectedZonesView, const Sizes &extra) |
| | Create a zone slice view, building m_zoneSlice if needed. More...
|
| |
| Sizes | getExtra (const conduit::Node &n_options) const |
| | Return a Sizes object initialized from the options. More...
|
| |
| Sizes | nodeMap (const SelectedZonesView &selectedZonesView, const Sizes &extra, axom::Array< ConnectivityType > &AXOM_UNUSED_PARAM(old2new), axom::Array< axom::IndexType > &nodeSlice) const |
| | Make node map and node slice information for the selected zones but do not limit the selection to only the used nodes. More...
|
| |
| Sizes | compactNodeMap (const SelectedZonesView selectedZonesView, const Sizes &extra, axom::Array< ConnectivityType > &old2new, axom::Array< axom::IndexType > &nodeSlice) const |
| | Make node map and node slice information for the selected zones selecting only the used nodes. More...
|
| |
| virtual void | makeTopology (const SelectedZonesView selectedZonesView, const Sizes &dataSizes, const Sizes &extra, const axom::ArrayView< ConnectivityType > &old2newView, const conduit::Node &n_topo, const conduit::Node &n_options, conduit::Node &n_newTopo) const |
| | Make the output topology for just the selected zones. More...
|
| |
| void | makeCoordset (const SliceData &nodeSlice, const conduit::Node &n_coordset, conduit::Node &n_newCoordset) const |
| | Make the new coordset using the blend data and the input coordset/coordsetview. More...
|
| |
| void | makeFields (const SliceData &nodeSlice, const SliceData &zoneSlice, const std::string &newTopoName, const conduit::Node &n_fields, conduit::Node &n_newFields) const |
| | Make fields for the output mesh, as needed. More...
|
| |
| std::string | topologyName (const conduit::Node &n_input, const conduit::Node &n_options) const |
| | Get the topology name. More...
|
| |
| bool | compact (const conduit::Node &n_options) const |
| | Return whether coordset/vertex compaction is desired. More...
|
| |
| std::string | outputShape (const conduit::Node &n_topo) const |
| | Return the name of the output shape type. More...
|
| |
template<typename ExecSpace, typename TopologyView, typename CoordsetView>
class axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >
Make a new topology and coordset by extracting certain zones from the input mesh.
- Template Parameters
-
| ExecSpace | The execution space where the algorithm will run. |
| TopologyView | The topology view type on which the algorithm will run. |
template<typename ExecSpace , typename TopologyView , typename CoordsetView >
| void axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::execute |
( |
const SelectedZonesView & |
selectedZonesView, |
|
|
const conduit::Node & |
n_input, |
|
|
const conduit::Node & |
n_options, |
|
|
conduit::Node & |
n_output |
|
) |
| |
|
inline |
Select zones from the input mesh by id and output them in the output mesh.
- Parameters
-
| selectedZonesView | A view that contains the selected zone ids. |
| n_input | The input mesh. |
| n_options | The input options. |
| [out] | n_output | The output mesh. |
The n_options node controls how the algorithm works.
topology: mesh
compact: 1
extra:
nodes: 0
zones: 0
connectivity: 0
The "topology" node contains a string that selects the name of the topology to extract. The "compact" node causes the algorithm to restrict the output coordset and vertex fields to only the nodes used by the selected zones. If "compact" is set to 0 then the original coordset and vertex fields will retain their size in the output mesh. The "extra" node is optional and it contains 3 integer values for extra allocation to be made for nodes, zones, and connectivity. This extra space can be filled in later by the application.
References AXOM_ANNOTATE_SCOPE, axom::sidre::ConduitMemory::axomAllocIdToConduit(), axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::compact(), axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::compactNodeMap(), axom::bump::Options::coordsetName(), axom::copy(), axom::ArrayView< T, DIM, SPACE >::data(), axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::getAllocatorID(), axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::getExtra(), axom::bump::SliceData::m_indicesView, axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::makeCoordset(), axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::makeFields(), axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::makeTopology(), axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::nodeMap(), axom::bump::Options::originalElementsField(), axom::ArrayView< T, DIM, SPACE >::size(), axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::topologyName(), axom::bump::Options::topologyName(), axom::Array< T, DIM, SPACE, StoragePolicy >::view(), and axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::zoneSliceView().
template<typename ExecSpace , typename TopologyView , typename CoordsetView >
Create a zone slice view, building m_zoneSlice if needed.
- Parameters
-
| selectedZonesView | A view that contains the selected zone ids. |
| extra | A Sizes object containing any extra size that needs to be allocated. |
- Returns
- An array view containing the zone slice.
References AXOM_LAMBDA, axom::copy(), axom::ArrayView< T, DIM, SPACE >::data(), axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::getAllocatorID(), axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::m_zoneSlice, axom::Array< T, DIM, SPACE, StoragePolicy >::size(), axom::ArrayView< T, DIM, SPACE >::size(), axom::Array< T, DIM, SPACE, StoragePolicy >::view(), and axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::Sizes::zones.
template<typename ExecSpace , typename TopologyView , typename CoordsetView >
Make node map and node slice information for the selected zones but do not limit the selection to only the used nodes.
- Parameters
-
| selectedZonesView | The selected zones. |
| extra | A Sizes object containing any extra sizes to use for allocation. |
| [out] | old2new | An array that contains the new node id for each node in the mesh. |
| [out] | nodeSlice | An array that contains the node ids that will be selected from the input mesh when making coordsets and vertex fields. |
- Returns
- A Sizes object that contains the size of the nodes,zones,connectivity (excluding extra) for the output mesh.
- Note
- old2new is not used in this method.
References AXOM_ANNOTATE_SCOPE, AXOM_LAMBDA, axom::ArrayView< T, DIM, SPACE >::empty(), axom::serial::reductions::ReduceSum< ExecSpace, T >::get(), axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::getAllocatorID(), axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::m_coordsetView, axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::m_topologyView, axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::Sizes::nodes, axom::ArrayView< T, DIM, SPACE >::size(), SLIC_ERROR_IF, and axom::Array< T, DIM, SPACE, StoragePolicy >::view().
template<typename ExecSpace , typename TopologyView , typename CoordsetView >
Make node map and node slice information for the selected zones selecting only the used nodes.
- Parameters
-
| selectedZonesView | The selected zones. |
| extra | A Sizes object containing any extra sizes to use for allocation. |
| [out] | old2new | An array that contains the new node id for each node in the mesh. |
| [out] | nodeSlice | An array that contains the node ids that will be selected from the input mesh when making coordsets and vertex fields. |
- Returns
- A Sizes object that contains the size of the nodes,zones,connectivity (excluding extra) for the output mesh.
References AXOM_ANNOTATE_SCOPE, AXOM_LAMBDA, axom::ArrayView< T, DIM, SPACE >::empty(), axom::Array< T, DIM, SPACE, StoragePolicy >::fill(), axom::serial::reductions::ReduceSum< ExecSpace, T >::get(), axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::getAllocatorID(), axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::m_coordsetView, axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::m_topologyView, axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::Sizes::nodes, axom::ArrayView< T, DIM, SPACE >::size(), SLIC_ERROR_IF, SLIC_INFO, and axom::Array< T, DIM, SPACE, StoragePolicy >::view().
template<typename ExecSpace , typename TopologyView , typename CoordsetView >
| virtual void axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::makeTopology |
( |
const SelectedZonesView |
selectedZonesView, |
|
|
const Sizes & |
dataSizes, |
|
|
const Sizes & |
extra, |
|
|
const axom::ArrayView< ConnectivityType > & |
old2newView, |
|
|
const conduit::Node & |
n_topo, |
|
|
const conduit::Node & |
n_options, |
|
|
conduit::Node & |
n_newTopo |
|
) |
| const |
|
inlineprotectedvirtual |
Make the output topology for just the selected zones.
- Parameters
-
| selectedZonesView | A view that contains the ids of the zones to extract. |
| dataSizes | Array sizes for connectivity, sizes, etc. |
| extra | Extra sizes for connectivity, sizes, etc. |
| old2newView | A view that lets us map old node numbers to new node numbers. |
| n_topo | The input topology. |
| n_options | A node containing the options. |
| n_newTopo | A node to contain the new topology. |
References AXOM_ANNOTATE_SCOPE, AXOM_LAMBDA, axom::sidre::ConduitMemory::axomAllocIdToConduit(), axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::compact(), axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::Sizes::connectivity, axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::getAllocatorID(), axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::m_topologyView, axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::outputShape(), axom::ArrayView< T, DIM, SPACE >::size(), SLIC_ERROR, and axom::bump::ExtractZones< ExecSpace, TopologyView, CoordsetView >::Sizes::zones.