VTK-m  2.2
DotProduct.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_filter_vector_analysis_DotProduct_h
12 #define vtk_m_filter_vector_analysis_DotProduct_h
13 
14 #include <vtkm/filter/Filter.h>
16 
17 namespace vtkm
18 {
19 namespace filter
20 {
21 namespace vector_analysis
22 {
23 
32 {
33 public:
35 
43  const std::string& name,
45  {
46  this->SetActiveField(name, association);
47  }
48 
50  VTKM_CONT const std::string& GetPrimaryFieldName() const { return this->GetActiveFieldName(); }
53  {
54  return this->GetActiveFieldAssociation();
55  }
56 
59  {
60  this->SetUseCoordinateSystemAsField(flag);
61  }
64  {
65  return this->GetUseCoordinateSystemAsField();
66  }
67 
70  {
71  this->SetActiveCoordinateSystem(coord_idx);
72  }
75  {
76  return this->GetActiveCoordinateSystemIndex();
77  }
78 
86  const std::string& name,
88  {
89  this->SetActiveField(1, name, association);
90  }
91 
93  VTKM_CONT const std::string& GetSecondaryFieldName() const { return this->GetActiveFieldName(1); }
96  {
97  return this->GetActiveFieldAssociation(1);
98  }
99 
102  {
103  this->SetUseCoordinateSystemAsField(1, flag);
104  }
107  {
108  return this->GetUseCoordinateSystemAsField(1);
109  }
110 
113  {
114  this->SetActiveCoordinateSystem(1, index);
115  }
118  {
119  return this->GetActiveCoordinateSystemIndex(1);
120  }
121 
122 private:
123  vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
124 };
125 
126 } // namespace vector_analysis
127 } // namespace filter
128 } // namespace vtkm
129 
130 #endif // vtk_m_filter_vector_analysis_DotProduct_h
vtkm::filter::vector_analysis::DotProduct::GetSecondaryFieldAssociation
vtkm::cont::Field::Association GetSecondaryFieldAssociation() const
Specify the secondary field to operate on.
Definition: DotProduct.h:95
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::cont::Field::Association
Association
Identifies what elements of a data set a field is associated with.
Definition: Field.h:38
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::vector_analysis::DotProduct::GetUseCoordinateSystemAsPrimaryField
bool GetUseCoordinateSystemAsPrimaryField() const
Specify the primary field to operate on.
Definition: DotProduct.h:63
vtkm::filter::vector_analysis::DotProduct::GetPrimaryFieldName
const std::string & GetPrimaryFieldName() const
Specify the primary field to operate on.
Definition: DotProduct.h:50
vtkm::filter::vector_analysis::DotProduct::GetSecondaryCoordinateSystemIndex
vtkm::Id GetSecondaryCoordinateSystemIndex() const
Specify the secondary field to operate on.
Definition: DotProduct.h:117
VTKM_FILTER_VECTOR_ANALYSIS_EXPORT
#define VTKM_FILTER_VECTOR_ANALYSIS_EXPORT
Definition: vtkm_filter_vector_analysis_export.h:44
vtkm_filter_vector_analysis_export.h
vtkm::filter::vector_analysis::DotProduct::SetUseCoordinateSystemAsPrimaryField
void SetUseCoordinateSystemAsPrimaryField(bool flag)
Specify the primary field to operate on.
Definition: DotProduct.h:58
vtkm::filter::vector_analysis::DotProduct::SetUseCoordinateSystemAsSecondaryField
void SetUseCoordinateSystemAsSecondaryField(bool flag)
Specify the secondary field to operate on.
Definition: DotProduct.h:101
vtkm::filter::vector_analysis::DotProduct::GetPrimaryCoordinateSystemIndex
vtkm::Id GetPrimaryCoordinateSystemIndex() const
Specify the primary field to operate on.
Definition: DotProduct.h:74
vtkm::filter::vector_analysis::DotProduct::GetPrimaryFieldAssociation
vtkm::cont::Field::Association GetPrimaryFieldAssociation() const
Specify the primary field to operate on.
Definition: DotProduct.h:52
vtkm::filter::Filter
Base class for all filters.
Definition: Filter.h:163
vtkm::cont::Field::Association::Any
@ Any
Any field regardless of the association.
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Id
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
vtkm::filter::vector_analysis::DotProduct
Compute the dot product of vector fields.
Definition: DotProduct.h:31
vtkm::filter::vector_analysis::DotProduct::SetPrimaryCoordinateSystem
void SetPrimaryCoordinateSystem(vtkm::Id coord_idx)
Specify the primary field to operate on.
Definition: DotProduct.h:69
vtkm::filter::vector_analysis::DotProduct::SetSecondaryCoordinateSystem
void SetSecondaryCoordinateSystem(vtkm::Id index)
Specify the secondary field to operate on.
Definition: DotProduct.h:112
vtkm::filter::vector_analysis::DotProduct::GetSecondaryFieldName
const std::string & GetSecondaryFieldName() const
Specify the secondary field to operate on.
Definition: DotProduct.h:93
vtkm::filter::vector_analysis::DotProduct::SetSecondaryField
void SetSecondaryField(const std::string &name, vtkm::cont::Field::Association association=vtkm::cont::Field::Association::Any)
Specify the secondary field to operate on.
Definition: DotProduct.h:85
vtkm::filter::vector_analysis::DotProduct::SetPrimaryField
void SetPrimaryField(const std::string &name, vtkm::cont::Field::Association association=vtkm::cont::Field::Association::Any)
Specify the primary field to operate on.
Definition: DotProduct.h:42
vtkm::filter::vector_analysis::DotProduct::GetUseCoordinateSystemAsSecondaryField
bool GetUseCoordinateSystemAsSecondaryField() const
Specify the secondary field to operate on.
Definition: DotProduct.h:106
Filter.h