Go to the documentation of this file.
10 #ifndef vtk_m_exec_ConnectivityExtrude_h
11 #define vtk_m_exec_ConnectivityExtrude_h
60 return this->GetIndices(this->FlatToLogicalToIndex(index));
64 IndicesType GetIndices(
const vtkm::Id2& index)
const;
65 template <
typename IndexType>
74 return index[0] + (index[1] * this->NumberOfCellsPerPlane);
80 const vtkm::Id cellId = index % this->NumberOfCellsPerPlane;
81 const vtkm::Id plane = index / this->NumberOfCellsPerPlane;
147 template <
typename IndexType>
185 , NumberOfCellsPerPlane(cellsPerPlane)
186 , NumberOfPointsPerPlane(pointsPerPlane)
187 , NumberOfPlanes(numPlanes)
190 : (
static_cast<vtkm::Id>(cellsPerPlane) * (numPlanes - 1));
201 for (
int i = 0; i < 3; ++i)
204 pointIds2[i] = this->
NextNode.Get(pointIds1[i]);
227 , NumberOfCellsPerPlane(cellsPerPlane)
228 , NumberOfPointsPerPlane(pointsPerPlane)
229 , NumberOfPlanes(numPlanes)
236 auto ptCur = index[0];
237 auto ptPre = this->
PrevNode.Get(ptCur);
238 auto plCur = index[1];
239 auto plPre = (plCur == 0) ? (this->
NumberOfPlanes - 1) : (plCur - 1);
243 this->Counts.Get(ptPre),
244 this->Offsets.Get(ptCur),
245 this->Counts.Get(ptCur),
248 this->NumberOfCellsPerPlane);
Definition: ConnectivityExtrude.h:95
vtkm::Int32 NumberOfCellsPerPlane
Definition: ConnectivityExtrude.h:171
#define VTKM_EXEC
Definition: ExportMacros.h:51
Groups connected points that have the same field value.
Definition: Atomic.h:19
VTKM_EXEC IndicesType GetIndices(vtkm::Id index) const
Returns a Vec-like object containing the indices for the given index.
Definition: ConnectivityExtrude.h:139
VTKM_EXEC vtkm::Id2 FlatToLogicalToIndex(vtkm::Id index) const
Definition: ConnectivityExtrude.h:78
ConnectivityExtrude()=default
VTKM_EXEC IndicesType GetIndices(vtkm::Id index) const
Definition: ConnectivityExtrude.h:58
vtkm::Int32 IdComponent
Represents a component ID (index of component in a vector).
Definition: Types.h:168
vtkm::CellShapeTagWedge CellShapeTag
Definition: ConnectivityExtrude.h:38
Int32PortalType PrevNodePortalType
Definition: ConnectivityExtrude.h:105
vtkm::Int32 NumberOfPointsPerPlane
Definition: ConnectivityExtrude.h:172
VTKM_EXEC vtkm::Id GetNumberOfElements() const
Definition: ConnectivityExtrude.h:52
Int32PortalType OffsetsPortalType
Definition: ConnectivityExtrude.h:103
VTKM_EXEC vtkm::Id LogicalToFlatToIndex(const vtkm::Id2 &index) const
Definition: ConnectivityExtrude.h:154
Int32PortalType ConnectivityPortalType
Definition: ConnectivityExtrude.h:102
typename StorageType::ReadPortalType ReadPortalType
Definition: ArrayHandle.h:294
VTKM_EXEC vtkm::Id GetNumberOfElements() const
Definition: ConnectivityExtrude.h:125
Definition: IndicesExtrude.h:71
VTKM_EXEC vtkm::Id LogicalToFlatToIndex(const vtkm::Id2 &index) const
Definition: ConnectivityExtrude.h:72
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
VTKM_EXEC vtkm::IdComponent GetNumberOfIndices(const IndexType &vtkmNotUsed(index)) const
Definition: ConnectivityExtrude.h:148
ConnectivityPortalType Connectivity
Definition: ConnectivityExtrude.h:86
Int32PortalType NextNodePortalType
Definition: ConnectivityExtrude.h:34
ReverseIndicesExtrude< ConnectivityPortalType > IndicesType
Definition: ConnectivityExtrude.h:111
vtkm::Int32 NumberOfPlanes
Definition: ConnectivityExtrude.h:173
IndicesExtrude IndicesType
Definition: ConnectivityExtrude.h:40
VTKM_EXEC CellShapeTag GetCellShape(vtkm::Id) const
Definition: ConnectivityExtrude.h:55
CountsPortalType Counts
Definition: ConnectivityExtrude.h:169
vtkm::Int32 NumberOfPlanes
Definition: ConnectivityExtrude.h:90
PrevNodePortalType PrevNode
Definition: ConnectivityExtrude.h:170
VTKM_EXEC CellShapeTag GetCellShape(vtkm::Id) const
Definition: ConnectivityExtrude.h:131
VTKM_EXEC vtkm::Id2 FlatToLogicalToIndex(vtkm::Id index) const
Definition: ConnectivityExtrude.h:160
OffsetsPortalType Offsets
Definition: ConnectivityExtrude.h:168
ConnectivityPortalType Connectivity
Definition: ConnectivityExtrude.h:167
Definition: IndicesExtrude.h:21
Definition: ConnectivityExtrude.h:26
typename Int32HandleType::ReadPortalType Int32PortalType
Definition: ConnectivityExtrude.h:30
#define vtkmNotUsed(parameter_name)
Simple macro to identify a parameter as unused.
Definition: ExportMacros.h:128
vtkm::Id NumberOfCells
Definition: ConnectivityExtrude.h:91
NextNodePortalType NextNode
Definition: ConnectivityExtrude.h:87
vtkm::Int32 NumberOfCellsPerPlane
Definition: ConnectivityExtrude.h:88
vtkm::CellShapeTagVertex CellShapeTag
Definition: ConnectivityExtrude.h:109
int32_t Int32
Definition: Types.h:160
vtkm::Int32 NumberOfPointsPerPlane
Definition: ConnectivityExtrude.h:89
typename Int32HandleType::ReadPortalType Int32PortalType
Definition: ConnectivityExtrude.h:99
#define VTKM_ALWAYS_EXPORT
Definition: ExportMacros.h:92
Int32PortalType CountsPortalType
Definition: ConnectivityExtrude.h:104
VTKM_EXEC vtkm::IdComponent GetNumberOfIndices(const IndexType &vtkmNotUsed(index)) const
Definition: ConnectivityExtrude.h:66
Int32PortalType ConnectivityPortalType
Definition: ConnectivityExtrude.h:33
ReverseConnectivityExtrude()=default
vtkm::Vec< vtkm::Id, 2 > Id2
Id2 corresponds to a 2-dimensional index.
Definition: Types.h:885