AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces > Struct Template Reference

This class is a view that exposes shapes in MIR topology and coordset views as primal shapes. SFINAE is used for the getShape() method. More...

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

Inheritance diagram for axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >:

Public Types

using value_type = typename CoordsetView::value_type
 
using Polygon = axom::primal::Polygon< value_type, CoordsetView::dimension(), axom::primal::PolygonArray::Static, MAX_VERTS_2D >
 
using Tetrahedron = axom::primal::Tetrahedron< value_type, CoordsetView::dimension()>
 
using Hexahedron = axom::primal::Hexahedron< value_type, CoordsetView::dimension()>
 
using Polyhedron = typename AdaptPolyhedron< TopologyView, CoordsetView, makeFaces >::PolyhedralRepresentation
 
using BoundingBox = axom::primal::BoundingBox< value_type, CoordsetView::dimension()>
 

Public Member Functions

AXOM_HOST_DEVICE PrimalAdaptor (const TopologyView &topologyView, const CoordsetView &coordsetView)
 Constructor. More...
 
AXOM_HOST_DEVICE axom::IndexType numberOfZones () const
 Return the number of zones in the associated topology view. More...
 
AXOM_HOST_DEVICE BoundingBox getBoundingBox (axom::IndexType zi) const
 Return the bounding box for the zi'th zone. More...
 
template<int TDIM = CoordsetView::dimension()>
AXOM_HOST_DEVICE std::enable_if< TDIM==2, Polygon >::type getShape (axom::IndexType zi) const
 Get the zone zi as a polygon. This is enabled when the input topology is 2D. More...
 
template<int TDIM = CoordsetView::dimension(), typename ShapeType = typename TopologyView::ShapeType>
AXOM_HOST_DEVICE std::enable_if< TDIM==3 &&std::is_same< ShapeType, axom::bump::views::TetShape< typename ShapeType::ConnectivityStorage > >::value, Tetrahedron >::type getShape (axom::IndexType zi) const
 Get the zone zi as a Tetrahedron. This is enabled when the input topology contains tets. More...
 
template<int TDIM = CoordsetView::dimension(), typename ShapeType = typename TopologyView::ShapeType>
AXOM_HOST_DEVICE std::enable_if< TDIM==3 &&std::is_same< ShapeType, axom::bump::views::HexShape< typename ShapeType::ConnectivityStorage > >::value, Hexahedron >::type getShape (axom::IndexType zi) const
 Get the zone zi as a Hexahedron. This is enabled when the input topology contains hexs. More...
 
template<int TDIM = CoordsetView::dimension(), typename ShapeType = typename TopologyView::ShapeType>
AXOM_HOST_DEVICE std::enable_if<(TDIM==3) &&(std::is_same< ShapeType, axom::bump::views::PyramidShape< typename ShapeType::ConnectivityType >>::value||std::is_same< ShapeType, axom::bump::views::WedgeShape< typename ShapeType::ConnectivityType >>::value||std::is_same< ShapeType, axom::bump::views::VariableShape< typename ShapeType::ConnectivityType >>::value), axom::bump::VariableShape< value_type, 3 > >::type getShape (axom::IndexType zi) const
 Get the zone zi as a VariableShape. This is enabled when the input topology contains wedges, pyramids, or mixed shapes. More...
 
template<int TDIM = CoordsetView::dimension(), typename ShapeType = typename TopologyView::ShapeType>
AXOM_HOST_DEVICE std::enable_if< TDIM==3 &&ShapeType::is_polyhedral(), Polyhedron >::type getShape (axom::IndexType zi) const
 Get the zone zi as a Polyhedron. This is enabled when the input topology contains polyhedra. More...
 

Public Attributes

TopologyView m_topologyView
 
CoordsetView m_coordsetView
 

Detailed Description

template<typename TopologyView, typename CoordsetView, int MAX_VERTS_2D = 12, bool makeFaces = false>
struct axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >

This class is a view that exposes shapes in MIR topology and coordset views as primal shapes. SFINAE is used for the getShape() method.

Template Parameters
TopologyViewThe topology view type.
CoordsetViewThe coordset view type.
MAX_VERTS_2DThe maximum number of vertices allowed in a polygon.
makeFacesWhether to make faces for polyhedral shapes or to make primal::Polyhedron.

Member Typedef Documentation

◆ value_type

template<typename TopologyView , typename CoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = false>
using axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::value_type = typename CoordsetView::value_type

◆ Polygon

template<typename TopologyView , typename CoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = false>
using axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::Polygon = axom::primal::Polygon<value_type, CoordsetView::dimension(), axom::primal::PolygonArray::Static, MAX_VERTS_2D>

◆ Tetrahedron

template<typename TopologyView , typename CoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = false>
using axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::Tetrahedron = axom::primal::Tetrahedron<value_type, CoordsetView::dimension()>

◆ Hexahedron

template<typename TopologyView , typename CoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = false>
using axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::Hexahedron = axom::primal::Hexahedron<value_type, CoordsetView::dimension()>

◆ Polyhedron

template<typename TopologyView , typename CoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = false>
using axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::Polyhedron = typename AdaptPolyhedron<TopologyView, CoordsetView, makeFaces>::PolyhedralRepresentation

◆ BoundingBox

template<typename TopologyView , typename CoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = false>
using axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::BoundingBox = axom::primal::BoundingBox<value_type, CoordsetView::dimension()>

Constructor & Destructor Documentation

◆ PrimalAdaptor()

template<typename TopologyView , typename CoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = false>
AXOM_HOST_DEVICE axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::PrimalAdaptor ( const TopologyView &  topologyView,
const CoordsetView &  coordsetView 
)
inline

Constructor.

Parameters
topologyViewThe topology view to use for initialization.
coordsetViewThe coordset view to use for initialization.

Member Function Documentation

◆ numberOfZones()

template<typename TopologyView , typename CoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = false>
AXOM_HOST_DEVICE axom::IndexType axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::numberOfZones ( ) const
inline

Return the number of zones in the associated topology view.

Returns
The number of zones in the associated topology view.

References axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::m_topologyView.

◆ getBoundingBox()

template<typename TopologyView , typename CoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = false>
AXOM_HOST_DEVICE BoundingBox axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::getBoundingBox ( axom::IndexType  zi) const
inline

Return the bounding box for the zi'th zone.

Parameters
ziThe index of the zone whose bounding box we want.
Returns
The bounding box of the zi'th zone.

References axom::primal::BoundingBox< T, NDIMS >::addPoint(), axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::m_coordsetView, and axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::m_topologyView.

◆ getShape() [1/5]

template<typename TopologyView , typename CoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = false>
template<int TDIM = CoordsetView::dimension()>
AXOM_HOST_DEVICE std::enable_if<TDIM == 2, Polygon>::type axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::getShape ( axom::IndexType  zi) const
inline

Get the zone zi as a polygon. This is enabled when the input topology is 2D.

Parameters
ziThe index of the zone we want to return.
Returns
A Polygon that represents the zone from the input topology.

References axom::primal::Polygon< T, NDIMS, ARRAY_TYPE, MAX_VERTS >::addVertex(), axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::m_coordsetView, and axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::m_topologyView.

◆ getShape() [2/5]

template<typename TopologyView , typename CoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = false>
template<int TDIM = CoordsetView::dimension(), typename ShapeType = typename TopologyView::ShapeType>
AXOM_HOST_DEVICE std::enable_if< TDIM == 3 && std::is_same<ShapeType, axom::bump::views::TetShape<typename ShapeType::ConnectivityStorage> >::value, Tetrahedron>::type axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::getShape ( axom::IndexType  zi) const
inline

Get the zone zi as a Tetrahedron. This is enabled when the input topology contains tets.

Parameters
ziThe index of the zone we want to return.
Returns
A Tetrahedron that represents the zone from the input topology.

References axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::m_coordsetView, and axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::m_topologyView.

◆ getShape() [3/5]

template<typename TopologyView , typename CoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = false>
template<int TDIM = CoordsetView::dimension(), typename ShapeType = typename TopologyView::ShapeType>
AXOM_HOST_DEVICE std::enable_if< TDIM == 3 && std::is_same<ShapeType, axom::bump::views::HexShape<typename ShapeType::ConnectivityStorage> >::value, Hexahedron>::type axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::getShape ( axom::IndexType  zi) const
inline

Get the zone zi as a Hexahedron. This is enabled when the input topology contains hexs.

Parameters
ziThe index of the zone we want to return.
Returns
A Hexahedron that represents the zone from the input topology.

References axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::m_coordsetView, and axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::m_topologyView.

◆ getShape() [4/5]

template<typename TopologyView , typename CoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = false>
template<int TDIM = CoordsetView::dimension(), typename ShapeType = typename TopologyView::ShapeType>
AXOM_HOST_DEVICE std::enable_if< (TDIM == 3) && (std::is_same<ShapeType, axom::bump::views::PyramidShape<typename ShapeType::ConnectivityType>>::value || std::is_same<ShapeType, axom::bump::views::WedgeShape<typename ShapeType::ConnectivityType>>::value || std::is_same<ShapeType, axom::bump::views::VariableShape<typename ShapeType::ConnectivityType>>::value), axom::bump::VariableShape<value_type, 3> >::type axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::getShape ( axom::IndexType  zi) const
inline

Get the zone zi as a VariableShape. This is enabled when the input topology contains wedges, pyramids, or mixed shapes.

Parameters
ziThe index of the zone we want to return.
Returns
A VariableShape that represents the zone from the input topology. VariableShape is used because primal lacks Pyramid, Wedge classes and because if we're using this, we might have a mesh with mixed zone types.

References axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::m_coordsetView, axom::bump::VariableShape< T, NDIMS, N >::m_shapeId, axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::m_topologyView, and axom::bump::VariableShape< T, NDIMS, N >::push_back().

◆ getShape() [5/5]

template<typename TopologyView , typename CoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = false>
template<int TDIM = CoordsetView::dimension(), typename ShapeType = typename TopologyView::ShapeType>
AXOM_HOST_DEVICE std::enable_if<TDIM == 3 && ShapeType::is_polyhedral(), Polyhedron>::type axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::getShape ( axom::IndexType  zi) const
inline

Get the zone zi as a Polyhedron. This is enabled when the input topology contains polyhedra.

Parameters
ziThe index of the zone we want to return.
Returns
A Polyhedron that represents the zone from the input topology.

References axom::bump::AdaptPolyhedron< TopologyView, CoordsetView, makeFaces >::convert(), axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::m_coordsetView, and axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::m_topologyView.

Member Data Documentation

◆ m_topologyView

template<typename TopologyView , typename CoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = false>
TopologyView axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::m_topologyView

◆ m_coordsetView

template<typename TopologyView , typename CoordsetView , int MAX_VERTS_2D = 12, bool makeFaces = false>
CoordsetView axom::bump::PrimalAdaptor< TopologyView, CoordsetView, MAX_VERTS_2D, makeFaces >::m_coordsetView

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