VTK-m  2.1
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ > Class Template Reference

Rearranges the cells of one cell set to create another cell set. More...

#include <CastAndCall.h>

Public Types

using OriginalCellSetType = OriginalCellSetType_
 
using PermutationArrayHandleType = PermutationArrayHandleType_
 
template<typename VisitTopology , typename IncidentTopology >
using ExecConnectivityType = typename internal::CellSetPermutationConnectivityChooser< VisitTopology, IncidentTopology, OriginalCellSetType, PermutationArrayHandleType >::ExecConnectivityType
 

Public Member Functions

 CellSetPermutation (const PermutationArrayHandleType &validCellIds, const OriginalCellSetType &cellset)
 Create a CellSetPermutation. More...
 
 CellSetPermutation ()
 
 ~CellSetPermutation () override
 
 CellSetPermutation (const CellSetPermutation &src)
 
CellSetPermutationoperator= (const CellSetPermutation &src)
 
const OriginalCellSetTypeGetFullCellSet () const
 Returns the original CellSet that this one is permuting. More...
 
const PermutationArrayHandleTypeGetValidCellIds () const
 Returns the array used to permute the cell indices. More...
 
vtkm::Id GetNumberOfCells () const override
 
vtkm::Id GetNumberOfPoints () const override
 
vtkm::Id GetNumberOfFaces () const override
 
vtkm::Id GetNumberOfEdges () const override
 
void ReleaseResourcesExecution () override
 
vtkm::IdComponent GetNumberOfPointsInCell (vtkm::Id cellIndex) const override
 
vtkm::UInt8 GetCellShape (vtkm::Id id) const override
 
void GetCellPointIds (vtkm::Id id, vtkm::Id *ptids) const override
 
std::shared_ptr< CellSetNewInstance () const override
 
void DeepCopy (const CellSet *src) override
 
void Fill (const PermutationArrayHandleType &validCellIds, const OriginalCellSetType &cellset)
 Set the topology. More...
 
vtkm::Id GetSchedulingRange (vtkm::TopologyElementTagCell) const
 
vtkm::Id GetSchedulingRange (vtkm::TopologyElementTagPoint) const
 
ExecConnectivityType< vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPointPrepareForInput (vtkm::cont::DeviceAdapterId device, vtkm::TopologyElementTagCell visitTopology, vtkm::TopologyElementTagPoint incidentTopology, vtkm::cont::Token &token) const
 
ExecConnectivityType< vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCellPrepareForInput (vtkm::cont::DeviceAdapterId device, vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell, vtkm::cont::Token &token) const
 
void PrintSummary (std::ostream &out) const override
 

Private Types

using VisitPointsWithCellsConnectivity = vtkm::cont::internal::ConnectivityExplicitInternals< typename ArrayHandleConstant< vtkm::UInt8 >::StorageTag >
 

Private Attributes

PermutationArrayHandleType ValidCellIds
 
OriginalCellSetType FullCellSet
 
VisitPointsWithCellsConnectivity VisitPointsWithCells
 

Detailed Description

template<typename OriginalCellSetType_, typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
class vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >

Rearranges the cells of one cell set to create another cell set.

This restructuring of cells is not done by copying data to a new structure. Rather, CellSetPermutation establishes a look-up from one cell structure to another. Cells are permuted on the fly while algorithms are run.

A CellSetPermutation is established by providing a mapping array that for every cell index provides the equivalent cell index in the cell set being permuted. CellSetPermutation is most often used to mask out cells in a data set so that algorithms will skip over those cells when running.

Member Typedef Documentation

◆ ExecConnectivityType

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
template<typename VisitTopology , typename IncidentTopology >
using vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::ExecConnectivityType = typename internal::CellSetPermutationConnectivityChooser< VisitTopology, IncidentTopology, OriginalCellSetType, PermutationArrayHandleType>::ExecConnectivityType

◆ OriginalCellSetType

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
using vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::OriginalCellSetType = OriginalCellSetType_

◆ PermutationArrayHandleType

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
using vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::PermutationArrayHandleType = PermutationArrayHandleType_

◆ VisitPointsWithCellsConnectivity

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
using vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::VisitPointsWithCellsConnectivity = vtkm::cont::internal::ConnectivityExplicitInternals< typename ArrayHandleConstant<vtkm::UInt8>::StorageTag>
private

Constructor & Destructor Documentation

◆ CellSetPermutation() [1/3]

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::CellSetPermutation ( const PermutationArrayHandleType validCellIds,
const OriginalCellSetType cellset 
)
inline

Create a CellSetPermutation.

Parameters
[in]validCellIdsAn array that defines the permutation. If index i is value j, then the ith cell of this cell set will be the same as the jth cell in the original cellset.
[in]cellsetThe original cell set that this one is permuting.

◆ CellSetPermutation() [2/3]

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::CellSetPermutation ( )
inline

◆ ~CellSetPermutation()

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::~CellSetPermutation ( )
inlineoverride

◆ CellSetPermutation() [3/3]

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::CellSetPermutation ( const CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ > &  src)
inline

Member Function Documentation

◆ DeepCopy()

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
void vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::DeepCopy ( const CellSet src)
inlineoverride

◆ Fill()

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
void vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::Fill ( const PermutationArrayHandleType validCellIds,
const OriginalCellSetType cellset 
)
inline

Set the topology.

Parameters
[in]validCellIdsAn array that defines the permutation. If index i is value j, then the ith cell of this cell set will be the same as the jth cell in the original cellset.
[in]cellsetThe original cell set that this one is permuting.

◆ GetCellPointIds()

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
void vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::GetCellPointIds ( vtkm::Id  id,
vtkm::Id ptids 
) const
inlineoverride

◆ GetCellShape()

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
vtkm::UInt8 vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::GetCellShape ( vtkm::Id  id) const
inlineoverride

◆ GetFullCellSet()

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
const OriginalCellSetType& vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::GetFullCellSet ( ) const
inline

Returns the original CellSet that this one is permuting.

◆ GetNumberOfCells()

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
vtkm::Id vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::GetNumberOfCells ( ) const
inlineoverride

◆ GetNumberOfEdges()

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
vtkm::Id vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::GetNumberOfEdges ( ) const
inlineoverride

◆ GetNumberOfFaces()

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
vtkm::Id vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::GetNumberOfFaces ( ) const
inlineoverride

◆ GetNumberOfPoints()

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
vtkm::Id vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::GetNumberOfPoints ( ) const
inlineoverride

◆ GetNumberOfPointsInCell()

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
vtkm::IdComponent vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::GetNumberOfPointsInCell ( vtkm::Id  cellIndex) const
inlineoverride

◆ GetSchedulingRange() [1/2]

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
vtkm::Id vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::GetSchedulingRange ( vtkm::TopologyElementTagCell  ) const
inline

◆ GetSchedulingRange() [2/2]

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
vtkm::Id vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::GetSchedulingRange ( vtkm::TopologyElementTagPoint  ) const
inline

◆ GetValidCellIds()

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
const PermutationArrayHandleType& vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::GetValidCellIds ( ) const
inline

Returns the array used to permute the cell indices.

◆ NewInstance()

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
std::shared_ptr<CellSet> vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::NewInstance ( ) const
inlineoverride

◆ operator=()

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
CellSetPermutation& vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::operator= ( const CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ > &  src)
inline

◆ PrepareForInput() [1/2]

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
ExecConnectivityType<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint> vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::PrepareForInput ( vtkm::cont::DeviceAdapterId  device,
vtkm::TopologyElementTagCell  visitTopology,
vtkm::TopologyElementTagPoint  incidentTopology,
vtkm::cont::Token token 
) const
inline

◆ PrepareForInput() [2/2]

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
ExecConnectivityType<vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell> vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::PrepareForInput ( vtkm::cont::DeviceAdapterId  device,
vtkm::TopologyElementTagPoint  ,
vtkm::TopologyElementTagCell  ,
vtkm::cont::Token token 
) const
inline

◆ PrintSummary()

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
void vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::PrintSummary ( std::ostream &  out) const
inlineoverride

◆ ReleaseResourcesExecution()

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
void vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::ReleaseResourcesExecution ( )
inlineoverride

Member Data Documentation

◆ FullCellSet

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
OriginalCellSetType vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::FullCellSet
private

◆ ValidCellIds

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
PermutationArrayHandleType vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::ValidCellIds
private

◆ VisitPointsWithCells

template<typename OriginalCellSetType_ , typename PermutationArrayHandleType_ = vtkm::cont::ArrayHandle<vtkm::Id, VTKM_DEFAULT_STORAGE_TAG >>
VisitPointsWithCellsConnectivity vtkm::cont::CellSetPermutation< OriginalCellSetType_, PermutationArrayHandleType_ >::VisitPointsWithCells
mutableprivate

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