Viskores  1.0
CellLocatorBase.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 #ifndef viskores_cont_internal_CellLocatorBase_h
19 #define viskores_cont_internal_CellLocatorBase_h
20 
22 
23 #include <viskores/Types.h>
27 
28 namespace viskores
29 {
30 namespace cont
31 {
32 
42 class VISKORES_CONT_EXPORT CellLocatorBase : public viskores::cont::ExecutionObjectBase
43 {
46  mutable bool Modified = true;
47 
48 public:
49  virtual ~CellLocatorBase() = default;
50 
54  VISKORES_CONT const viskores::cont::UnknownCellSet& GetCellSet() const { return this->CellSet; }
57  {
58  this->CellSet = cellSet;
59  this->SetModified();
60  }
61 
66  {
67  return this->Coords;
68  }
71  {
72  this->Coords = coords;
73  this->SetModified();
74  }
77  {
78  this->SetCoordinates({ "coords", coords });
79  }
80 
92  VISKORES_CONT void Update() const;
93 
94 protected:
95  void SetModified() { this->Modified = true; }
96  bool GetModified() const { return this->Modified; }
97 
98  virtual void Build() = 0;
99 };
100 
101 }
102 } // viskores::cont::internal
103 
104 #endif //viskores_cont_internal_CellLocatorBase_h
viskores::cont::CellLocatorBase
Base class for all CellLocator classes.
Definition: CellLocatorBase.h:42
viskores::cont::CellLocatorBase::SetCoordinates
void SetCoordinates(const viskores::cont::CoordinateSystem &coords)
Specify the CoordinateSystem defining the location of the cells.
Definition: CellLocatorBase.h:70
Types.h
UnknownCellSet.h
viskores::cont::CellLocatorBase::SetCellSet
void SetCellSet(const viskores::cont::UnknownCellSet &cellSet)
Specify the CellSet defining the structure of the cells being searched.
Definition: CellLocatorBase.h:56
viskores::cont::CoordinateSystem
Manages a coordinate system for a DataSet.
Definition: CoordinateSystem.h:38
CoordinateSystem.h
viskores::cont::CellLocatorBase::SetCoordinates
void SetCoordinates(const viskores::cont::UnknownArrayHandle &coords)
Specify the CoordinateSystem defining the location of the cells.
Definition: CellLocatorBase.h:76
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::cont::CellLocatorBase::Coords
viskores::cont::CoordinateSystem Coords
Definition: CellLocatorBase.h:45
viskores::cont::CellLocatorBase::GetCellSet
const viskores::cont::UnknownCellSet & GetCellSet() const
Specify the CellSet defining the structure of the cells being searched.
Definition: CellLocatorBase.h:54
viskores::cont::CellLocatorBase::CellSet
viskores::cont::UnknownCellSet CellSet
Definition: CellLocatorBase.h:44
viskores::cont::UnknownCellSet
A CellSet of an unknown type.
Definition: UnknownCellSet.h:56
viskores::cont::CellLocatorBase::SetModified
void SetModified()
Definition: CellLocatorBase.h:95
viskores::cont::CellLocatorBase::GetModified
bool GetModified() const
Definition: CellLocatorBase.h:96
viskores::cont::UnknownArrayHandle
An ArrayHandle of an unknown value type and storage.
Definition: UnknownArrayHandle.h:451
ExecutionObjectBase.h
viskores::cont::ExecutionObjectBase
Base ExecutionObjectBase for execution objects to inherit from so that you can use an arbitrary objec...
Definition: ExecutionObjectBase.h:39
viskores_cont_export.h
viskores::cont::CellLocatorBase::GetCoordinates
const viskores::cont::CoordinateSystem & GetCoordinates() const
Specify the CoordinateSystem defining the location of the cells.
Definition: CellLocatorBase.h:65