|
AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Merge multiple unstructured Blueprint meshes (with matsets) through MeshInput. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/bump/MergeMeshes.hpp>

Public Member Functions | |
| 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 std::vector< MeshInput > &inputs, const conduit::Node &options, conduit::Node &output) const |
| Merge the input Blueprint meshes into a single Blueprint mesh. More... | |
Protected Member Functions | |
| bool | validInputs (const std::vector< MeshInput > &inputs) const |
| Check that the mesh inputs are valid and meet constraints. There must be 1 coordset/topology/matset. The coordset must be explicit and the topology must be unstructured and for now, non-polyhedral. More... | |
| void | singleInput (const std::vector< MeshInput > &inputs, conduit::Node &output) const |
| Merge a single input (copy it to the output). More... | |
| const conduit::Node & | getTopology (const MeshInput &input) const |
| Get the topology for the input, using the options, if available. More... | |
| const conduit::Node & | getCoordset (const MeshInput &input) const |
| Get the coordset for the input, using the options, if available. More... | |
| void | mergeInputs (const std::vector< MeshInput > &inputs, const conduit::Node &n_options, conduit::Node &output) const |
| Merge a multiple inputs. More... | |
| void | mergeCoordset (const std::vector< MeshInput > &inputs, conduit::Node &output) const |
| Merge multiple coordsets into a single coordset. No node merging takes place. More... | |
| template<typename DataArrayView > | |
| axom::IndexType | mergeCoordset_copy (const axom::ArrayView< axom::IndexType > nodeSliceView, axom::IndexType offset, DataArrayView compView, DataArrayView srcCompView) const |
| Assist setting merging coordset data. More... | |
| axom::IndexType | countNodes (const std::vector< MeshInput > &inputs, size_t index) const |
| Count the number of nodes in the index'th input mesh. More... | |
| axom::IndexType | countNodes (const std::vector< MeshInput > &inputs) const |
| Count the number of nodes in all input meshes. More... | |
| axom::IndexType | countZones (const std::vector< MeshInput > &inputs, size_t index) const |
| Count the number of zones in the index'th input mesh. More... | |
| void | countZones (const std::vector< MeshInput > &inputs, axom::IndexType &totalConnLength, axom::IndexType &totalZones, const std::string &elem_sizes=std::string("elements/sizes")) const |
| Count the number of nodes in all input meshes. More... | |
| template<typename ViewType > | |
| axom::IndexType | sumArrayView (ViewType view) const |
| Sum the sizes array view and return the value. More... | |
| std::map< std::string, int > | buildShapeMap (const std::vector< MeshInput > &inputs) const |
| Look through the input meshes and make a map of the shape types that are found. More... | |
| void | mergeTopology (const std::vector< MeshInput > &inputs, const conduit::Node &n_options, conduit::Node &output) const |
| Merge multiple topologies into a single topology. More... | |
| void | mergeTopologiesUnstructured (std::map< std::string, int > &shape_map, const std::vector< MeshInput > &inputs, const conduit::Node &n_options, conduit::Node &output) const |
| Merge multiple topologies into a single topology. More... | |
| std::vector< MeshInput > | makePolyhedralInputs (const std::vector< MeshInput > &inputs) const |
| Make a vector of mesh inputs where all meshes are polyhedral. If the meshes were already polyhedral then they are shallow-copied. More... | |
| template<typename TopologyView > | |
| void | makePolyhedralMesh (const TopologyView &topologyView, const conduit::Node &n_srcTopo, conduit::Node &n_phTopo) const |
| Make a polyhedral mesh given the input topology view. More... | |
| void | deleteMeshInputs (std::vector< MeshInput > &inputs) const |
| Delete the mesh inputs. More... | |
| void | mergeTopologiesPolyhedral (const std::vector< MeshInput > &inputs, const conduit::Node &n_options, conduit::Node &output) const |
| Merge the mesh inputs into a single polyhedral mesh. More... | |
| void | mergeTopologiesPolyhedralInner (const std::vector< MeshInput > &inputs, const conduit::Node &n_options, conduit::Node &output) const |
| Merge the mesh inputs into a single polyhedral mesh. More... | |
| template<typename ConnectivityView > | |
| void | mergeTopology_copy (axom::ArrayView< axom::IndexType > nodeMapView, axom::IndexType connOffset, axom::IndexType coordOffset, ConnectivityView connView, ConnectivityView srcConnView, ConnectivityView srcSizesView, ConnectivityView srcOffsetsView) const |
| Assist copying topology connectivity to the merged topology. More... | |
| template<typename IntegerView > | |
| void | mergeTopology_copy_sizes (axom::IndexType sizesOffset, IntegerView sizesView, IntegerView srcSizesView) const |
| Assist copying topology sizes to the merged topology. More... | |
| template<typename IntegerView > | |
| void | mergeTopology_copy_shapes (axom::IndexType shapesOffset, IntegerView shapesView, IntegerView srcShapesView) const |
| Copy shapes from the source mesh to the merged mesh. More... | |
| template<typename IntegerView > | |
| void | mergeTopology_default_shapes (axom::IndexType shapesOffset, IntegerView shapesView, axom::IndexType nzones, int shapeId) const |
| Set shapes in the merged mesh to a specific shape. More... | |
| void | mergeFields (const std::vector< MeshInput > &inputs, conduit::Node &output) const |
| Merge fields that exist on the various mesh inputs. Zero-fill values where a field does not exist in an input. More... | |
| void | copyZonal (const std::vector< MeshInput > &inputs, conduit::Node &n_values, const std::string &srcPath) const |
| Copy zonal field data into a Conduit node. More... | |
| template<typename DestView , typename SrcView > | |
| void | copyZonal_copy (axom::IndexType nzones, axom::IndexType offset, DestView destView, SrcView srcView) const |
| Copy zonal data from src to dest. More... | |
| template<typename DestView > | |
| void | fillValues (axom::IndexType nvalues, axom::IndexType offset, DestView destView) const |
| Fill data in dest. More... | |
| void | copyNodal (const std::vector< MeshInput > &inputs, conduit::Node &n_values, const std::string &srcPath) const |
| Copy nodal field data into a Conduit node. More... | |
| template<typename SrcViewType , typename DestViewType > | |
| void | copyNodal_copy (axom::ArrayView< axom::IndexType > nodeSliceView, axom::IndexType nnodes, axom::IndexType offset, SrcViewType destView, DestViewType srcView) const |
| Copy nodal data from src to dest. More... | |
| virtual void | mergeMatset (const std::vector< MeshInput > &AXOM_UNUSED_PARAM(inputs), conduit::Node &AXOM_UNUSED_PARAM(output)) const |
| Merge matsets that exist on the various mesh inputs. More... | |
Protected Attributes | |
| int | m_allocator_id |
Merge multiple unstructured Blueprint meshes (with matsets) through MeshInput.
| ExecSpace | The execution space where the algorithm will run. |
| MaterialDispatch | A policy that helps determine how materials are dispatched. The default is to handle any type of matset but that can generate a lot of code. |
|
inlineinherited |
Set the allocator id to use when allocating memory.
| allocator_id | The allocator id to use when allocating memory. |
References axom::isValidAllocatorID(), axom::bump::MergeMeshes< ExecSpace >::m_allocator_id, and SLIC_ERROR_IF.
|
inlineinherited |
Get the allocator id to use when allocating memory.
References axom::bump::MergeMeshes< ExecSpace >::m_allocator_id.
|
inlineinherited |
Merge the input Blueprint meshes into a single Blueprint mesh.
| inputs | A vector of inputs to be merged. | |
| options | A Node containing algorithm options. | |
| [out] | output | The node that will contain the merged mesh. |
The options node may contain a "topology" string that designates the name of the topology to be merged.
References AXOM_ANNOTATE_SCOPE, axom::bump::MergeMeshes< ExecSpace >::mergeInputs(), axom::bump::MergeMeshes< ExecSpace >::singleInput(), SLIC_ASSERT_MSG, and axom::bump::MergeMeshes< ExecSpace >::validInputs().
|
inlineprotectedinherited |
Check that the mesh inputs are valid and meet constraints. There must be 1 coordset/topology/matset. The coordset must be explicit and the topology must be unstructured and for now, non-polyhedral.
| inputs | The mesh inputs. |
References axom::bump::MergeMeshes< ExecSpace >::getCoordset(), and axom::bump::MergeMeshes< ExecSpace >::getTopology().
|
inlineprotectedinherited |
Merge a single input (copy it to the output).
| inputs | A vector of inputs to be merged. | |
| [out] | output | The node that will contain the merged mesh. |
References axom::bump::MergeMeshes< ExecSpace >::getAllocatorID().
|
inlineprotectedinherited |
Get the topology for the input, using the options, if available.
| input | The mesh input. |
| options | The options. If "topology" is present then we attempt to return that topology from the mesh input. Otherwise, the first topology is returned. |
References axom::bump::MeshInput::m_input, and axom::bump::MeshInput::m_topologyName.
|
inlineprotectedinherited |
Get the coordset for the input, using the options, if available.
| input | The mesh input. |
| options | The options. If "topology" is present then we attempt to return the coordset for that topology from the mesh input. Otherwise, the first coordset is returned. |
References axom::bump::MergeMeshes< ExecSpace >::getTopology(), and axom::bump::MeshInput::m_input.
|
inlineprotectedinherited |
Merge a multiple inputs.
| inputs | A vector of inputs to be merged. | |
| n_options | A node containing options. | |
| [out] | output | The node that will contain the merged mesh. |
References axom::bump::MergeMeshes< ExecSpace >::mergeCoordset(), axom::bump::MergeMeshes< ExecSpace >::mergeFields(), axom::bump::MergeMeshes< ExecSpace >::mergeMatset(), and axom::bump::MergeMeshes< ExecSpace >::mergeTopology().
|
inlineprotectedinherited |
Merge multiple coordsets into a single coordset. No node merging takes place.
| inputs | A vector of inputs to be merged. | |
| [out] | output | The node that will contain the output mesh. |
References AXOM_ANNOTATE_SCOPE, axom::sidre::ConduitMemory::axomAllocIdToConduit(), axom::bump::MergeMeshes< ExecSpace >::countNodes(), axom::bump::MergeMeshes< ExecSpace >::getAllocatorID(), axom::bump::MergeMeshes< ExecSpace >::getCoordset(), axom::bump::MergeMeshes< ExecSpace >::mergeCoordset_copy(), and SLIC_ASSERT.
|
inlineprotectedinherited |
Assist setting merging coordset data.
| nodeSliceView | The view that contains a node slice for the current input mesh. |
| offset | The current write offset in the new coordset. |
| compView | The view that exposes the current output coordinate component. |
| srcCompView | The view that exposes the current output source coordinate component. |
References AXOM_LAMBDA, and axom::ArrayView< T, DIM, SPACE >::size().
|
inlineprotectedinherited |
Count the number of nodes in the index'th input mesh.
| inputs | The vector of input meshes. |
| index | The index of the mesh to count. |
References axom::bump::MergeMeshes< ExecSpace >::getCoordset(), and SLIC_ASSERT.
|
inlineprotectedinherited |
Count the number of nodes in all input meshes.
| inputs | The vector of input meshes. |
References axom::bump::MergeMeshes< ExecSpace >::countNodes().
|
inlineprotectedinherited |
Count the number of zones in the index'th input mesh.
| inputs | The vector of input meshes. |
| index | The index of the mesh to count. |
References axom::bump::MergeMeshes< ExecSpace >::getTopology().
|
inlineprotectedinherited |
Count the number of nodes in all input meshes.
| inputs | The vector of input meshes. | |
| [out] | totalConnLength | The total connectivity length for all meshes. |
| [out] | totalZones | The total zones for all meshes. |
| elem_sizes | The name of the element sizes key. |
References axom::bump::MergeMeshes< ExecSpace >::getTopology(), SLIC_ASSERT, and axom::bump::MergeMeshes< ExecSpace >::sumArrayView().
|
inlineprotectedinherited |
Sum the sizes array view and return the value.
| sizesView | The view that contains the sizes. |
References AXOM_LAMBDA, axom::serial::reductions::ReduceSum< ExecSpace, T >::get(), and SLIC_ERROR_IF.
|
inlineprotectedinherited |
Look through the input meshes and make a map of the shape types that are found.
| inputs | The vector of mesh inputs. |
References axom::bump::MergeMeshes< ExecSpace >::getTopology(), axom::bump::views::shapeNameToID(), and SLIC_ASSERT.
|
inlineprotectedinherited |
Merge multiple topologies into a single topology.
| inputs | A vector of inputs to be merged. | |
| n_options | A node that contains the options. | |
| [out] | output | The node that will contain the output mesh. |
References axom::bump::MergeMeshes< ExecSpace >::buildShapeMap(), axom::bump::MergeMeshes< ExecSpace >::mergeTopologiesPolyhedral(), axom::bump::MergeMeshes< ExecSpace >::mergeTopologiesUnstructured(), and axom::bump::views::PolyhedronTraits::name().
|
inlineprotectedinherited |
Merge multiple topologies into a single topology.
| shape_map | A map of the shapes that are present in the inputs. | |
| inputs | A vector of inputs to be merged. | |
| n_options | A node that contains the options. | |
| [out] | output | The node that will contain the output mesh. |
References AXOM_ANNOTATE_SCOPE, axom::sidre::ConduitMemory::axomAllocIdToConduit(), axom::bump::MergeMeshes< ExecSpace >::countNodes(), axom::bump::MergeMeshes< ExecSpace >::countZones(), axom::bump::MergeMeshes< ExecSpace >::getAllocatorID(), axom::bump::MergeMeshes< ExecSpace >::getTopology(), axom::bump::views::PolygonTraits::id(), axom::bump::MergeMeshes< ExecSpace >::mergeTopology_copy(), axom::bump::MergeMeshes< ExecSpace >::mergeTopology_copy_shapes(), axom::bump::MergeMeshes< ExecSpace >::mergeTopology_copy_sizes(), axom::bump::MergeMeshes< ExecSpace >::mergeTopology_default_shapes(), axom::bump::views::PolygonTraits::name(), and axom::bump::views::shapeNameToID().
|
inlineprotectedinherited |
Make a vector of mesh inputs where all meshes are polyhedral. If the meshes were already polyhedral then they are shallow-copied.
| inputs | The vector of mesh inputs to make polyhedral. |
References AXOM_ANNOTATE_SCOPE, axom::bump::views::buildShapeMap(), axom::bump::MergeMeshes< ExecSpace >::getAllocatorID(), axom::bump::MergeMeshes< ExecSpace >::getCoordset(), axom::bump::MergeMeshes< ExecSpace >::getTopology(), axom::bump::MergeMeshes< ExecSpace >::makePolyhedralMesh(), axom::bump::views::TetTraits::name(), axom::bump::views::PyramidTraits::name(), axom::bump::views::WedgeTraits::name(), axom::bump::views::HexTraits::name(), SLIC_INFO, and axom::bump::views::make_unstructured_single_shape_topology< ShapeType >::view().
|
inlineprotectedinherited |
Make a polyhedral mesh given the input topology view.
References axom::bump::MergePolyhedralFaces< ExecSpace, ConnectivityType >::execute(), axom::bump::MakePolyhedralTopology< ExecSpace, TopologyView >::execute(), axom::bump::MergeMeshes< ExecSpace >::getAllocatorID(), and axom::bump::MakePolyhedralTopology< ExecSpace, TopologyView >::setAllocatorID().
|
inlineprotectedinherited |
Delete the mesh inputs.
| inputs | The mesh inputs to delete. |
|
inlineprotectedinherited |
Merge the mesh inputs into a single polyhedral mesh.
| inputs | The mesh inputs. | |
| n_options | A node that contains the options. | |
| [out] | output | The Conduit node that will contain the merged polyhedral mesh. |
References AXOM_ANNOTATE_SCOPE, axom::bump::MergeMeshes< ExecSpace >::deleteMeshInputs(), axom::bump::MergeMeshes< ExecSpace >::makePolyhedralInputs(), and axom::bump::MergeMeshes< ExecSpace >::mergeTopologiesPolyhedralInner().
|
inlineprotectedinherited |
Merge the mesh inputs into a single polyhedral mesh.
| inputs | The polyhedral mesh inputs. | |
| n_options | A node that contains the options. | |
| [out] | output | The Conduit node that will contain the merged polyhedral mesh. |
References AXOM_ANNOTATE_SCOPE, axom::sidre::ConduitMemory::axomAllocIdToConduit(), axom::bump::MergeMeshes< ExecSpace >::countNodes(), axom::bump::MergeMeshes< ExecSpace >::countZones(), axom::bump::MergeMeshes< ExecSpace >::getAllocatorID(), axom::bump::MergeMeshes< ExecSpace >::getTopology(), axom::bump::MergeMeshes< ExecSpace >::mergeTopology_copy(), and axom::bump::MergeMeshes< ExecSpace >::mergeTopology_copy_sizes().
|
inlineprotectedinherited |
Assist copying topology connectivity to the merged topology.
| nodeMapView | The node map. |
| connOffset | The write offset in the new connectivity. |
| coordOffset | The current mesh's coordinate offset in the new coordinates. |
| connView | The view that contains the new merged connectivity. |
| srcConnView | The view that contains the source connectivity. |
References AXOM_LAMBDA, axom::bump::MergeMeshes< ExecSpace >::getAllocatorID(), axom::ArrayView< T, DIM, SPACE >::size(), and axom::Array< T, DIM, SPACE, StoragePolicy >::view().
|
inlineprotectedinherited |
Assist copying topology sizes to the merged topology.
| sizesOffset | The write offset for sizes in the new connectivity. |
| sizesView | The view that contains sizes for the new connectivity. |
| srcSizesView | The view that contains sizes for the input mesh. |
References AXOM_LAMBDA.
|
inlineprotectedinherited |
Copy shapes from the source mesh to the merged mesh.
| shapesOffset | The write offset for the shapes. |
| shapesView | The view that exposes shapes for the merged mesh. |
| srcShapesView | The view that exposes shapes for the source mesh. |
References AXOM_LAMBDA.
|
inlineprotectedinherited |
Set shapes in the merged mesh to a specific shape.
| shapesOffset | The write offset for the shapes. |
| shapesView | The view that exposes shapes for the merged mesh. |
| srcShapesView | The view that exposes shapes for the source mesh. |
References AXOM_LAMBDA.
|
inlineprotectedinherited |
Merge fields that exist on the various mesh inputs. Zero-fill values where a field does not exist in an input.
| inputs | A vector of inputs to be merged. | |
| [out] | output | The node that will contain the output mesh. |
References AXOM_ANNOTATE_SCOPE, axom::sidre::ConduitMemory::axomAllocIdToConduit(), axom::bump::MergeMeshes< ExecSpace >::copyNodal(), axom::bump::MergeMeshes< ExecSpace >::copyZonal(), axom::bump::MergeMeshes< ExecSpace >::countNodes(), axom::bump::MergeMeshes< ExecSpace >::countZones(), axom::bump::MergeMeshes< ExecSpace >::getAllocatorID(), axom::bump::MergeMeshes< ExecSpace >::FieldInformation::m_association, axom::bump::MergeMeshes< ExecSpace >::FieldInformation::m_components, axom::bump::MergeMeshes< ExecSpace >::FieldInformation::m_dtype, and axom::bump::MergeMeshes< ExecSpace >::FieldInformation::m_topology.
|
inlineprotectedinherited |
Copy zonal field data into a Conduit node.
| inputs | A vector of inputs to be merged. | |
| [out] | n_values | The node will be populated with data values from the field inputs. |
| srcPath | The path to the source data in each input node. |
References axom::bump::MergeMeshes< ExecSpace >::copyZonal_copy(), axom::bump::MergeMeshes< ExecSpace >::countZones(), and axom::bump::MergeMeshes< ExecSpace >::fillValues().
|
inlineprotectedinherited |
Copy zonal data from src to dest.
| nzones | The number of zones. |
| offset | The current write offset. |
| destView | The view that exposes the new merged field. |
| srcView | The view that exposes the source field. |
References AXOM_LAMBDA.
|
inlineprotectedinherited |
Fill data in dest.
| nvalues | The number of values. |
| offset | The current write offset. |
| destView | The view that exposes the new merged field. |
References AXOM_LAMBDA.
|
inlineprotectedinherited |
Copy nodal field data into a Conduit node.
| inputs | A vector of inputs to be merged. | |
| [out] | n_values | The node will be populated with data values from the field inputs. |
| srcPath | The path to the source data in each input node. |
References axom::bump::MergeMeshes< ExecSpace >::copyNodal_copy(), axom::bump::MergeMeshes< ExecSpace >::countNodes(), and axom::bump::MergeMeshes< ExecSpace >::fillValues().
|
inlineprotectedinherited |
Copy nodal data from src to dest.
| nodeSliceView | The nodes we're pulling out (if populated). |
| nnodes | The number of nodes. |
| offset | The current write offset. |
| destView | The view that exposes the new merged field. |
| srcView | The view that exposes the source field. |
References AXOM_LAMBDA, axom::ArrayView< T, DIM, SPACE >::empty(), and axom::ArrayView< T, DIM, SPACE >::size().
|
inlineprotectedvirtualinherited |
Merge matsets that exist on the various mesh inputs.
| inputs | A vector of inputs to be merged. | |
| [out] | output | The node that will contain the output mesh. |
|
protectedinherited |