VTK-m  2.0
CellGradient.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 
11 #ifndef vtk_m_worklet_gradient_CellGradient_h
12 #define vtk_m_worklet_gradient_CellGradient_h
13 
17 
19 
20 namespace vtkm
21 {
22 namespace worklet
23 {
24 namespace gradient
25 {
26 
28 {
29  using ControlSignature = void(CellSetIn,
30  FieldInPoint pointCoordinates,
31  FieldInPoint inputField,
32  GradientOutputs outputFields);
33 
34  using ExecutionSignature = void(CellShape, PointCount, _2, _3, _4);
35  using InputDomain = _1;
36 
37  template <typename CellTagType,
38  typename PointCoordVecType,
39  typename FieldInVecType,
40  typename GradientOutType>
41  VTKM_EXEC void operator()(CellTagType shape,
42  vtkm::IdComponent pointCount,
43  const PointCoordVecType& wCoords,
44  const FieldInVecType& field,
45  GradientOutType& outputGradient) const
46  {
47  vtkm::Vec3f center;
48  vtkm::exec::ParametricCoordinatesCenter(pointCount, shape, center);
49 
50  vtkm::exec::CellDerivative(field, wCoords, center, shape, outputGradient);
51  }
52 };
53 }
54 }
55 }
56 
57 #endif
VTKM_EXEC
#define VTKM_EXEC
Definition: ExportMacros.h:51
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::worklet::WorkletVisitCellsWithPoints::PointCount
IncidentElementCount PointCount
Definition: WorkletMapTopology.h:267
vtkm::IdComponent
vtkm::Int32 IdComponent
Represents a component ID (index of component in a vector).
Definition: Types.h:168
vtkm::worklet::gradient::CellGradient
Definition: CellGradient.h:27
CellDerivative.h
vtkm::worklet::gradient::CellGradient::ControlSignature
void(CellSetIn, FieldInPoint pointCoordinates, FieldInPoint inputField, GradientOutputs outputFields) ControlSignature
Definition: CellGradient.h:32
vtkm::worklet::gradient::CellGradient::operator()
VTKM_EXEC void operator()(CellTagType shape, vtkm::IdComponent pointCount, const PointCoordVecType &wCoords, const FieldInVecType &field, GradientOutType &outputGradient) const
Definition: CellGradient.h:41
GradientOutput.h
vtkm::worklet::WorkletVisitCellsWithPoints
Base class for worklets that map from Points to Cells.
Definition: WorkletMapTopology.h:255
vtkm::exec::CellDerivative
VTKM_EXEC vtkm::ErrorCode CellDerivative(const FieldVecType &field, const WorldCoordType &wCoords, const vtkm::Vec< ParametricCoordType, 3 > &pcoords, CellShapeTag shape, vtkm::Vec< typename FieldVecType::ComponentType, 3 > &result)
Definition: CellDerivative.h:69
vtkm::worklet::WorkletVisitCellsWithPoints::FieldInPoint
FieldInIncident FieldInPoint
Definition: WorkletMapTopology.h:259
vtkm::Vec< vtkm::FloatDefault, 3 >
vtkm::worklet::gradient::CellGradient::ExecutionSignature
void(CellShape, PointCount, _2, _3, _4) ExecutionSignature
Definition: CellGradient.h:34
vtkm::worklet::gradient::CellGradient::InputDomain
_1 InputDomain
Definition: CellGradient.h:35
WorkletMapTopology.h
ParametricCoordinates.h
vtkm::worklet::gradient::GradientOutputs
Definition: GradientOutput.h:305