Viskores  1.0
cont/CellLocatorPartitioned.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_CellLocatorPartitioned_h
19 #define viskores_cont_CellLocatorPartitioned_h
20 
24 
25 namespace viskores
26 {
27 namespace cont
28 {
30 {
31 
32 public:
33  virtual ~CellLocatorPartitioned() = default;
34 
36 
38  {
39  this->Partitions = partitions;
40  this->SetModified();
41  }
42  const viskores::cont::PartitionedDataSet& GetPartitions() const { return this->Partitions; }
43 
44  void Update();
45 
46  void SetModified() { this->Modified = true; }
47  bool GetModified() const { return this->Modified; }
48 
49  void Build();
50 
51  VISKORES_CONT const viskores::exec::CellLocatorPartitioned PrepareForExecution(
53  viskores::cont::Token& token);
54 
55 private:
57  std::vector<CellLocatorGeneral> LocatorsCont;
58  std::vector<viskores::cont::ArrayHandleStride<viskores::UInt8>> GhostsCont;
62  bool Modified = true;
63 };
64 } // namespace cont
65 } //namespace viskores
66 
67 #endif //viskores_cont_CellLocatorPartitioned_h
viskores::cont::CellLocatorPartitioned::SetPartitions
void SetPartitions(const viskores::cont::PartitionedDataSet &partitions)
Definition: cont/CellLocatorPartitioned.h:37
viskores::cont::CellLocatorPartitioned::GetModified
bool GetModified() const
Definition: cont/CellLocatorPartitioned.h:47
viskores::cont::ArrayHandle< viskores::cont::CellLocatorGeneral::ExecObjType >
viskores::exec::CellLocatorPartitioned
Definition: exec/CellLocatorPartitioned.h:29
ArrayCopy.h
viskores::cont::CellLocatorPartitioned
Definition: cont/CellLocatorPartitioned.h:29
viskores::cont::CellLocatorPartitioned::GhostsExec
viskores::cont::ArrayHandle< viskores::cont::ArrayHandleStride< viskores::UInt8 >::ReadPortalType > GhostsExec
Definition: cont/CellLocatorPartitioned.h:61
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
CellLocatorPartitioned.h
viskores::cont::PartitionedDataSet
Comprises a set of viskores::cont::DataSet objects.
Definition: PartitionedDataSet.h:34
viskores::cont::CellLocatorPartitioned::GhostsCont
std::vector< viskores::cont::ArrayHandleStride< viskores::UInt8 > > GhostsCont
Definition: cont/CellLocatorPartitioned.h:58
viskores::cont::DeviceAdapterId
An object used to specify a device.
Definition: DeviceAdapterTag.h:66
PartitionedDataSet.h
viskores::cont::CellLocatorPartitioned::GetPartitions
const viskores::cont::PartitionedDataSet & GetPartitions() const
Definition: cont/CellLocatorPartitioned.h:42
viskores::cont::CellLocatorPartitioned::Partitions
viskores::cont::PartitionedDataSet Partitions
Definition: cont/CellLocatorPartitioned.h:56
viskores::cont::CellLocatorPartitioned::LocatorsCont
std::vector< CellLocatorGeneral > LocatorsCont
Definition: cont/CellLocatorPartitioned.h:57
viskores::cont::CellLocatorPartitioned::LocatorsExec
viskores::cont::ArrayHandle< viskores::cont::CellLocatorGeneral::ExecObjType > LocatorsExec
Definition: cont/CellLocatorPartitioned.h:59
viskores::cont::CellLocatorPartitioned::SetModified
void SetModified()
Definition: cont/CellLocatorPartitioned.h:46
viskores::cont::Token
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:43
viskores::cont::ExecutionObjectBase
Base ExecutionObjectBase for execution objects to inherit from so that you can use an arbitrary objec...
Definition: ExecutionObjectBase.h:39