VTK-m  2.2
CleanGrid.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 #ifndef vtk_m_filter_clean_grid_CleanGrid_h
11 #define vtk_m_filter_clean_grid_CleanGrid_h
12 
13 #include <vtkm/filter/Filter.h>
15 
16 namespace vtkm
17 {
18 namespace filter
19 {
20 
21 // Forward declaration for stateful Worklets
22 namespace clean_grid
23 {
24 struct SharedStates;
25 
43 {
44 public:
48  VTKM_CONT bool GetCompactPointFields() const { return this->CompactPointFields; }
50  VTKM_CONT void SetCompactPointFields(bool flag) { this->CompactPointFields = flag; }
51 
56  VTKM_CONT bool GetMergePoints() const { return this->MergePoints; }
58  VTKM_CONT void SetMergePoints(bool flag) { this->MergePoints = flag; }
59 
67  VTKM_CONT vtkm::Float64 GetTolerance() const { return this->Tolerance; }
69  VTKM_CONT void SetTolerance(vtkm::Float64 tolerance) { this->Tolerance = tolerance; }
70 
75  VTKM_CONT bool GetToleranceIsAbsolute() const { return this->ToleranceIsAbsolute; }
77  VTKM_CONT void SetToleranceIsAbsolute(bool flag) { this->ToleranceIsAbsolute = flag; }
78 
84  VTKM_CONT bool GetRemoveDegenerateCells() const { return this->RemoveDegenerateCells; }
86  VTKM_CONT void SetRemoveDegenerateCells(bool flag) { this->RemoveDegenerateCells = flag; }
87 
92  VTKM_CONT bool GetFastMerge() const { return this->FastMerge; }
94  VTKM_CONT void SetFastMerge(bool flag) { this->FastMerge = flag; }
95 
96 private:
97  VTKM_CONT
98  vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inData) override;
99 
100  VTKM_CONT vtkm::cont::DataSet GenerateOutput(const vtkm::cont::DataSet& inData,
101  vtkm::cont::CellSetExplicit<>& outputCellSet,
102  clean_grid::SharedStates& worklets);
103 
104  bool CompactPointFields = true;
105  bool MergePoints = true;
106  vtkm::Float64 Tolerance = 1.0e-6;
107  bool ToleranceIsAbsolute = false;
108  bool RemoveDegenerateCells = true;
109  bool FastMerge = true;
110 };
111 } // namespace clean_grid
112 
113 } // namespace filter
114 } // namespace vtkm
115 
116 #endif //vtk_m_filter_clean_grid_CleanGrid_h
vtkm::filter::clean_grid::CleanGrid::SetMergePoints
void SetMergePoints(bool flag)
When the MergePoints flag is true, the filter will identify any coincident points and merge them toge...
Definition: CleanGrid.h:58
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::clean_grid::CleanGrid::GetToleranceIsAbsolute
bool GetToleranceIsAbsolute() const
When ToleranceIsAbsolute is false (the default) then the tolerance is scaled by the diagonal of the b...
Definition: CleanGrid.h:75
vtkm_filter_clean_grid_export.h
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::clean_grid::CleanGrid::GetRemoveDegenerateCells
bool GetRemoveDegenerateCells() const
When RemoveDegenerateCells is true (the default), then CleanGrid will look for repeated points in cel...
Definition: CleanGrid.h:84
vtkm::filter::clean_grid::CleanGrid::SetCompactPointFields
void SetCompactPointFields(bool flag)
When the CompactPointFields flag is true, the filter will identify and remove any points that are not...
Definition: CleanGrid.h:50
vtkm::filter::Filter
Base class for all filters.
Definition: Filter.h:163
vtkm::filter::clean_grid::CleanGrid::SetFastMerge
void SetFastMerge(bool flag)
When FastMerge is true (the default), some corners are cut when computing coincident points.
Definition: CleanGrid.h:94
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::filter::clean_grid::CleanGrid::SetTolerance
void SetTolerance(vtkm::Float64 tolerance)
Defines the tolerance used when determining whether two points are considered coincident.
Definition: CleanGrid.h:69
vtkm::filter::clean_grid::CleanGrid::GetMergePoints
bool GetMergePoints() const
When the MergePoints flag is true, the filter will identify any coincident points and merge them toge...
Definition: CleanGrid.h:56
VTKM_FILTER_CLEAN_GRID_EXPORT
#define VTKM_FILTER_CLEAN_GRID_EXPORT
Definition: vtkm_filter_clean_grid_export.h:44
vtkm::filter::clean_grid::CleanGrid::GetTolerance
vtkm::Float64 GetTolerance() const
Defines the tolerance used when determining whether two points are considered coincident.
Definition: CleanGrid.h:67
vtkm::filter::clean_grid::CleanGrid
Clean a mesh to an unstructured grid.
Definition: CleanGrid.h:42
vtkm::cont::CellSetExplicit
Defines an irregular collection of cells.
Definition: CastAndCall.h:36
vtkm::filter::clean_grid::CleanGrid::SetRemoveDegenerateCells
void SetRemoveDegenerateCells(bool flag)
When RemoveDegenerateCells is true (the default), then CleanGrid will look for repeated points in cel...
Definition: CleanGrid.h:86
vtkm::filter::clean_grid::CleanGrid::GetCompactPointFields
bool GetCompactPointFields() const
When the CompactPointFields flag is true, the filter will identify and remove any points that are not...
Definition: CleanGrid.h:48
vtkm::Float64
double Float64
Base type to use for 64-bit floating-point numbers.
Definition: Types.h:161
vtkm::filter::clean_grid::CleanGrid::SetToleranceIsAbsolute
void SetToleranceIsAbsolute(bool flag)
When ToleranceIsAbsolute is false (the default) then the tolerance is scaled by the diagonal of the b...
Definition: CleanGrid.h:77
vtkm::filter::clean_grid::CleanGrid::GetFastMerge
bool GetFastMerge() const
When FastMerge is true (the default), some corners are cut when computing coincident points.
Definition: CleanGrid.h:92
Filter.h