Go to the documentation of this file.
10 #ifndef vtk_m_worklet_connectivity_CellSetDualGraph_h
11 #define vtk_m_worklet_connectivity_CellSetDualGraph_h
26 namespace connectivity
32 using ControlSignature = void(CellSetIn, FieldOutCell numEdgesInCell);
34 using ExecutionSignature = void(CellShape, PointCount, _2);
36 using InputDomain = _1;
38 template <
typename CellShapeTag>
39 VTKM_EXEC void operator()(CellShapeTag cellShape,
43 vtkm::exec::CellEdgeNumberOfEdges(pointCount, cellShape, numEdges);
49 using ControlSignature = void(CellSetIn, FieldOutCell cellIndices, FieldOutCell edgeIndices);
51 using ExecutionSignature = void(CellShape, InputIndex, PointIndices, VisitIndex, _2, _3);
53 using InputDomain = _1;
57 template <
typename CellShapeTag,
58 typename CellIndexType,
59 typename PointIndexVecType,
60 typename EdgeIndexVecType>
61 VTKM_EXEC void operator()(CellShapeTag cellShape,
62 CellIndexType cellIndex,
63 const PointIndexVecType& pointIndices,
65 CellIndexType& cellIndexOut,
66 EdgeIndexVecType& edgeIndices)
const
68 cellIndexOut = cellIndex;
69 vtkm::exec::CellEdgeCanonicalId(
70 pointIndices.GetNumberOfComponents(), visitIndex, cellShape, pointIndices, edgeIndices);
76 using ControlSignature = void(FieldIn index,
81 using ExecutionSignature = void(_1, InputIndex, _2, _3, _4);
83 using InputDomain = _1;
85 template <
typename ConnectivityPortalType,
typename CellIdPortalType>
88 const CellIdPortalType& cells,
89 ConnectivityPortalType& from,
90 ConnectivityPortalType& to)
const
92 from.Set(index * 2, cells.Get(offset));
93 to.Set(index * 2, cells.Get(offset + 1));
94 from.Set(index * 2 + 1, cells.Get(offset + 1));
95 to.Set(index * 2 + 1, cells.Get(offset));
111 edgesPerCellDisp.Invoke(cellSet, numEdgesPerCell);
116 edgeExtractDisp.Invoke(cellSet, cellIds, cellEdges);
164 c2cDisp.Invoke(lb, cellIds, connFrom, connTo);
184 #endif //vtk_m_worklet_connectivity_CellSetDualGraph_h
VTKM_CONT vtkm::Id GetNumberOfValues() const
Returns the number of entries in the array.
Definition: ArrayHandle.h:448
static VTKM_CONT void SortByKey(vtkm::cont::DeviceAdapterId devId, vtkm::cont::ArrayHandle< T, StorageT > &keys, vtkm::cont::ArrayHandle< U, StorageU > &values)
Definition: Algorithm.h:993
#define VTKM_EXEC
Definition: ExportMacros.h:51
Groups connected points that have the same field value.
Definition: Atomic.h:19
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
vtkm::Int32 IdComponent
Represents a component ID (index of component in a vector).
Definition: Types.h:168
Definition: CellSetDualGraph.h:100
static VTKM_CONT void LowerBounds(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, const vtkm::cont::ArrayHandle< T, CVal > &values, vtkm::cont::ArrayHandle< vtkm::Id, COut > &output)
Definition: Algorithm.h:604
static VTKM_CONT bool Copy(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, vtkm::cont::ArrayHandle< U, COut > &output)
Definition: Algorithm.h:410
A CellSet of an unknown type.
Definition: UnknownCellSet.h:48
static void Run(const vtkm::cont::UnknownCellSet &cellSet, vtkm::cont::ArrayHandle< vtkm::Id > &numIndicesArray, vtkm::cont::ArrayHandle< vtkm::Id > &indexOffsetArray, vtkm::cont::ArrayHandle< vtkm::Id > &connectivityArray)
Definition: CellSetDualGraph.h:126
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
static void EdgeToCellConnectivity(const vtkm::cont::UnknownCellSet &cellSet, vtkm::cont::ArrayHandle< vtkm::Id > &cellIds, vtkm::cont::ArrayHandle< vtkm::Id2 > &cellEdges)
Definition: CellSetDualGraph.h:104
A scatter that maps input to some numbers of output.
Definition: ScatterCounting.h:44
Dispatcher for worklets that inherit from WorkletMapField.
Definition: DispatcherMapField.h:25
Dispatcher for worklets that inherit from WorkletMapTopology.
Definition: DispatcherMapTopology.h:31
static VTKM_CONT T ScanExclusive(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, vtkm::cont::ArrayHandle< T, COut > &output)
Definition: Algorithm.h:816
Base class for worklets that map from Points to Cells.
Definition: WorkletMapTopology.h:255
static VTKM_CONT void CopyIf(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, const vtkm::cont::ArrayHandle< U, CStencil > &stencil, vtkm::cont::ArrayHandle< T, COut > &output)
Definition: Algorithm.h:435
An array handle with a constant value.
Definition: ArrayHandleConstant.h:63
Definition: Algorithm.h:385
static VTKM_CONT void ReduceByKey(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CKeyIn > &keys, const vtkm::cont::ArrayHandle< U, CValIn > &values, vtkm::cont::ArrayHandle< T, CKeyOut > &keys_output, vtkm::cont::ArrayHandle< U, CValOut > &values_output, BinaryFunctor binary_functor)
Definition: Algorithm.h:697
VTKM_EXEC bool operator()(vtkm::Id degree) const
Definition: CellSetDualGraph.h:123
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38
Definition: CellSetDualGraph.h:120