Go to the documentation of this file.
18 #ifndef viskores_worklet_CellDeepCopy_h
19 #define viskores_worklet_CellDeepCopy_h
54 template <
typename CellShape,
typename InPo
intIndexType,
typename OutPo
intIndexType>
56 const InPointIndexType& inPoints,
58 OutPointIndexType& outPoints)
const
61 outShape = inShape.Id;
67 outPoints[pointIndex] = inPoints[pointIndex];
72 template <
typename InCellSetType,
73 typename ShapeStorage,
74 typename ConnectivityStorage,
75 typename OffsetsStorage>
77 const InCellSetType& inCellSet,
86 countDispatcher.Invoke(inCellSet, numIndices);
94 connectivity.
Allocate(connectivitySize);
97 passDispatcher.Invoke(
101 newCellSet.
Fill(numberOfPoints, shapes, connectivity, offsets);
102 outCellSet = newCellSet;
105 template <
typename InCellSetType,
106 typename ShapeStorage,
107 typename ConnectivityStorage,
108 typename OffsetsStorage>
110 const InCellSetType& inCellSet,
116 template <
typename InCellSetType>
122 Run(inCellSet, outCellSet);
130 #endif //viskores_worklet_CellDeepCopy_h
#define VISKORES_IS_KNOWN_OR_UNKNOWN_CELL_SET(T)
Definition: UnknownCellSet.h:325
void operator()(const CellShape &inShape, const InPointIndexType &inPoints, viskores::UInt8 &outShape, OutPointIndexType &outPoints) const
Definition: CellDeepCopy.h:55
static viskores::cont::CellSetExplicit Run(const InCellSetType &inCellSet)
Definition: CellDeepCopy.h:117
A control signature tag for input connectivity.
Definition: WorkletMapTopology.h:289
An execution signature tag to get the shape of the visited cell.
Definition: WorkletMapTopology.h:406
A control signature tag for output fields.
Definition: WorkletMapTopology.h:339
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
Base class for worklets that map from Points to Cells.
Definition: WorkletMapTopology.h:265
An execution signature tag to get the number of incident points.
Definition: WorkletMapTopology.h:416
An execution signature tag to get the indices of the incident points.
Definition: WorkletMapTopology.h:426
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
#define VISKORES_CONT
Definition: ExportMacros.h:65
void(CellSetIn inputTopology, FieldOut shapes, FieldOut pointIndices) ControlSignature
Definition: CellDeepCopy.h:51
void(CellShape, PointIndices, _2, _3) ExecutionSignature
Definition: CellDeepCopy.h:52
Groups connected points that have the same field value.
Definition: Atomic.h:27
Dispatcher for worklets that inherit from WorkletMapTopology.
Definition: DispatcherMapTopology.h:39
Definition: CellDeepCopy.h:40
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
Defines an irregular collection of cells.
Definition: CastAndCall.h:44
#define VISKORES_ASSERT(condition)
Definition: Assert.h:51
void Fill(viskores::Id numPoints, const viskores::cont::ArrayHandle< viskores::UInt8, ShapesStorageTag > &cellTypes, const viskores::cont::ArrayHandle< viskores::Id, ConnectivityStorageTag > &connectivity, const viskores::cont::ArrayHandle< viskores::Id, OffsetsStorageTag > &offsets)
Set all the cells of the mesh.
void ConvertNumComponentsToOffsets(const viskores::cont::UnknownArrayHandle &numComponentsArray, viskores::cont::ArrayHandle< viskores::Id > &offsetsArray, viskores::Id &componentsArraySize, viskores::cont::DeviceAdapterId device=viskores::cont::DeviceAdapterTagAny{})
ConvertNumComponentsToOffsets takes an array of Vec sizes (i.e.
uint8_t UInt8
Base type to use for 8-bit unsigned integer numbers.
Definition: Types.h:177
viskores::Id GetNumberOfPoints() const override
_2(PointCount) ExecutionSignature
Definition: CellDeepCopy.h:43
Definition: CellDeepCopy.h:49
viskores::cont::ArrayHandleGroupVecVariable< ComponentsArrayHandleType, OffsetsArrayHandleType > make_ArrayHandleGroupVecVariable(const ComponentsArrayHandleType &componentsArray, const OffsetsArrayHandleType &offsetsArray)
make_ArrayHandleGroupVecVariable is convenience function to generate an ArrayHandleGroupVecVariable.
Definition: ArrayHandleGroupVecVariable.h:332
static void Run(const InCellSetType &inCellSet, viskores::cont::CellSetExplicit< ShapeStorage, ConnectivityStorage, OffsetsStorage > &outCellSet)
Definition: CellDeepCopy.h:109
viskores::IdComponent operator()(viskores::IdComponent numPoints) const
Definition: CellDeepCopy.h:46
Container for worklets and helper methods to copy a cell set to a new CellSetExplicit structure.
Definition: CellDeepCopy.h:38
void(CellSetIn inputTopology, FieldOut numPointsInCell) ControlSignature
Definition: CellDeepCopy.h:42
#define VISKORES_EXEC
Definition: ExportMacros.h:59
static void Run(const InCellSetType &inCellSet, viskores::cont::CellSetExplicit< ShapeStorage, ConnectivityStorage, OffsetsStorage > &outCellSet, viskores::Id numberOfPoints)
Definition: CellDeepCopy.h:76