Go to the documentation of this file.
   10 #ifndef vtk_m_worklet_RemoveUnusedPoints_h 
   11 #define vtk_m_worklet_RemoveUnusedPoints_h 
   47     template <
typename Po
intMaskPortalType>
 
   50       pointMask.Set(pointIndex, 1);
 
   64     template <
typename IndexMapPortalType>
 
   67       return indexPortal.Get(pointIndex);
 
   75   template <
typename ShapeStorage, 
typename ConnectivityStorage, 
typename OffsetsStorage>
 
   92   template <
typename ShapeStorage, 
typename ConnectivityStorage, 
typename OffsetsStorage>
 
  125   template <
typename ShapeStorage, 
typename ConnectivityStorage, 
typename OffsetsStorage>
 
  135                       this->PointScatter->GetOutputToInputMap().GetNumberOfValues());
 
  150   template <
typename ShapeStorage,
 
  151             typename ConnectivityStorage,
 
  152             typename OffsetsStorage,
 
  171                       inputToOutputPointMap,
 
  172                       newConnectivityArray);
 
  175     outCellSet.
Fill(numberOfPoints,
 
  177                     newConnectivityArray,
 
  192   template <
typename InArrayHandle>
 
  206     template <
typename InT, 
typename InS, 
typename OutT, 
typename OutS>
 
  211       self.MapPointFieldDeep(inArray, outArray);
 
  214     template <
typename InT, 
typename InS>
 
  220       (*this)(inArray, outArray, 
self);
 
  236   template <
typename InT, 
typename InS, 
typename OutT, 
typename OutS>
 
  243   template <
typename T, 
typename S>
 
  253   template <
typename InValueTypes, 
typename InStorageTypes, 
typename OutArrayHandle>
 
  256     OutArrayHandle& outArray)
 const 
  261   template <
typename InValueTypes, 
typename InStorageTypes>
 
  283 #endif //vtk_m_worklet_RemoveUnusedPoints_h 
  
A tag used to identify the point elements in a topology.
Definition: TopologyElementTag.h:34
 
VTKM_CONT void ArrayCopyDevice(const vtkm::cont::ArrayHandle< InValueType, InStorage > &source, vtkm::cont::ArrayHandle< OutValueType, OutStorage > &destination)
Does a deep copy from one array to another array.
Definition: ArrayCopyDevice.h:75
 
VTKM_CONT vtkm::Id GetNumberOfValues() const
Returns the number of entries in the array.
Definition: ArrayHandle.h:448
 
Manages an array-worth of data.
Definition: ArrayHandle.h:283
 
#define VTKM_EXEC
Definition: ExportMacros.h:51
 
Groups connected points that have the same field value.
Definition: Atomic.h:19
 
VTKM_CONT vtkm::cont::ArrayHandle< T > MapPointFieldDeep(const vtkm::cont::ArrayHandle< T, S > &inArray) const
Maps a point field from the original points to the new reduced points.
Definition: RemoveUnusedPoints.h:244
 
#define VTKM_ASSERT(condition)
Definition: Assert.h:43
 
A control signature tag for output fields.
Definition: WorkletMapField.h:60
 
VTKM_CONT void AllocateAndFill(vtkm::Id numberOfValues, const ValueType &fillValue, vtkm::CopyFlag preserve, vtkm::cont::Token &token) const
Allocates an array and fills it with an initial value.
Definition: ArrayHandle.h:495
 
const vtkm::worklet::ScatterCounting & GetPointScatter() const
Definition: RemoveUnusedPoints.h:271
 
VTKM_CONT vtkm::cont::CellSetExplicit< ShapeStorage, VTKM_DEFAULT_CONNECTIVITY_STORAGE_TAG, OffsetsStorage > MapCellSet(const vtkm::cont::CellSetExplicit< ShapeStorage, ConnectivityStorage, OffsetsStorage > &inCellSet) const
Map cell indices.
Definition: RemoveUnusedPoints.h:128
 
An ArrayHandle of an unknown value type and storage.
Definition: UnknownArrayHandle.h:406
 
VTKM_CONT void MapPointFieldDeep(const vtkm::cont::ArrayHandle< InT, InS > &inArray, vtkm::cont::ArrayHandle< OutT, OutS > &outArray) const
Maps a point field from the original points to the new reduced points.
Definition: RemoveUnusedPoints.h:237
 
void(_1, _2) ExecutionSignature
Definition: RemoveUnusedPoints.h:45
 
void CastAndCall(const DynamicObject &dynamicObject, Functor &&f, Args &&... args)
A Generic interface to CastAndCall.
Definition: CastAndCall.h:47
 
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
 
vtkm::cont::ArrayHandle< vtkm::IdComponent > MaskArray
Definition: RemoveUnusedPoints.h:274
 
static VTKM_CONT vtkm::cont::CellSetExplicit< ShapeStorage, VTKM_DEFAULT_CONNECTIVITY_STORAGE_TAG, OffsetsStorage > MapCellSet(const vtkm::cont::CellSetExplicit< ShapeStorage, ConnectivityStorage, OffsetsStorage > &inCellSet, const vtkm::cont::ArrayHandle< vtkm::Id, MapStorage > &inputToOutputPointMap, vtkm::Id numberOfPoints)
Map cell indices.
Definition: RemoveUnusedPoints.h:157
 
VTKM_CONT RemoveUnusedPoints(const vtkm::cont::CellSetExplicit< ShapeStorage, ConnectivityStorage, OffsetsStorage > &inCellSet)
Definition: RemoveUnusedPoints.h:76
 
A scatter that maps input to some numbers of output.
Definition: ScatterCounting.h:44
 
const VTKM_CONT ConnectivityChooser< VisitTopology, IncidentTopology >::OffsetsArrayType & GetOffsetsArray(VisitTopology, IncidentTopology) const
 
void(FieldIn pointIndices, WholeArrayInOut pointMask) ControlSignature
Definition: RemoveUnusedPoints.h:44
 
Dispatcher for worklets that inherit from WorkletMapField.
Definition: DispatcherMapField.h:25
 
VTKM_CONT void operator()(const vtkm::cont::ArrayHandle< InT, InS > &inArray, vtkm::cont::ArrayHandle< OutT, OutS > &outArray, const RemoveUnusedPoints &self) const
Definition: RemoveUnusedPoints.h:207
 
VTKM_CONT vtkm::cont::UncertainArrayHandle< InValueTypes, InStorageTypes > MapPointFieldDeep(const vtkm::cont::UncertainArrayHandle< InValueTypes, InStorageTypes > &inArray) const
Maps a point field from the original points to the new reduced points.
Definition: RemoveUnusedPoints.h:262
 
VTKM_CONT void FindPointsStart()
Get this class ready for identifying the points used by cell sets.
Definition: RemoveUnusedPoints.h:86
 
A control signature tag for input fields.
Definition: WorkletMapField.h:49
 
A collection of worklets used to identify which points are used by at least one cell and then remove ...
Definition: RemoveUnusedPoints.h:34
 
#define VTKM_IS_ARRAY_HANDLE(T)
Definition: ArrayHandle.h:132
 
Implicitly permutes the values in an array.
Definition: ArrayHandlePermutation.h:227
 
VTKM_CONT vtkm::cont::ArrayHandlePermutation< vtkm::cont::ArrayHandle< vtkm::Id >, InArrayHandle > MapPointFieldShallow(const InArrayHandle &inArray) const
Maps a point field from the original points to the new reduced points.
Definition: RemoveUnusedPoints.h:194
 
#define VTKM_CONT
Definition: ExportMacros.h:57
 
VTKM_EXEC void operator()(vtkm::Id pointIndex, const PointMaskPortalType &pointMask) const
Definition: RemoveUnusedPoints.h:48
 
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.
 
#define VTKM_DEFAULT_CONNECTIVITY_STORAGE_TAG
Definition: CellSetExplicit.h:62
 
VTKM_CONT void FindPoints(const vtkm::cont::CellSetExplicit< ShapeStorage, ConnectivityStorage, OffsetsStorage > &inCellSet)
Analyze the given cell set to find all points that are used.
Definition: RemoveUnusedPoints.h:93
 
VTKM_CONT vtkm::cont::ArrayHandlePermutation< IndexArrayHandleType, ValueArrayHandleType > make_ArrayHandlePermutation(IndexArrayHandleType indexArray, ValueArrayHandleType valueArray)
make_ArrayHandleTransform is convenience function to generate an ArrayHandleTransform.
Definition: ArrayHandlePermutation.h:279
 
VTKM_CONT vtkm::Id GetNumberOfPoints() const override
 
A worklet that creates a mask of used points (the first step in removing unused points).
Definition: RemoveUnusedPoints.h:42
 
An ArrayHandle of an uncertain value type and storage.
Definition: UncertainArrayHandle.h:39
 
VTKM_CONT void FindPointsEnd()
Compile the information collected from calls to FindPointsInCellSet to ready this class for mapping c...
Definition: RemoveUnusedPoints.h:112
 
const VTKM_CONT ConnectivityChooser< VisitTopology, IncidentTopology >::ShapesArrayType & GetShapesArray(VisitTopology, IncidentTopology) const
 
std::shared_ptr< vtkm::worklet::ScatterCounting > PointScatter
Manages how the original point indices map to the new point indices.
Definition: RemoveUnusedPoints.h:278
 
Definition: CastAndCall.h:36
 
VTKM_CONT RemoveUnusedPoints()=default
 
A tag used to identify the cell elements in a topology.
Definition: TopologyElementTag.h:24
 
Definition: RemoveUnusedPoints.h:204
 
VTKM_CONT void MapPointFieldDeep(const vtkm::cont::UncertainArrayHandle< InValueTypes, InStorageTypes > &inArray, OutArrayHandle &outArray) const
Maps a point field from the original points to the new reduced points.
Definition: RemoveUnusedPoints.h:254
 
VTKM_CONT void ReleaseResources() const
Releases all resources in both the control and execution environments.
Definition: ArrayHandle.h:559
 
const VTKM_CONT ConnectivityChooser< VisitTopology, IncidentTopology >::ConnectivityArrayType & GetConnectivityArray(VisitTopology, IncidentTopology) const
 
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38
 
VTKM_CONT void operator()(const vtkm::cont::ArrayHandle< InT, InS > &inArray, vtkm::cont::UnknownArrayHandle &outHolder, const RemoveUnusedPoints &self) const
Definition: RemoveUnusedPoints.h:215