VTK-m  2.2
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 
15 #include <vtkm/Deprecated.h>
16 #include <vtkm/filter/Filter.h>
18 
19 namespace vtkm
20 {
21 namespace filter
22 {
23 namespace entity_extraction
24 {
39 {
40 public:
42 
47  VTKM_CONT void SetRemoveGhostField(bool flag) { this->RemoveField = flag; }
49  VTKM_CONT bool GetRemoveGhostField() const { return this->RemoveField; }
50 
55  VTKM_CONT void SetTypesToRemove(vtkm::UInt8 typeFlags) { this->TypesToRemove = typeFlags; }
57  VTKM_CONT vtkm::UInt8 GetTypesToRemove() const { return this->TypesToRemove; }
58 
64  VTKM_CONT void SetTypesToRemoveToAll() { this->SetTypesToRemove(0xFF); }
66  VTKM_CONT bool AreAllTypesRemoved() const { return this->GetTypesToRemove() == 0xFF; }
67 
68  VTKM_DEPRECATED(2.1, "Use SetRemoveGhostField(true).")
69  VTKM_CONT void RemoveGhostField() { this->SetRemoveGhostField(true); }
70  VTKM_DEPRECATED(2.1, "Use SetTypesToRemoveToAll().")
71  VTKM_CONT void RemoveAllGhost() { this->SetTypesToRemoveToAll(); }
72  VTKM_DEPRECATED(2.1, "Use SetTypesToRemove(vals).")
73  VTKM_CONT void RemoveByType(const vtkm::UInt8& vals) { this->SetTypesToRemove(vals); }
74 
75  VTKM_DEPRECATED(2.1, "Use AreAllTypesRemoved().")
76  VTKM_CONT bool GetRemoveAllGhost() const { return this->AreAllTypesRemoved(); }
77 
84  VTKM_CONT bool GetUseGhostCellsAsField() const { return this->UseGhostCellsAsField; }
86  VTKM_CONT void SetUseGhostCellsAsField(bool flag) { this->UseGhostCellsAsField = flag; }
87 
88  VTKM_DEPRECATED(2.1, "Use !AreAllTypesRemoved().")
89  VTKM_CONT bool GetRemoveByType() const { return !this->AreAllTypesRemoved(); }
90  VTKM_DEPRECATED(2.1, "Use GetTypesToRemove().")
91  VTKM_CONT vtkm::UInt8 GetRemoveType() const { return this->GetTypesToRemove(); }
92 
93 private:
94  VTKM_CONT
95  vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
96 
97  bool UseGhostCellsAsField = true;
98  bool RemoveField = false;
99  vtkm::UInt8 TypesToRemove = 0xFF;
100 };
101 
102 } // namespace entity_extraction
103 } // namespace filter
104 } // namespace vtkm
105 
106 #endif // vtk_m_filter_entity_extraction_GhostCellRemove_h
CellClassification.h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::entity_extraction::GhostCellRemove::GetRemoveGhostField
bool GetRemoveGhostField() const
Specify whether the ghost cell array should be removed from the input.
Definition: GhostCellRemove.h:49
vtkm::filter::entity_extraction::GhostCellRemove::SetUseGhostCellsAsField
void SetUseGhostCellsAsField(bool flag)
Specify whether the marked ghost cells or a named field should be used as the ghost field.
Definition: GhostCellRemove.h:86
VTKM_FILTER_ENTITY_EXTRACTION_EXPORT
#define VTKM_FILTER_ENTITY_EXTRACTION_EXPORT
Definition: vtkm_filter_entity_extraction_export.h:44
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::entity_extraction::GhostCellRemove
Removes cells marked as ghost cells.
Definition: GhostCellRemove.h:38
vtkm::filter::entity_extraction::GhostCellRemove::SetTypesToRemoveToAll
void SetTypesToRemoveToAll()
Set filter to remove any special cell type.
Definition: GhostCellRemove.h:64
vtkm::filter::entity_extraction::GhostCellRemove::GetTypesToRemove
vtkm::UInt8 GetTypesToRemove() const
Specify which types of cells to remove.
Definition: GhostCellRemove.h:57
vtkm::filter::entity_extraction::GhostCellRemove::AreAllTypesRemoved
bool AreAllTypesRemoved() const
Returns true if all abnormal cell types are removed.
Definition: GhostCellRemove.h:66
vtkm::filter::entity_extraction::GhostCellRemove::SetTypesToRemove
void SetTypesToRemove(vtkm::UInt8 typeFlags)
Specify which types of cells to remove.
Definition: GhostCellRemove.h:55
vtkm::filter::Filter
Base class for all filters.
Definition: Filter.h:163
vtkm::filter::entity_extraction::GhostCellRemove::SetRemoveGhostField
void SetRemoveGhostField(bool flag)
Specify whether the ghost cell array should be removed from the input.
Definition: GhostCellRemove.h:47
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::UInt8
uint8_t UInt8
Base type to use for 8-bit unsigned integer numbers.
Definition: Types.h:169
vtkm::filter::entity_extraction::GhostCellRemove::GetUseGhostCellsAsField
bool GetUseGhostCellsAsField() const
Specify whether the marked ghost cells or a named field should be used as the ghost field.
Definition: GhostCellRemove.h:84
Deprecated.h
vtkm_filter_entity_extraction_export.h
VTKM_DEPRECATED
#define VTKM_DEPRECATED(...)
Definition: Deprecated.h:145
Filter.h