Go to the documentation of this file.
10 #ifndef vtk_m_worklet_SurfaceNormals_h
11 #define vtk_m_worklet_SurfaceNormals_h
51 template <
typename NormalFnctr = detail::Normal>
60 template <
typename CellShapeTag,
typename Po
intsVecType,
typename T>
62 const PointsVecType& points,
66 const auto tag =
typename CTraits::TopologicalDimensionsTag();
67 this->
Compute(tag, points, normal);
70 template <vtkm::IdComponent Dim,
typename Po
intsVecType,
typename T>
78 template <
typename Po
intsVecType,
typename T>
80 const PointsVecType& points,
88 template <
typename Po
intsVecType,
typename T>
90 const PointsVecType& points,
115 template <
typename CellSetType,
typename Po
intsType,
typename NormalCompType>
116 void Run(
const CellSetType& cellset,
117 const PointsType& points,
127 cellset, points, normals);
148 template <
typename FaceNormalsVecType,
typename T>
150 const FaceNormalsVecType& faceNormals,
159 auto result = faceNormals[0];
162 result += faceNormals[i];
169 template <
typename CellSetType,
typename NormalCompType,
typename FaceNormalStorageType>
171 const CellSetType& cellset,
181 #endif // vtk_m_worklet_SurfaceNormals_h
NormalFnctr Normal
Definition: worklet/SurfaceNormals.h:103
Manages an array-worth of data.
Definition: ArrayHandle.h:283
Definition: worklet/SurfaceNormals.h:52
#define VTKM_EXEC
Definition: ExportMacros.h:51
Groups connected points that have the same field value.
Definition: Atomic.h:19
The TypeTraits class provides helpful compile-time information about the basic types used in VTKm (an...
Definition: TypeTraits.h:61
Definition: worklet/SurfaceNormals.h:135
FieldInIncident FieldInCell
Definition: WorkletMapTopology.h:278
bool Normalize
Definition: worklet/SurfaceNormals.h:132
vtkm::Int32 IdComponent
Represents a component ID (index of component in a vector).
Definition: Types.h:168
void(CellShape, _2, _3) ExecutionSignature
Definition: worklet/SurfaceNormals.h:56
bool GetNormalize() const
Definition: worklet/SurfaceNormals.h:113
Definition: worklet/SurfaceNormals.h:138
_1 InputDomain
Definition: worklet/SurfaceNormals.h:146
void(CellCount, _2, _3) ExecutionSignature
Definition: worklet/SurfaceNormals.h:144
VTKM_EXEC void Compute(vtkm::CellTopologicalDimensionsTag< Dim >, const PointsVecType &, vtkm::Vec< T, 3 > &normal) const
Definition: worklet/SurfaceNormals.h:71
VTKM_EXEC_CONT T Normal(const T &x)
Returns a normalized version of the given vector.
Definition: VectorAnalysis.h:157
#define vtkmGenericCellShapeMacro(call)
A macro used in a switch statement to determine cell shape.
Definition: CellShape.h:230
void(CellSetIn cellset, FieldInCell faceNormals, FieldOutPoint pointNormals) ControlSignature
Definition: worklet/SurfaceNormals.h:143
void SetNormalize(bool value)
Set/Get if the results should be normalized.
Definition: worklet/SurfaceNormals.h:112
IncidentElementCount CellCount
Definition: WorkletMapTopology.h:286
void Run(const CellSetType &cellset, const vtkm::cont::ArrayHandle< vtkm::Vec< NormalCompType, 3 >, FaceNormalStorageType > &faceNormals, vtkm::cont::ArrayHandle< vtkm::Vec< NormalCompType, 3 >> &pointNormals)
Definition: worklet/SurfaceNormals.h:170
Base class for worklets that map from Cells to Points.
Definition: WorkletMapTopology.h:274
vtkm::CellTraits::TopologyDimensionType is typedef to this with the template parameter set to TOPOLOG...
Definition: CellTraits.h:23
Dispatcher for worklets that inherit from WorkletMapTopology.
Definition: DispatcherMapTopology.h:31
VTKM_EXEC_CONT vtkm::Vec< typename detail::FloatingPointReturnType< T >::Type, 3 > Cross(const vtkm::Vec< T, 3 > &x, const vtkm::Vec< T, 3 > &y)
Find the cross product of two vectors.
Definition: VectorAnalysis.h:177
Base class for worklets that map from Points to Cells.
Definition: WorkletMapTopology.h:255
VTKM_EXEC void operator()(CellShapeTag, const PointsVecType &points, vtkm::Vec< T, 3 > &normal) const
Definition: worklet/SurfaceNormals.h:61
FieldInIncident FieldInPoint
Definition: WorkletMapTopology.h:259
void(CellSetIn cellset, FieldInPoint points, FieldOutCell normals) ControlSignature
Definition: worklet/SurfaceNormals.h:55
VTKM_EXEC void Compute(vtkm::CellTopologicalDimensionsTag< 2 >, const PointsVecType &points, vtkm::Vec< T, 3 > &normal) const
Definition: worklet/SurfaceNormals.h:79
_1 InputDomain
Definition: worklet/SurfaceNormals.h:58
A short fixed-length array.
Definition: Types.h:767
vtkm::UInt8 Id
Definition: CellShape.h:160
void Run(const CellSetType &cellset, const PointsType &points, vtkm::cont::ArrayHandle< vtkm::Vec< NormalCompType, 3 >> &normals)
Definition: worklet/SurfaceNormals.h:116
FieldOut FieldOutPoint
Definition: WorkletMapTopology.h:282
Definition: worklet/SurfaceNormals.h:48
Definition: Normalize.h:34
FacetedSurfaceNormals()
Definition: worklet/SurfaceNormals.h:106
VTKM_EXEC void operator()(vtkm::CellShapeTagGeneric shape, const PointsVecType &points, vtkm::Vec< T, 3 > &normal) const
Definition: worklet/SurfaceNormals.h:89
A special cell shape tag that holds a cell shape that is not known at compile time.
Definition: CellShape.h:152
Information about a cell based on its tag.
Definition: CellTraits.h:46
VTKM_EXEC void RaiseError(const char *message) const
Definition: FunctorBase.h:40
FieldOut FieldOutCell
Definition: WorkletMapTopology.h:263
VTKM_EXEC void operator()(vtkm::IdComponent numCells, const FaceNormalsVecType &faceNormals, vtkm::Vec< T, 3 > &pointNormal) const
Definition: worklet/SurfaceNormals.h:149