VTK-m  2.3
CellLocatorBase.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_cont_internal_CellLocatorBase_h
11 #define vtk_m_cont_internal_CellLocatorBase_h
12 
14 
15 #include <vtkm/Types.h>
19 
20 namespace vtkm
21 {
22 namespace cont
23 {
24 
35 {
38  mutable bool Modified = true;
39 
40 public:
41  virtual ~CellLocatorBase() = default;
42 
46  VTKM_CONT const vtkm::cont::UnknownCellSet& GetCellSet() const { return this->CellSet; }
49  {
50  this->CellSet = cellSet;
51  this->SetModified();
52  }
53 
57  VTKM_CONT const vtkm::cont::CoordinateSystem& GetCoordinates() const { return this->Coords; }
60  {
61  this->Coords = coords;
62  this->SetModified();
63  }
66  {
67  this->SetCoordinates({ "coords", coords });
68  }
69 
81  VTKM_CONT void Update() const;
82 
83 protected:
84  void SetModified() { this->Modified = true; }
85  bool GetModified() const { return this->Modified; }
86 
87  virtual void Build() = 0;
88 };
89 
90 }
91 } // vtkm::cont::internal
92 
93 #endif //vtk_m_cont_internal_CellLocatorBase_h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::cont::CellLocatorBase::SetCoordinates
void SetCoordinates(const vtkm::cont::CoordinateSystem &coords)
Specify the CoordinateSystem defining the location of the cells.
Definition: CellLocatorBase.h:59
Types.h
UnknownCellSet.h
vtkm::cont::UnknownArrayHandle
An ArrayHandle of an unknown value type and storage.
Definition: UnknownArrayHandle.h:430
vtkm::cont::CellLocatorBase::GetCellSet
const vtkm::cont::UnknownCellSet & GetCellSet() const
Specify the CellSet defining the structure of the cells being searched.
Definition: CellLocatorBase.h:46
vtkm::cont::UnknownCellSet
A CellSet of an unknown type.
Definition: UnknownCellSet.h:48
CoordinateSystem.h
vtkm::cont::CoordinateSystem
Manages a coordinate system for a DataSet.
Definition: CoordinateSystem.h:30
vtkm::cont::CellLocatorBase::GetCoordinates
const vtkm::cont::CoordinateSystem & GetCoordinates() const
Specify the CoordinateSystem defining the location of the cells.
Definition: CellLocatorBase.h:57
vtkm::cont::CellLocatorBase::SetCoordinates
void SetCoordinates(const vtkm::cont::UnknownArrayHandle &coords)
Specify the CoordinateSystem defining the location of the cells.
Definition: CellLocatorBase.h:65
vtkm::cont::CellLocatorBase
Base class for all CellLocator classes.
Definition: CellLocatorBase.h:34
vtkm::cont::CellLocatorBase::Coords
vtkm::cont::CoordinateSystem Coords
Definition: CellLocatorBase.h:37
VTKM_CONT_EXPORT
#define VTKM_CONT_EXPORT
Definition: vtkm_cont_export.h:44
vtkm_cont_export.h
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::cont::CellLocatorBase::GetModified
bool GetModified() const
Definition: CellLocatorBase.h:85
vtkm::cont::CellLocatorBase::SetCellSet
void SetCellSet(const vtkm::cont::UnknownCellSet &cellSet)
Specify the CellSet defining the structure of the cells being searched.
Definition: CellLocatorBase.h:48
vtkm::cont::ExecutionObjectBase
Base ExecutionObjectBase for execution objects to inherit from so that you can use an arbitrary objec...
Definition: ExecutionObjectBase.h:31
vtkm::cont::CellLocatorBase::SetModified
void SetModified()
Definition: CellLocatorBase.h:84
vtkm::cont::CellLocatorBase::CellSet
vtkm::cont::UnknownCellSet CellSet
Definition: CellLocatorBase.h:36
ExecutionObjectBase.h