Go to the documentation of this file.
10 #ifndef vtk_m_worklet_CellDeepCopy_h
11 #define vtk_m_worklet_CellDeepCopy_h
43 using ControlSignature = void(CellSetIn inputTopology, FieldOut shapes, FieldOut pointIndices);
46 template <
typename CellShape,
typename InPo
intIndexType,
typename OutPo
intIndexType>
48 const InPointIndexType& inPoints,
50 OutPointIndexType& outPoints)
const
53 outShape = inShape.Id;
56 VTKM_ASSERT(numPoints == outPoints.GetNumberOfComponents());
59 outPoints[pointIndex] = inPoints[pointIndex];
64 template <
typename InCellSetType,
65 typename ShapeStorage,
66 typename ConnectivityStorage,
67 typename OffsetsStorage>
69 const InCellSetType& inCellSet,
78 countDispatcher.Invoke(inCellSet, numIndices);
86 connectivity.
Allocate(connectivitySize);
89 passDispatcher.Invoke(
93 newCellSet.
Fill(numberOfPoints, shapes, connectivity, offsets);
94 outCellSet = newCellSet;
97 template <
typename InCellSetType,
98 typename ShapeStorage,
99 typename ConnectivityStorage,
100 typename OffsetsStorage>
102 const InCellSetType& inCellSet,
108 template <
typename InCellSetType>
114 Run(inCellSet, outCellSet);
122 #endif //vtk_m_worklet_CellDeepCopy_h
#define VTKM_EXEC
Definition: ExportMacros.h:51
Groups connected points that have the same field value.
Definition: Atomic.h:19
#define VTKM_ASSERT(condition)
Definition: Assert.h:43
VTKM_CONT void Allocate(vtkm::Id numberOfValues, vtkm::CopyFlag preserve, vtkm::cont::Token &token) const
Allocates an array large enough to hold the given number of values.
Definition: ArrayHandle.h:465
#define VTKM_IS_KNOWN_OR_UNKNOWN_CELL_SET(T)
Definition: UnknownCellSet.h:313
IncidentElementCount PointCount
Definition: WorkletMapTopology.h:267
void(CellSetIn inputTopology, FieldOut numPointsInCell) ControlSignature
Definition: CellDeepCopy.h:34
vtkm::Int32 IdComponent
Represents a component ID (index of component in a vector).
Definition: Types.h:168
VTKM_EXEC void operator()(const CellShape &inShape, const InPointIndexType &inPoints, vtkm::UInt8 &outShape, OutPointIndexType &outPoints) const
Definition: CellDeepCopy.h:47
IncidentElementIndices PointIndices
Definition: WorkletMapTopology.h:269
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
void(CellShape, PointIndices, _2, _3) ExecutionSignature
Definition: CellDeepCopy.h:44
Definition: CellDeepCopy.h:32
Dispatcher for worklets that inherit from WorkletMapTopology.
Definition: DispatcherMapTopology.h:31
Base class for worklets that map from Points to Cells.
Definition: WorkletMapTopology.h:255
static VTKM_CONT void Run(const InCellSetType &inCellSet, vtkm::cont::CellSetExplicit< ShapeStorage, ConnectivityStorage, OffsetsStorage > &outCellSet)
Definition: CellDeepCopy.h:101
VTKM_CONT vtkm::cont::ArrayHandleGroupVecVariable< ComponentsArrayHandleType, OffsetsArrayHandleType > make_ArrayHandleGroupVecVariable(const ComponentsArrayHandleType &componentsArray, const OffsetsArrayHandleType &offsetsArray)
make_ArrayHandleGroupVecVariable is convenience function to generate an ArrayHandleGroupVecVariable.
Definition: ArrayHandleGroupVecVariable.h:308
VTKM_EXEC vtkm::IdComponent operator()(vtkm::IdComponent numPoints) const
Definition: CellDeepCopy.h:38
#define VTKM_CONT
Definition: ExportMacros.h:57
VTKM_CONT void Fill(vtkm::Id numPoints, const vtkm::cont::ArrayHandle< vtkm::UInt8, ShapesStorageTag > &cellTypes, const vtkm::cont::ArrayHandle< vtkm::Id, ConnectivityStorageTag > &connectivity, const vtkm::cont::ArrayHandle< vtkm::Id, OffsetsStorageTag > &offsets)
Second method to add cells – all at once.
uint8_t UInt8
Definition: Types.h:157
_2(PointCount) ExecutionSignature
Definition: CellDeepCopy.h:35
static VTKM_CONT void Run(const InCellSetType &inCellSet, vtkm::cont::CellSetExplicit< ShapeStorage, ConnectivityStorage, OffsetsStorage > &outCellSet, vtkm::Id numberOfPoints)
Definition: CellDeepCopy.h:68
VTKM_CONT vtkm::Id GetNumberOfPoints() const override
VTKM_CONT_EXPORT void ConvertNumComponentsToOffsets(const vtkm::cont::UnknownArrayHandle &numComponentsArray, vtkm::cont::ArrayHandle< vtkm::Id > &offsetsArray, vtkm::Id &componentsArraySize, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny{})
Definition: CellDeepCopy.h:41
Container for worklets and helper methods to copy a cell set to a new CellSetExplicit structure.
Definition: CellDeepCopy.h:30
Definition: CastAndCall.h:36
static VTKM_CONT vtkm::cont::CellSetExplicit Run(const InCellSetType &inCellSet)
Definition: CellDeepCopy.h:109
void(CellSetIn inputTopology, FieldOut shapes, FieldOut pointIndices) ControlSignature
Definition: CellDeepCopy.h:43