Go to the documentation of this file.
18 #ifndef viskores_exec_ConnectivityExtrude_h
19 #define viskores_exec_ConnectivityExtrude_h
68 return this->GetIndices(this->FlatToLogicalToIndex(index));
73 template <
typename IndexType>
83 return index[0] + (index[1] * this->NumberOfCellsPerPlane);
89 const viskores::Id cellId = index % this->NumberOfCellsPerPlane;
90 const viskores::Id plane = index / this->NumberOfCellsPerPlane;
156 template <
typename IndexType>
195 , NumberOfCellsPerPlane(cellsPerPlane)
196 , NumberOfPointsPerPlane(pointsPerPlane)
197 , NumberOfPlanes(numPlanes)
200 : (
static_cast<viskores::Id>(cellsPerPlane) * (numPlanes - 1));
211 for (
int i = 0; i < 3; ++i)
214 pointIds2[i] = this->
NextNode.Get(pointIds1[i]);
237 , NumberOfCellsPerPlane(cellsPerPlane)
238 , NumberOfPointsPerPlane(pointsPerPlane)
239 , NumberOfPlanes(numPlanes)
246 auto ptCur = index[0];
247 auto ptPre = this->
PrevNode.Get(ptCur);
248 auto plCur = index[1];
249 auto plPre = (plCur == 0) ? (this->
NumberOfPlanes - 1) : (plCur - 1);
253 this->Counts.Get(ptPre),
254 this->Offsets.Get(ptCur),
255 this->Counts.Get(ptCur),
258 this->NumberOfCellsPerPlane);
typename Int32HandleType::ReadPortalType Int32PortalType
Definition: ConnectivityExtrude.h:108
viskores::Vec< viskores::Id, 2 > Id2
Id2 corresponds to a 2-dimensional index.
Definition: Types.h:935
Definition: ConnectivityExtrude.h:34
ReverseIndicesExtrude< ConnectivityPortalType > IndicesType
Definition: ConnectivityExtrude.h:120
PrevNodePortalType PrevNode
Definition: ConnectivityExtrude.h:180
Int32PortalType ConnectivityPortalType
Definition: ConnectivityExtrude.h:111
IndicesType GetIndices(viskores::Id index) const
Definition: ConnectivityExtrude.h:66
IndicesType GetIndices(viskores::Id index) const
Returns a Vec-like object containing the indices for the given index.
Definition: ConnectivityExtrude.h:148
viskores::IdComponent GetNumberOfIndices(const IndexType &) const
Definition: ConnectivityExtrude.h:74
ReverseConnectivityExtrude()=default
#define viskoresNotUsed(parameter_name)
Simple macro to identify a parameter as unused.
Definition: ExportMacros.h:136
OffsetsPortalType Offsets
Definition: ConnectivityExtrude.h:178
Int32PortalType ConnectivityPortalType
Definition: ConnectivityExtrude.h:41
typename StorageType::ReadPortalType ReadPortalType
The type of portal used when accessing data in a read-only mode.
Definition: ArrayHandle.h:325
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
Int32PortalType CountsPortalType
Definition: ConnectivityExtrude.h:113
Definition: IndicesExtrude.h:29
viskores::Id NumberOfCells
Definition: ConnectivityExtrude.h:100
CellShapeTag GetCellShape(viskores::Id) const
Definition: ConnectivityExtrude.h:140
Definition: ConnectivityExtrude.h:104
Definition: CellShape.h:168
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
Definition: IndicesExtrude.h:79
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::Id2 FlatToLogicalToIndex(viskores::Id index) const
Definition: ConnectivityExtrude.h:170
Definition: CellShape.h:156
viskores::Id2 FlatToLogicalToIndex(viskores::Id index) const
Definition: ConnectivityExtrude.h:87
IndicesExtrude IndicesType
Definition: ConnectivityExtrude.h:48
CellShapeTag GetCellShape(viskores::Id) const
Definition: ConnectivityExtrude.h:63
viskores::Int32 NumberOfCellsPerPlane
Definition: ConnectivityExtrude.h:97
Int32PortalType NextNodePortalType
Definition: ConnectivityExtrude.h:42
viskores::Id LogicalToFlatToIndex(const viskores::Id2 &index) const
Definition: ConnectivityExtrude.h:164
viskores::Int32 NumberOfPlanes
Definition: ConnectivityExtrude.h:99
ConnectivityPortalType Connectivity
Definition: ConnectivityExtrude.h:177
viskores::Int32 NumberOfCellsPerPlane
Definition: ConnectivityExtrude.h:181
int32_t Int32
Base type to use for 32-bit signed integer numbers.
Definition: Types.h:189
viskores::IdComponent GetNumberOfIndices(const IndexType &) const
Definition: ConnectivityExtrude.h:157
CountsPortalType Counts
Definition: ConnectivityExtrude.h:179
viskores::Id LogicalToFlatToIndex(const viskores::Id2 &index) const
Definition: ConnectivityExtrude.h:81
viskores::Id GetNumberOfElements() const
Definition: ConnectivityExtrude.h:60
NextNodePortalType NextNode
Definition: ConnectivityExtrude.h:96
viskores::Int32 NumberOfPointsPerPlane
Definition: ConnectivityExtrude.h:98
ConnectivityPortalType Connectivity
Definition: ConnectivityExtrude.h:95
viskores::Int32 NumberOfPointsPerPlane
Definition: ConnectivityExtrude.h:182
viskores::Int32 NumberOfPlanes
Definition: ConnectivityExtrude.h:183
Int32PortalType PrevNodePortalType
Definition: ConnectivityExtrude.h:114
typename Int32HandleType::ReadPortalType Int32PortalType
Definition: ConnectivityExtrude.h:38
#define VISKORES_EXEC
Definition: ExportMacros.h:59
Int32PortalType OffsetsPortalType
Definition: ConnectivityExtrude.h:112
ConnectivityExtrude()=default
viskores::Id GetNumberOfElements() const
Definition: ConnectivityExtrude.h:134