VTK-m  2.0
GhostCellRemove.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_entity_extraction_GhostCellRemove_h
12 #define vtk_m_filter_entity_extraction_GhostCellRemove_h
13 
16 #include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h>
17 
18 namespace vtkm
19 {
20 namespace filter
21 {
22 namespace entity_extraction
23 {
26 class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT GhostCellRemove : public vtkm::filter::FilterField
27 {
28 public:
29  VTKM_CONT
31 
32  VTKM_CONT
33  void RemoveGhostField() { this->RemoveField = true; }
34  VTKM_CONT
35  void RemoveAllGhost() { this->RemoveAll = true; }
36  VTKM_CONT
37  void RemoveByType(const vtkm::UInt8& vals)
38  {
39  this->RemoveAll = false;
40  this->RemoveVals = vals;
41  }
42  VTKM_CONT
43  bool GetRemoveGhostField() const { return this->RemoveField; }
44  VTKM_CONT
45  bool GetRemoveAllGhost() const { return this->RemoveAll; }
46 
47  VTKM_CONT
48  bool GetUseGhostCellsAsField() const { return this->UseGhostCellsAsField; }
49  VTKM_CONT
50  void SetUseGhostCellsAsField(bool flag) { this->UseGhostCellsAsField = flag; }
51 
52  VTKM_CONT
53  bool GetRemoveByType() const { return !this->RemoveAll; }
54  VTKM_CONT
55  vtkm::UInt8 GetRemoveType() const { return this->RemoveVals; }
56 
57 private:
58  VTKM_CONT
59  vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
60 
61  bool UseGhostCellsAsField = true;
62  bool RemoveAll = false;
63  bool RemoveField = false;
64  vtkm::UInt8 RemoveVals = 0;
65 };
66 
67 } // namespace entity_extraction
68 } // namespace filter
69 } // namespace vtkm
70 
71 #endif // vtk_m_filter_entity_extraction_GhostCellRemove_h
vtkm::filter::entity_extraction::GhostCellRemove::RemoveGhostField
VTKM_CONT void RemoveGhostField()
Definition: GhostCellRemove.h:33
CellClassification.h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::entity_extraction::GhostCellRemove::GetRemoveByType
VTKM_CONT bool GetRemoveByType() const
Definition: GhostCellRemove.h:53
vtkm::cont::DataSet
Definition: DataSet.h:34
vtkm::filter::entity_extraction::GhostCellRemove
Removes ghost cells.
Definition: GhostCellRemove.h:26
vtkm::filter::entity_extraction::GhostCellRemove::GetUseGhostCellsAsField
VTKM_CONT bool GetUseGhostCellsAsField() const
Definition: GhostCellRemove.h:48
vtkm::filter::entity_extraction::GhostCellRemove::GetRemoveAllGhost
VTKM_CONT bool GetRemoveAllGhost() const
Definition: GhostCellRemove.h:45
FilterField.h
vtkm::filter::FilterField
Definition: FilterField.h:21
vtkm::filter::entity_extraction::GhostCellRemove::SetUseGhostCellsAsField
VTKM_CONT void SetUseGhostCellsAsField(bool flag)
Definition: GhostCellRemove.h:50
vtkm::filter::entity_extraction::GhostCellRemove::RemoveAllGhost
VTKM_CONT void RemoveAllGhost()
Definition: GhostCellRemove.h:35
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::UInt8
uint8_t UInt8
Definition: Types.h:157
vtkm::filter::entity_extraction::GhostCellRemove::GetRemoveType
VTKM_CONT vtkm::UInt8 GetRemoveType() const
Definition: GhostCellRemove.h:55
vtkm::filter::entity_extraction::GhostCellRemove::RemoveByType
VTKM_CONT void RemoveByType(const vtkm::UInt8 &vals)
Definition: GhostCellRemove.h:37
vtkm::filter::entity_extraction::GhostCellRemove::GetRemoveGhostField
VTKM_CONT bool GetRemoveGhostField() const
Definition: GhostCellRemove.h:43