VTK-m  2.2
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
vtkm::cont::CellSetSingleType< ConnectivityStorageTag > Class Template Reference

An explicit cell set with all cells of the same shape. More...

#include <CastAndCall.h>

Public Member Functions

 CellSetSingleType ()
 
 CellSetSingleType (const Thisclass &src)
 
 CellSetSingleType (Thisclass &&src) noexcept
 
Thisclassoperator= (const Thisclass &src)
 
Thisclassoperator= (Thisclass &&src) noexcept
 
 ~CellSetSingleType () override
 
void PrepareToAddCells (vtkm::Id numCells, vtkm::Id connectivityMaxLen)
 Start adding cells one at a time. More...
 
template<typename IdVecType >
void AddCell (vtkm::UInt8 shapeId, vtkm::IdComponent numVertices, const IdVecType &ids)
 Add a cell. More...
 
void CompleteAddingCells (vtkm::Id numPoints)
 Finish adding cells one at a time. More...
 
void Fill (vtkm::Id numPoints, vtkm::UInt8 shapeId, vtkm::IdComponent numberOfPointsPerCell, const vtkm::cont::ArrayHandle< vtkm::Id, ConnectivityStorageTag > &connectivity)
 Set all the cells of the mesh. More...
 
vtkm::Id GetCellShapeAsId () const
 
vtkm::UInt8 GetCellShape (vtkm::Id) const override
 
std::shared_ptr< CellSetNewInstance () const override
 
void DeepCopy (const CellSet *src) override
 
void PrintSummary (std::ostream &out) const override
 

Private Types

using Thisclass = vtkm::cont::CellSetSingleType< ConnectivityStorageTag >
 
using Superclass = vtkm::cont::CellSetExplicit< typename vtkm::cont::ArrayHandleConstant< vtkm::UInt8 >::StorageTag, ConnectivityStorageTag, typename vtkm::cont::ArrayHandleCounting< vtkm::Id >::StorageTag >
 

Private Member Functions

template<typename CellShapeTag >
void CheckNumberOfPointsPerCell (CellShapeTag, vtkm::CellTraitsTagSizeFixed, vtkm::IdComponent numVertices) const
 
template<typename CellShapeTag >
void CheckNumberOfPointsPerCell (CellShapeTag, vtkm::CellTraitsTagSizeVariable, vtkm::IdComponent) const
 
void CheckNumberOfPointsPerCell (vtkm::IdComponent numVertices) const
 

Private Attributes

vtkm::Id ExpectedNumberOfCellsAdded
 
vtkm::Id CellShapeAsId
 
vtkm::IdComponent NumberOfPointsPerCell
 

Detailed Description

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
class vtkm::cont::CellSetSingleType< ConnectivityStorageTag >

An explicit cell set with all cells of the same shape.

CellSetSingleType is an explicit cell set constrained to contain cells that all have the same shape and all have the same number of points. So, for example if you are creating a surface that you know will contain only triangles, CellSetSingleType is a good representation for these data.

Using CellSetSingleType saves memory because the array of cell shapes and the array of point counts no longer need to be stored. CellSetSingleType also allows VTK-m to skip some processing and other storage required for general explicit cell sets.

Member Typedef Documentation

◆ Superclass

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
using vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::Superclass = vtkm::cont::CellSetExplicit<typename vtkm::cont::ArrayHandleConstant<vtkm::UInt8>::StorageTag, ConnectivityStorageTag, typename vtkm::cont::ArrayHandleCounting<vtkm::Id>::StorageTag>
private

◆ Thisclass

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
using vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::Thisclass = vtkm::cont::CellSetSingleType<ConnectivityStorageTag>
private

Constructor & Destructor Documentation

◆ CellSetSingleType() [1/3]

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::CellSetSingleType ( )
inline

◆ CellSetSingleType() [2/3]

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::CellSetSingleType ( const Thisclass src)
inline

◆ CellSetSingleType() [3/3]

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::CellSetSingleType ( Thisclass &&  src)
inlinenoexcept

◆ ~CellSetSingleType()

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::~CellSetSingleType ( )
inlineoverride

Member Function Documentation

◆ AddCell()

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
template<typename IdVecType >
void vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::AddCell ( vtkm::UInt8  shapeId,
vtkm::IdComponent  numVertices,
const IdVecType &  ids 
)
inline

Add a cell.

This can only be called after AddCell.

◆ CheckNumberOfPointsPerCell() [1/3]

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
template<typename CellShapeTag >
void vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::CheckNumberOfPointsPerCell ( CellShapeTag  ,
vtkm::CellTraitsTagSizeFixed  ,
vtkm::IdComponent  numVertices 
) const
inlineprivate

◆ CheckNumberOfPointsPerCell() [2/3]

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
template<typename CellShapeTag >
void vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::CheckNumberOfPointsPerCell ( CellShapeTag  ,
vtkm::CellTraitsTagSizeVariable  ,
vtkm::IdComponent   
) const
inlineprivate

◆ CheckNumberOfPointsPerCell() [3/3]

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
void vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::CheckNumberOfPointsPerCell ( vtkm::IdComponent  numVertices) const
inlineprivate

◆ CompleteAddingCells()

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
void vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::CompleteAddingCells ( vtkm::Id  numPoints)
inline

Finish adding cells one at a time.

◆ DeepCopy()

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
void vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::DeepCopy ( const CellSet src)
inlineoverride

◆ Fill()

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
void vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::Fill ( vtkm::Id  numPoints,
vtkm::UInt8  shapeId,
vtkm::IdComponent  numberOfPointsPerCell,
const vtkm::cont::ArrayHandle< vtkm::Id, ConnectivityStorageTag > &  connectivity 
)
inline

Set all the cells of the mesh.

This method can be used to fill the memory from another system without copying data.

◆ GetCellShape()

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
vtkm::UInt8 vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::GetCellShape ( vtkm::Id  ) const
inlineoverride

◆ GetCellShapeAsId()

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
vtkm::Id vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::GetCellShapeAsId ( ) const
inline

◆ NewInstance()

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
std::shared_ptr<CellSet> vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::NewInstance ( ) const
inlineoverride

◆ operator=() [1/2]

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
Thisclass& vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::operator= ( const Thisclass src)
inline

◆ operator=() [2/2]

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
Thisclass& vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::operator= ( Thisclass &&  src)
inlinenoexcept

◆ PrepareToAddCells()

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
void vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::PrepareToAddCells ( vtkm::Id  numCells,
vtkm::Id  connectivityMaxLen 
)
inline

Start adding cells one at a time.

After this method is called, AddCell is called repeatedly to add each cell. Once all cells are added, call CompleteAddingCells.

◆ PrintSummary()

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
void vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::PrintSummary ( std::ostream &  out) const
inlineoverride

Member Data Documentation

◆ CellShapeAsId

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
vtkm::Id vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::CellShapeAsId
private

◆ ExpectedNumberOfCellsAdded

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
vtkm::Id vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::ExpectedNumberOfCellsAdded
private

◆ NumberOfPointsPerCell

template<typename ConnectivityStorageTag = VTKM_DEFAULT_STORAGE_TAG>
vtkm::IdComponent vtkm::cont::CellSetSingleType< ConnectivityStorageTag >::NumberOfPointsPerCell
private

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