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);
vtkm::Id2 FlatToLogicalToIndex(vtkm::Id index) const
Definition: ConnectivityExtrude.h:160
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::Id LogicalToFlatToIndex(const vtkm::Id2 &index) const
Definition: ConnectivityExtrude.h:154
ConnectivityExtrude()=default
vtkm::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:194
Int32PortalType PrevNodePortalType
Definition: ConnectivityExtrude.h:105
vtkm::Int32 NumberOfPointsPerPlane
Definition: ConnectivityExtrude.h:172
Int32PortalType OffsetsPortalType
Definition: ConnectivityExtrude.h:103
Int32PortalType ConnectivityPortalType
Definition: ConnectivityExtrude.h:102
typename StorageType::ReadPortalType ReadPortalType
The type of portal used when accessing data in a read-only mode.
Definition: ArrayHandle.h:312
Definition: IndicesExtrude.h:71
vtkm::Id GetNumberOfElements() const
Definition: ConnectivityExtrude.h:125
ConnectivityPortalType Connectivity
Definition: ConnectivityExtrude.h:86
Int32PortalType NextNodePortalType
Definition: ConnectivityExtrude.h:34
ReverseIndicesExtrude< ConnectivityPortalType > IndicesType
Definition: ConnectivityExtrude.h:111
vtkm::Id GetNumberOfElements() const
Definition: ConnectivityExtrude.h:52
vtkm::Int32 NumberOfPlanes
Definition: ConnectivityExtrude.h:173
IndicesExtrude IndicesType
Definition: ConnectivityExtrude.h:40
vtkm::Id2 FlatToLogicalToIndex(vtkm::Id index) const
Definition: ConnectivityExtrude.h:78
Definition: CellShape.h:148
CountsPortalType Counts
Definition: ConnectivityExtrude.h:169
vtkm::Int32 NumberOfPlanes
Definition: ConnectivityExtrude.h:90
PrevNodePortalType PrevNode
Definition: ConnectivityExtrude.h:170
vtkm::Id LogicalToFlatToIndex(const vtkm::Id2 &index) const
Definition: ConnectivityExtrude.h:72
OffsetsPortalType Offsets
Definition: ConnectivityExtrude.h:168
ConnectivityPortalType Connectivity
Definition: ConnectivityExtrude.h:167
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
Definition: IndicesExtrude.h:21
Definition: ConnectivityExtrude.h:26
IndicesType GetIndices(vtkm::Id index) const
Definition: ConnectivityExtrude.h:58
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
IndicesType GetIndices(vtkm::Id index) const
Returns a Vec-like object containing the indices for the given index.
Definition: ConnectivityExtrude.h:139
CellShapeTag GetCellShape(vtkm::Id) const
Definition: ConnectivityExtrude.h:55
int32_t Int32
Base type to use for 32-bit signed integer numbers.
Definition: Types.h:181
vtkm::Int32 NumberOfPointsPerPlane
Definition: ConnectivityExtrude.h:89
Definition: CellShape.h:160
vtkm::IdComponent GetNumberOfIndices(const IndexType &) const
Definition: ConnectivityExtrude.h:66
typename Int32HandleType::ReadPortalType Int32PortalType
Definition: ConnectivityExtrude.h:99
#define VTKM_ALWAYS_EXPORT
Definition: ExportMacros.h:89
Int32PortalType CountsPortalType
Definition: ConnectivityExtrude.h:104
Int32PortalType ConnectivityPortalType
Definition: ConnectivityExtrude.h:33
ReverseConnectivityExtrude()=default
vtkm::IdComponent GetNumberOfIndices(const IndexType &) const
Definition: ConnectivityExtrude.h:148
CellShapeTag GetCellShape(vtkm::Id) const
Definition: ConnectivityExtrude.h:131
vtkm::Vec< vtkm::Id, 2 > Id2
Id2 corresponds to a 2-dimensional index.
Definition: Types.h:923