VTK-m  2.0
Vorticity.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_Vorticity_h
12 #define vtk_m_worklet_gradient_Vorticity_h
13 
15 
16 namespace vtkm
17 {
18 namespace worklet
19 {
20 namespace gradient
21 {
22 
24 
25 
27 {
28  using ControlSignature = void(FieldIn input, FieldOut output);
29 
30  template <typename InputType, typename OutputType>
31  VTKM_EXEC void operator()(const InputType& input, OutputType& vorticity) const
32  {
33  vorticity[0] = input[1][2] - input[2][1];
34  vorticity[1] = input[2][0] - input[0][2];
35  vorticity[2] = input[0][1] - input[1][0];
36  }
37 };
38 }
39 }
40 }
41 
42 #endif
VTKM_EXEC
#define VTKM_EXEC
Definition: ExportMacros.h:51
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
WorkletMapField.h
vtkm::worklet::WorkletMapField::FieldOut
A control signature tag for output fields.
Definition: WorkletMapField.h:60
vtkm::worklet::gradient::Vorticity::operator()
VTKM_EXEC void operator()(const InputType &input, OutputType &vorticity) const
Definition: Vorticity.h:31
vtkm::worklet::gradient::Vorticity
Definition: Vorticity.h:26
vtkm::worklet::WorkletMapField::FieldIn
A control signature tag for input fields.
Definition: WorkletMapField.h:49
vtkm::worklet::gradient::Vorticity::ControlSignature
void(FieldIn input, FieldOut output) ControlSignature
Definition: Vorticity.h:28
vtkm::Vec
A short fixed-length array.
Definition: Types.h:767
vtkm::List
Definition: List.h:34
vtkm::worklet::WorkletMapField
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38