VTK-m  2.2
CellMeasures.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_mesh_info_CellMeasures_h
12 #define vtk_m_filter_mesh_info_CellMeasures_h
13 
14 #include <vtkm/filter/Filter.h>
16 
17 #include <vtkm/Deprecated.h>
18 
19 namespace vtkm
20 {
21 namespace filter
22 {
23 namespace mesh_info
24 {
25 
29 enum struct IntegrationType
30 {
31  None = 0x00,
33  ArcLength = 0x01,
35  Area = 0x02,
37  Volume = 0x04,
40 };
41 
43 {
44  return static_cast<IntegrationType>(static_cast<int>(left) & static_cast<int>(right));
45 }
47 {
48  return static_cast<IntegrationType>(static_cast<int>(left) | static_cast<int>(right));
49 }
50 
59 {
60 public:
62 
63  VTKM_DEPRECATED(2.2, "Use default constructor and `SetIntegrationType`.")
65 
74  {
75  this->Measure = measure;
76  }
81  {
83  }
86  {
88  }
91  {
93  }
96  {
98  }
99 
103  VTKM_CONT void SetCellMeasureName(const std::string& name) { this->SetOutputFieldName(name); }
105  VTKM_CONT const std::string& GetCellMeasureName() const { return this->GetOutputFieldName(); }
106 
107 private:
108  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
109 
111 };
112 } // namespace mesh_info
113 } // namespace filter
114 } // namespace vtkm
115 
116 #endif // vtk_m_filter_mesh_info_CellMeasures_h
vtkm::filter::mesh_info::IntegrationType::None
@ None
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::mesh_info::operator|
IntegrationType operator|(IntegrationType left, IntegrationType right)
Definition: CellMeasures.h:46
VTKM_FILTER_MESH_INFO_EXPORT
#define VTKM_FILTER_MESH_INFO_EXPORT
Definition: vtkm_filter_mesh_info_export.h:44
VTKM_EXEC_CONT
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
vtkm::filter::mesh_info::CellMeasures::GetCellMeasureName
const std::string & GetCellMeasureName() const
Specify the name of the field generated.
Definition: CellMeasures.h:105
vtkm::filter::mesh_info::IntegrationType::ArcLength
@ ArcLength
Compute the length of 1D elements.
vtkm::filter::mesh_info::CellMeasures::SetCellMeasureName
void SetCellMeasureName(const std::string &name)
Specify the name of the field generated.
Definition: CellMeasures.h:103
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::mesh_info::CellMeasures::SetMeasureToVolume
void SetMeasureToVolume()
Compute the volume of 3D elements.
Definition: CellMeasures.h:90
vtkm::filter::mesh_info::IntegrationType::Area
@ Area
Compute the area of 2D elements.
vtkm::filter::mesh_info::IntegrationType::Volume
@ Volume
Compute the volume of 3D elements.
vtkm::filter::Filter
Base class for all filters.
Definition: Filter.h:163
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::filter::mesh_info::CellMeasures::SetMeasureToAll
void SetMeasureToAll()
Compute the size of all types of elements.
Definition: CellMeasures.h:95
vtkm::filter::mesh_info::CellMeasures
Compute the size measure of each cell in a dataset.
Definition: CellMeasures.h:58
vtkm::filter::mesh_info::IntegrationType::AllMeasures
@ AllMeasures
Compute the size of all types of elements.
vtkm::filter::mesh_info::CellMeasures::SetMeasureToArcLength
void SetMeasureToArcLength()
Compute the length of 1D elements.
Definition: CellMeasures.h:80
Deprecated.h
vtkm::filter::mesh_info::CellMeasures::SetMeasureToArea
void SetMeasureToArea()
Compute the area of 2D elements.
Definition: CellMeasures.h:85
vtkm::filter::mesh_info::CellMeasures::GetMeasure
vtkm::filter::mesh_info::IntegrationType GetMeasure() const
Specify the type of integrations to support.
Definition: CellMeasures.h:78
vtkm::filter::mesh_info::CellMeasures::SetMeasure
void SetMeasure(vtkm::filter::mesh_info::IntegrationType measure)
Specify the type of integrations to support.
Definition: CellMeasures.h:73
vtkm_filter_mesh_info_export.h
vtkm::filter::mesh_info::operator&
IntegrationType operator&(IntegrationType left, IntegrationType right)
Definition: CellMeasures.h:42
VTKM_DEPRECATED
#define VTKM_DEPRECATED(...)
Definition: Deprecated.h:145
vtkm::filter::mesh_info::IntegrationType
IntegrationType
Specifies over what types of mesh elements CellMeasures will operate.
Definition: CellMeasures.h:29
Filter.h