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