Go to the documentation of this file.
10 #ifndef vtk_m_worklet_CellDeepCopy_h
11 #define vtk_m_worklet_CellDeepCopy_h
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
An execution signature tag to get the shape of the visited cell.
Definition: WorkletMapTopology.h:396
#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
#define VTKM_IS_KNOWN_OR_UNKNOWN_CELL_SET(T)
Definition: UnknownCellSet.h:313
void(CellSetIn inputTopology, FieldOut numPointsInCell) ControlSignature
Definition: CellDeepCopy.h:34
vtkm::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:194
vtkm::Id GetNumberOfPoints() const override
static void Run(const InCellSetType &inCellSet, vtkm::cont::CellSetExplicit< ShapeStorage, ConnectivityStorage, OffsetsStorage > &outCellSet, vtkm::Id numberOfPoints)
Definition: CellDeepCopy.h:68
A control signature tag for input connectivity.
Definition: WorkletMapTopology.h:280
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)
Set all the cells of the mesh.
void(CellShape, PointIndices, _2, _3) ExecutionSignature
Definition: CellDeepCopy.h:44
Definition: CellDeepCopy.h:32
void ConvertNumComponentsToOffsets(const vtkm::cont::UnknownArrayHandle &numComponentsArray, vtkm::cont::ArrayHandle< vtkm::Id > &offsetsArray, vtkm::Id &componentsArraySize, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny{})
ConvertNumComponentsToOffsets takes an array of Vec sizes (i.e.
static void Run(const InCellSetType &inCellSet, vtkm::cont::CellSetExplicit< ShapeStorage, ConnectivityStorage, OffsetsStorage > &outCellSet)
Definition: CellDeepCopy.h:101
Dispatcher for worklets that inherit from WorkletMapTopology.
Definition: DispatcherMapTopology.h:31
Base class for worklets that map from Points to Cells.
Definition: WorkletMapTopology.h:256
A control signature tag for output fields.
Definition: WorkletMapTopology.h:329
vtkm::IdComponent operator()(vtkm::IdComponent numPoints) const
Definition: CellDeepCopy.h:38
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
static vtkm::cont::CellSetExplicit Run(const InCellSetType &inCellSet)
Definition: CellDeepCopy.h:109
uint8_t UInt8
Base type to use for 8-bit unsigned integer numbers.
Definition: Types.h:169
_2(PointCount) ExecutionSignature
Definition: CellDeepCopy.h:35
Definition: CellDeepCopy.h:41
Container for worklets and helper methods to copy a cell set to a new CellSetExplicit structure.
Definition: CellDeepCopy.h:30
Defines an irregular collection of cells.
Definition: CastAndCall.h:36
An execution signature tag to get the number of incident points.
Definition: WorkletMapTopology.h:406
void operator()(const CellShape &inShape, const InPointIndexType &inPoints, vtkm::UInt8 &outShape, OutPointIndexType &outPoints) const
Definition: CellDeepCopy.h:47
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:490
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:323
void(CellSetIn inputTopology, FieldOut shapes, FieldOut pointIndices) ControlSignature
Definition: CellDeepCopy.h:43
An execution signature tag to get the indices of the incident points.
Definition: WorkletMapTopology.h:416