Viskores  1.0
Cylinderizer.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 #ifndef viskores_rendering_Cylinderizer_h
19 #define viskores_rendering_Cylinderizer_h
20 
21 #include <typeinfo>
25 #include <viskores/cont/DataSet.h>
27 #include <viskores/rendering/raytracing/MeshConnectivityBuilder.h>
31 
32 #define SEG_PER_TRI 3
33 //CSS is CellSetStructured
34 #define TRI_PER_CSS 12
35 
36 namespace viskores
37 {
38 namespace rendering
39 {
40 
42 {
43 public:
45  {
46  public:
49  typedef void ControlSignature(CellSetIn cellset, FieldOut);
50  typedef void ExecutionSignature(CellShape, _2);
51 
53  void operator()(viskores::CellShapeTagGeneric shapeType, viskores::Id& segments) const
54  {
55  if (shapeType.Id == viskores::CELL_SHAPE_LINE)
56  segments = 1;
57  else if (shapeType.Id == viskores::CELL_SHAPE_TRIANGLE)
58  segments = 3;
59  else if (shapeType.Id == viskores::CELL_SHAPE_QUAD)
60  segments = 4;
61  else if (shapeType.Id == viskores::CELL_SHAPE_TETRA)
62  segments = 12;
63  else if (shapeType.Id == viskores::CELL_SHAPE_WEDGE)
64  segments = 24;
65  else if (shapeType.Id == viskores::CELL_SHAPE_PYRAMID)
66  segments = 18;
67  else if (shapeType.Id == viskores::CELL_SHAPE_HEXAHEDRON)
68  segments = 36;
69  else
70  segments = 0;
71  }
72 
75  viskores::Id& segments) const
76  {
77  segments = 36;
78  }
79 
82  viskores::Id& segments) const
83  {
84  segments = 4;
85  }
88  viskores::Id& segments) const
89  {
90  segments = 24;
91  }
92  }; //class CountSegments
93 
94  template <int DIM>
96  {
97 
98  public:
99  typedef void ControlSignature(CellSetIn cellset, FieldInCell, WholeArrayOut);
100  typedef void ExecutionSignature(IncidentElementIndices, _2, _3);
101  //typedef _1 InputDomain;
104 
105 #if defined(VISKORES_MSVC)
106 #pragma warning(push)
107 #pragma warning(disable : 4127) //conditional expression is constant
108 #endif
109  template <typename CellNodeVecType, typename OutIndicesPortal>
111  viskores::Vec<Id, 3>& segment,
112  const viskores::Id offset,
113  const CellNodeVecType& cellIndices,
114  OutIndicesPortal& outputIndices) const
115  {
116 
117  segment[1] = cellIndices[viskores::IdComponent(idx[0])];
118  segment[2] = cellIndices[viskores::IdComponent(idx[1])];
119  outputIndices.Set(offset, segment);
120 
121  segment[1] = cellIndices[viskores::IdComponent(idx[1])];
122  segment[2] = cellIndices[viskores::IdComponent(idx[2])];
123  outputIndices.Set(offset + 1, segment);
124 
125  segment[1] = cellIndices[viskores::IdComponent(idx[2])];
126  segment[2] = cellIndices[viskores::IdComponent(idx[0])];
127  outputIndices.Set(offset + 2, segment);
128  }
129  template <typename CellNodeVecType, typename OutIndicesPortal>
130  VISKORES_EXEC void operator()(const CellNodeVecType& cellIndices,
131  const viskores::Id& cellIndex,
132  OutIndicesPortal& outputIndices) const
133  {
134  if (DIM == 2)
135  {
136  // Do nothing mark says
137  }
138  else if (DIM == 3)
139  {
140  viskores::Id offset = cellIndex * TRI_PER_CSS * SEG_PER_TRI;
141  viskores::Id3 segment;
142  segment[0] = cellIndex;
143  viskores::Id3 idx;
144  idx[0] = 0;
145  idx[1] = 1;
146  idx[2] = 5;
147  cell2seg(idx, segment, offset, cellIndices, outputIndices);
148  idx[0] = 0;
149  idx[1] = 5;
150  idx[2] = 4;
151  offset += 3;
152  cell2seg(idx, segment, offset, cellIndices, outputIndices);
153  idx[0] = 1;
154  idx[1] = 2;
155  idx[2] = 6;
156  offset += 3;
157  cell2seg(idx, segment, offset, cellIndices, outputIndices);
158  idx[0] = 1;
159  idx[1] = 6;
160  idx[2] = 5;
161  offset += 3;
162  cell2seg(idx, segment, offset, cellIndices, outputIndices);
163  idx[0] = 3;
164  idx[1] = 7;
165  idx[2] = 6;
166  offset += 3;
167  cell2seg(idx, segment, offset, cellIndices, outputIndices);
168  idx[0] = 3;
169  idx[1] = 6;
170  idx[2] = 2;
171  offset += 3;
172  cell2seg(idx, segment, offset, cellIndices, outputIndices);
173  idx[0] = 0;
174  idx[1] = 4;
175  idx[2] = 7;
176  offset += 3;
177  cell2seg(idx, segment, offset, cellIndices, outputIndices);
178  idx[0] = 0;
179  idx[1] = 7;
180  idx[2] = 3;
181  offset += 3;
182  cell2seg(idx, segment, offset, cellIndices, outputIndices);
183  idx[0] = 0;
184  idx[1] = 3;
185  idx[2] = 2;
186  offset += 3;
187  cell2seg(idx, segment, offset, cellIndices, outputIndices);
188  idx[0] = 0;
189  idx[1] = 2;
190  idx[2] = 1;
191  offset += 3;
192  cell2seg(idx, segment, offset, cellIndices, outputIndices);
193  idx[0] = 4;
194  idx[1] = 5;
195  idx[2] = 6;
196  offset += 3;
197  cell2seg(idx, segment, offset, cellIndices, outputIndices);
198  idx[0] = 4;
199  idx[1] = 6;
200  idx[2] = 7;
201  offset += 3;
202  cell2seg(idx, segment, offset, cellIndices, outputIndices);
203  }
204  }
205 #if defined(VISKORES_MSVC)
206 #pragma warning(pop)
207 #endif
208  };
209 
210 
212  {
213 
214  public:
217  typedef void ControlSignature(CellSetIn cellset, FieldInCell, WholeArrayOut);
219 
220  template <typename VecType, typename OutputPortal>
222  const VecType& cellIndices,
223  const viskores::Id& cellId,
224  const viskores::Id Id0,
225  const viskores::Id Id1,
226  const viskores::Id Id2,
227  OutputPortal& outputIndices) const
228  {
229  viskores::Id3 segment;
230  segment[0] = cellId;
231  segment[1] = viskores::Id(cellIndices[viskores::IdComponent(Id0)]);
232  segment[2] = viskores::Id(cellIndices[viskores::IdComponent(Id1)]);
233  outputIndices.Set(offset++, segment);
234 
235  segment[1] = viskores::Id(cellIndices[viskores::IdComponent(Id1)]);
236  segment[2] = viskores::Id(cellIndices[viskores::IdComponent(Id2)]);
237  outputIndices.Set(offset++, segment);
238 
239  segment[1] = viskores::Id(cellIndices[viskores::IdComponent(Id2)]);
240  segment[2] = viskores::Id(cellIndices[viskores::IdComponent(Id0)]);
241  outputIndices.Set(offset++, segment);
242  }
243 
244 
245  template <typename VecType, typename OutputPortal>
247  viskores::CellShapeTagQuad shapeType,
248  const VecType& cellIndices,
249  const viskores::Id& cellId,
250  OutputPortal& outputIndices) const
251  {
252  if (shapeType.Id == viskores::CELL_SHAPE_QUAD)
253  {
254  viskores::Id3 segment;
255  segment[0] = cellId;
256  segment[1] = cellIndices[0];
257  segment[2] = cellIndices[1];
258  outputIndices.Set(offset, segment);
259 
260  segment[1] = cellIndices[1];
261  segment[2] = cellIndices[2];
262  outputIndices.Set(offset + 1, segment);
263 
264  segment[1] = cellIndices[2];
265  segment[2] = cellIndices[3];
266  outputIndices.Set(offset + 2, segment);
267 
268  segment[1] = cellIndices[3];
269  segment[2] = cellIndices[0];
270  outputIndices.Set(offset + 3, segment);
271  }
272  }
273 
274  template <typename VecType, typename OutputPortal>
275  VISKORES_EXEC void operator()(const viskores::Id& pointOffset,
277  const VecType& cellIndices,
278  const viskores::Id& cellId,
279  OutputPortal& outputIndices) const
280 
281  {
282  viskores::Id offset = pointOffset;
283  tri2seg(offset, cellIndices, cellId, 0, 1, 5, outputIndices);
284  tri2seg(offset, cellIndices, cellId, 0, 5, 4, outputIndices);
285  tri2seg(offset, cellIndices, cellId, 1, 2, 6, outputIndices);
286  tri2seg(offset, cellIndices, cellId, 1, 6, 5, outputIndices);
287  tri2seg(offset, cellIndices, cellId, 3, 7, 6, outputIndices);
288  tri2seg(offset, cellIndices, cellId, 3, 6, 2, outputIndices);
289  tri2seg(offset, cellIndices, cellId, 0, 4, 7, outputIndices);
290  tri2seg(offset, cellIndices, cellId, 0, 7, 3, outputIndices);
291  tri2seg(offset, cellIndices, cellId, 0, 3, 2, outputIndices);
292  tri2seg(offset, cellIndices, cellId, 0, 2, 1, outputIndices);
293  tri2seg(offset, cellIndices, cellId, 4, 5, 6, outputIndices);
294  tri2seg(offset, cellIndices, cellId, 4, 6, 7, outputIndices);
295  }
296  template <typename VecType, typename OutputPortal>
297  VISKORES_EXEC void operator()(const viskores::Id& pointOffset,
299  const VecType& cellIndices,
300  const viskores::Id& cellId,
301  OutputPortal& outputIndices) const
302 
303  {
304  viskores::Id offset = pointOffset;
305  tri2seg(offset, cellIndices, cellId, 0, 1, 2, outputIndices);
306  tri2seg(offset, cellIndices, cellId, 3, 5, 4, outputIndices);
307  tri2seg(offset, cellIndices, cellId, 3, 0, 2, outputIndices);
308  tri2seg(offset, cellIndices, cellId, 3, 2, 5, outputIndices);
309  tri2seg(offset, cellIndices, cellId, 1, 4, 5, outputIndices);
310  tri2seg(offset, cellIndices, cellId, 1, 5, 2, outputIndices);
311  tri2seg(offset, cellIndices, cellId, 0, 3, 4, outputIndices);
312  tri2seg(offset, cellIndices, cellId, 0, 4, 1, outputIndices);
313  }
314  template <typename VecType, typename OutputPortal>
315  VISKORES_EXEC void operator()(const viskores::Id& pointOffset,
317  const VecType& cellIndices,
318  const viskores::Id& cellId,
319  OutputPortal& outputIndices) const
320  {
321 
322  if (shapeType.Id == viskores::CELL_SHAPE_LINE)
323  {
324  viskores::Id3 segment;
325  segment[0] = cellId;
326 
327  segment[1] = cellIndices[0];
328  segment[2] = cellIndices[1];
329  outputIndices.Set(pointOffset, segment);
330  }
331  if (shapeType.Id == viskores::CELL_SHAPE_TRIANGLE)
332  {
333  viskores::Id3 segment;
334  segment[0] = cellId;
335  segment[1] = cellIndices[0];
336  segment[2] = cellIndices[1];
337  outputIndices.Set(pointOffset, segment);
338 
339  segment[1] = cellIndices[1];
340  segment[2] = cellIndices[2];
341  outputIndices.Set(pointOffset + 1, segment);
342 
343  segment[1] = cellIndices[2];
344  segment[2] = cellIndices[0];
345  outputIndices.Set(pointOffset + 2, segment);
346  }
347  if (shapeType.Id == viskores::CELL_SHAPE_QUAD)
348  {
349  viskores::Id3 segment;
350  segment[0] = cellId;
351  segment[1] = cellIndices[0];
352  segment[2] = cellIndices[1];
353  outputIndices.Set(pointOffset, segment);
354 
355  segment[1] = cellIndices[1];
356  segment[2] = cellIndices[2];
357  outputIndices.Set(pointOffset + 1, segment);
358 
359  segment[1] = cellIndices[2];
360  segment[2] = cellIndices[3];
361  outputIndices.Set(pointOffset + 2, segment);
362 
363  segment[1] = cellIndices[3];
364  segment[2] = cellIndices[0];
365  outputIndices.Set(pointOffset + 3, segment);
366  }
367  if (shapeType.Id == viskores::CELL_SHAPE_TETRA)
368  {
369  viskores::Id offset = pointOffset;
370  tri2seg(offset, cellIndices, cellId, 0, 3, 1, outputIndices);
371  tri2seg(offset, cellIndices, cellId, 1, 2, 3, outputIndices);
372  tri2seg(offset, cellIndices, cellId, 0, 2, 3, outputIndices);
373  tri2seg(offset, cellIndices, cellId, 0, 2, 1, outputIndices);
374  }
375  if (shapeType.Id == viskores::CELL_SHAPE_HEXAHEDRON)
376  {
377  viskores::Id offset = pointOffset;
378  tri2seg(offset, cellIndices, cellId, 0, 1, 5, outputIndices);
379  tri2seg(offset, cellIndices, cellId, 0, 5, 4, outputIndices);
380  tri2seg(offset, cellIndices, cellId, 1, 2, 6, outputIndices);
381  tri2seg(offset, cellIndices, cellId, 1, 6, 5, outputIndices);
382  tri2seg(offset, cellIndices, cellId, 3, 7, 6, outputIndices);
383  tri2seg(offset, cellIndices, cellId, 3, 6, 2, outputIndices);
384  tri2seg(offset, cellIndices, cellId, 0, 4, 7, outputIndices);
385  tri2seg(offset, cellIndices, cellId, 0, 7, 3, outputIndices);
386  tri2seg(offset, cellIndices, cellId, 0, 3, 2, outputIndices);
387  tri2seg(offset, cellIndices, cellId, 0, 2, 1, outputIndices);
388  tri2seg(offset, cellIndices, cellId, 4, 5, 6, outputIndices);
389  tri2seg(offset, cellIndices, cellId, 4, 6, 7, outputIndices);
390  }
391  if (shapeType.Id == viskores::CELL_SHAPE_WEDGE)
392  {
393  viskores::Id offset = pointOffset;
394  tri2seg(offset, cellIndices, cellId, 0, 1, 2, outputIndices);
395  tri2seg(offset, cellIndices, cellId, 3, 5, 4, outputIndices);
396  tri2seg(offset, cellIndices, cellId, 3, 0, 2, outputIndices);
397  tri2seg(offset, cellIndices, cellId, 3, 2, 5, outputIndices);
398  tri2seg(offset, cellIndices, cellId, 1, 4, 5, outputIndices);
399  tri2seg(offset, cellIndices, cellId, 1, 5, 2, outputIndices);
400  tri2seg(offset, cellIndices, cellId, 0, 3, 4, outputIndices);
401  tri2seg(offset, cellIndices, cellId, 0, 4, 1, outputIndices);
402  }
403  if (shapeType.Id == viskores::CELL_SHAPE_PYRAMID)
404  {
405  viskores::Id offset = pointOffset;
406 
407  tri2seg(offset, cellIndices, cellId, 0, 4, 1, outputIndices);
408  tri2seg(offset, cellIndices, cellId, 1, 2, 4, outputIndices);
409  tri2seg(offset, cellIndices, cellId, 2, 3, 4, outputIndices);
410  tri2seg(offset, cellIndices, cellId, 0, 4, 3, outputIndices);
411  tri2seg(offset, cellIndices, cellId, 3, 2, 1, outputIndices);
412  tri2seg(offset, cellIndices, cellId, 3, 1, 0, outputIndices);
413  }
414  }
415 
416  }; //class cylinderize
417 
418 public:
421 
423  void Run(const viskores::cont::UnknownCellSet& cellset,
425  viskores::Id& output)
426  {
428  {
429  viskores::cont::CellSetStructured<3> cellSetStructured3D =
431  const viskores::Id numCells = cellSetStructured3D.GetNumberOfCells();
432 
433  viskores::cont::ArrayHandleCounting<viskores::Id> cellIdxs(0, 1, numCells);
434  outputIndices.Allocate(numCells * TRI_PER_CSS * SEG_PER_TRI);
435 
437  segInvoker.Invoke(cellSetStructured3D, cellIdxs, outputIndices);
438 
439  output = numCells * TRI_PER_CSS * SEG_PER_TRI;
440  }
441  else
442  {
443  auto cellSetUnstructured =
445 
448  countInvoker.Invoke(cellSetUnstructured, segmentsPerCell);
449 
450  viskores::Id total = 0;
451  total = viskores::cont::Algorithm::Reduce(segmentsPerCell, viskores::Id(0));
452 
454  viskores::cont::Algorithm::ScanExclusive(segmentsPerCell, cellOffsets);
455  outputIndices.Allocate(total);
456 
458  cylInvoker.Invoke(cellSetUnstructured, cellOffsets, outputIndices);
459 
460  output = total;
461  }
462  }
463 };
464 }
465 }
466 #endif
viskores::rendering::Cylinderizer::CountSegments
Definition: Cylinderizer.h:44
viskores::worklet::WorkletVisitCellsWithPoints::FieldInCell
A control signature tag for input fields on the cells of the topology.
Definition: WorkletMapTopology.h:299
viskores::CELL_SHAPE_PYRAMID
@ CELL_SHAPE_PYRAMID
A pyramid with a quadrilateral base and four triangular faces.0.
Definition: CellShape.h:76
viskores::rendering::Cylinderizer::Run
void Run(const viskores::cont::UnknownCellSet &cellset, viskores::cont::ArrayHandle< viskores::Id3 > &outputIndices, viskores::Id &output)
Definition: Cylinderizer.h:423
viskores::rendering::Cylinderizer::Cylinderize::ExecutionSignature
void ExecutionSignature(_2, CellShape, PointIndices, WorkIndex, _3)
Definition: Cylinderizer.h:218
viskores::rendering::Cylinderizer::Cylinderize::Cylinderize
Cylinderize()
Definition: Cylinderizer.h:216
viskores::CellShapeTagGeneric::Id
viskores::UInt8 Id
An identifier that corresponds to one of the CELL_SHAPE_* identifiers.
Definition: CellShape.h:188
WorkletMapField.h
viskores::rendering::Cylinderizer::CountSegments::operator()
void operator()(viskores::CellShapeTagHexahedron, viskores::Id &segments) const
Definition: Cylinderizer.h:74
viskores::rendering::Cylinderizer::CountSegments::operator()
void operator()(viskores::CellShapeTagGeneric shapeType, viskores::Id &segments) const
Definition: Cylinderizer.h:53
viskores::worklet::WorkletVisitCellsWithPoints::CellSetIn
A control signature tag for input connectivity.
Definition: WorkletMapTopology.h:289
viskores::CellShapeTagHexahedron
Definition: CellShape.h:167
viskores::rendering::Cylinderizer::Cylinderize::operator()
void operator()(const viskores::Id &pointOffset, viskores::CellShapeTagHexahedron, const VecType &cellIndices, const viskores::Id &cellId, OutputPortal &outputIndices) const
Definition: Cylinderizer.h:275
viskores::rendering::Cylinderizer::SegmentedStructured::ExecutionSignature
void ExecutionSignature(IncidentElementIndices, _2, _3)
Definition: Cylinderizer.h:100
viskoresNotUsed
#define viskoresNotUsed(parameter_name)
Simple macro to identify a parameter as unused.
Definition: ExportMacros.h:136
viskores::rendering::Cylinderizer::SegmentedStructured::operator()
void operator()(const CellNodeVecType &cellIndices, const viskores::Id &cellIndex, OutIndicesPortal &outputIndices) const
Definition: Cylinderizer.h:130
TRI_PER_CSS
#define TRI_PER_CSS
Definition: Cylinderizer.h:34
viskores::cont::Algorithm::Reduce
static U Reduce(viskores::cont::DeviceAdapterId devId, const viskores::cont::ArrayHandle< T, CIn > &input, U initialValue)
Definition: Algorithm.h:672
viskores::cont::Algorithm::ScanExclusive
static T ScanExclusive(viskores::cont::DeviceAdapterId devId, const viskores::cont::ArrayHandle< T, CIn > &input, viskores::cont::ArrayHandle< T, COut > &output)
Definition: Algorithm.h:836
viskores::rendering::Cylinderizer::CountSegments::operator()
void operator()(viskores::CellShapeTagQuad, viskores::Id &segments) const
Definition: Cylinderizer.h:81
viskores::worklet::WorkletVisitCellsWithPoints::CellShape
An execution signature tag to get the shape of the visited cell.
Definition: WorkletMapTopology.h:406
viskores::cont::ArrayHandle
Manages an array-worth of data.
Definition: ArrayHandle.h:313
viskores::rendering::Cylinderizer::SegmentedStructured
Definition: Cylinderizer.h:95
viskores::worklet::WorkletVisitCellsWithPoints::FieldOut
A control signature tag for output fields.
Definition: WorkletMapTopology.h:339
VISKORES_DEFAULT_CELL_SET_LIST_UNSTRUCTURED
#define VISKORES_DEFAULT_CELL_SET_LIST_UNSTRUCTURED
Definition: DefaultTypes.h:68
viskores::IdComponent
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
viskores::rendering::Cylinderizer::SegmentedStructured::SegmentedStructured
SegmentedStructured()
Definition: Cylinderizer.h:103
viskores::CELL_SHAPE_HEXAHEDRON
@ CELL_SHAPE_HEXAHEDRON
A hexahedron.
Definition: CellShape.h:70
UncertainCellSet.h
viskores::worklet::WorkletVisitCellsWithPoints
Base class for worklets that map from Points to Cells.
Definition: WorkletMapTopology.h:265
viskores::rendering::Cylinderizer::SegmentedStructured::ControlSignature
void ControlSignature(CellSetIn cellset, FieldInCell, WholeArrayOut)
Definition: Cylinderizer.h:99
viskores::CellShapeTagGeneric
A special cell shape tag that holds a cell shape that is not known at compile time.
Definition: CellShape.h:178
viskores::worklet::WorkletVisitCellsWithPoints::PointIndices
An execution signature tag to get the indices of the incident points.
Definition: WorkletMapTopology.h:426
viskores::CellShapeTagWedge
Definition: CellShape.h:168
viskores::rendering::Cylinderizer::Cylinderizer
Cylinderizer()
Definition: Cylinderizer.h:420
viskores::Id
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
viskores::CELL_SHAPE_WEDGE
@ CELL_SHAPE_WEDGE
A wedge.
Definition: CellShape.h:74
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores::cont::UnknownCellSet::ResetCellSetList
viskores::cont::UncertainCellSet< CellSetList > ResetCellSetList(CellSetList) const
Assigns potential cell set types.
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::rendering::Cylinderizer::Cylinderize
Definition: Cylinderizer.h:211
viskores::rendering::Cylinderizer::CountSegments::ExecutionSignature
void ExecutionSignature(CellShape, _2)
Definition: Cylinderizer.h:50
viskores::worklet::DispatcherMapTopology
Dispatcher for worklets that inherit from WorkletMapTopology.
Definition: DispatcherMapTopology.h:39
Algorithm.h
viskores::CELL_SHAPE_TRIANGLE
@ CELL_SHAPE_TRIANGLE
A triangle.
Definition: CellShape.h:56
viskores::rendering::Cylinderizer::CountSegments::CountSegments
CountSegments()
Definition: Cylinderizer.h:48
viskores::rendering::Cylinderizer
Definition: Cylinderizer.h:41
viskores::cont::ArrayHandle::Allocate
void Allocate(viskores::Id numberOfValues, viskores::CopyFlag preserve, viskores::cont::Token &token) const
Allocates an array large enough to hold the given number of values.
Definition: ArrayHandle.h:504
viskores::CellShapeTagQuad
Definition: CellShape.h:164
viskores::rendering::Cylinderizer::Cylinderize::tri2seg
void tri2seg(viskores::Id &offset, const VecType &cellIndices, const viskores::Id &cellId, const viskores::Id Id0, const viskores::Id Id1, const viskores::Id Id2, OutputPortal &outputIndices) const
Definition: Cylinderizer.h:221
SEG_PER_TRI
#define SEG_PER_TRI
Definition: Cylinderizer.h:32
viskores::CELL_SHAPE_TETRA
@ CELL_SHAPE_TETRA
A tetrahedron.
Definition: CellShape.h:67
viskores::cont::ArrayHandleCounting
ArrayHandleCounting is a specialization of ArrayHandle.
Definition: ArrayHandleCounting.h:140
CellSetPermutation.h
viskores::cont::CellSetStructured
Defines a 1-, 2-, or 3-dimensional structured grid of points.
Definition: CastAndCall.h:40
viskores::cont::UnknownCellSet::CanConvert
bool CanConvert() const
Returns true if this cell set can be retrieved as the given type.
Definition: UnknownCellSet.h:172
viskores::cont::CellSetStructured::GetNumberOfCells
viskores::Id GetNumberOfCells() const override
Get the number of cells in the topology.
Definition: CellSetStructured.h:53
viskores::cont::UnknownCellSet
A CellSet of an unknown type.
Definition: UnknownCellSet.h:56
viskores::rendering::Cylinderizer::Cylinderize::operator()
void operator()(const viskores::Id &pointOffset, viskores::CellShapeTagWedge, const VecType &cellIndices, const viskores::Id &cellId, OutputPortal &outputIndices) const
Definition: Cylinderizer.h:297
viskores::rendering::Cylinderizer::Cylinderize::operator()
void operator()(const viskores::Id &pointOffset, viskores::CellShapeTagGeneric shapeType, const VecType &cellIndices, const viskores::Id &cellId, OutputPortal &outputIndices) const
Definition: Cylinderizer.h:315
viskores::rendering::Cylinderizer::CountSegments::ControlSignature
void ControlSignature(CellSetIn cellset, FieldOut)
Definition: Cylinderizer.h:49
viskores::CELL_SHAPE_QUAD
@ CELL_SHAPE_QUAD
A four-sided polygon.
Definition: CellShape.h:64
ArrayHandleCounting.h
viskores::rendering::Cylinderizer::Cylinderize::ControlSignature
void ControlSignature(CellSetIn cellset, FieldInCell, WholeArrayOut)
Definition: Cylinderizer.h:217
viskores::rendering::Cylinderizer::SegmentedStructured::cell2seg
void cell2seg(viskores::Id3 idx, viskores::Vec< Id, 3 > &segment, const viskores::Id offset, const CellNodeVecType &cellIndices, OutIndicesPortal &outputIndices) const
Definition: Cylinderizer.h:110
viskores::rendering::Cylinderizer::Cylinderize::operator()
void operator()(const viskores::Id &offset, viskores::CellShapeTagQuad shapeType, const VecType &cellIndices, const viskores::Id &cellId, OutputPortal &outputIndices) const
Definition: Cylinderizer.h:246
viskores::CellShapeTagQuad::Id
static constexpr viskores::UInt8 Id
Definition: CellShape.h:164
DispatcherMapTopology.h
WorkletMapTopology.h
viskores::Vec< viskores::Id, 3 >
viskores::cont::UnknownCellSet::AsCellSet
void AsCellSet(CellSetType &cellSet) const
Get the cell set as a known type.
Definition: UnknownCellSet.h:189
VISKORES_EXEC
#define VISKORES_EXEC
Definition: ExportMacros.h:59
DataSet.h
viskores::CELL_SHAPE_LINE
@ CELL_SHAPE_LINE
A line cell connecting two points.
Definition: CellShape.h:50
viskores::rendering::Cylinderizer::CountSegments::operator()
void operator()(viskores::CellShapeTagWedge, viskores::Id &segments) const
Definition: Cylinderizer.h:87
viskores::exec::arg::WorkIndex
The ExecutionSignature tag to use to get the work index.
Definition: WorkIndex.h:47