VTK-m  2.0
Divergence.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_Divergence_h
12 #define vtk_m_worklet_gradient_Divergence_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& divergence) const
32  {
33  divergence = input[0][0] + input[1][1] + input[2][2];
34  }
35 };
36 }
37 }
38 }
39 #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::Divergence::operator()
VTKM_EXEC void operator()(const InputType &input, OutputType &divergence) const
Definition: Divergence.h:31
vtkm::worklet::WorkletMapField::FieldIn
A control signature tag for input fields.
Definition: WorkletMapField.h:49
vtkm::Vec
A short fixed-length array.
Definition: Types.h:767
vtkm::List
Definition: List.h:34
vtkm::worklet::gradient::Divergence::ControlSignature
void(FieldIn input, FieldOut output) ControlSignature
Definition: Divergence.h:28
vtkm::worklet::gradient::Divergence
Definition: Divergence.h:26
vtkm::worklet::WorkletMapField
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38