VTK-m  2.2
Amr.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_source_Amr_h
12 #define vtk_m_source_Amr_h
13 
16 
17 namespace vtkm
18 {
19 namespace source
20 {
59 {
60 public:
61  VTKM_CONT Amr() = default;
62 
63  VTKM_CONT VTKM_DEPRECATED(2.0, "Use Set* methods to set parameters.")
64  Amr(vtkm::IdComponent dimension,
65  vtkm::IdComponent cellsPerDimension = 6,
66  vtkm::IdComponent numberOfLevels = 4);
67 
68  VTKM_CONT ~Amr() = default;
69 
70  VTKM_CONT void SetDimension(vtkm::IdComponent dimension) { this->Dimension = dimension; }
71  VTKM_CONT vtkm::IdComponent GetDimension() const { return this->Dimension; }
72 
74  {
75  this->CellsPerDimension = cellsPerDimension;
76  }
77  VTKM_CONT vtkm::IdComponent GetCellsPerDimension() const { return this->CellsPerDimension; }
78 
80  {
81  this->NumberOfLevels = numberOfLevels;
82  }
83  VTKM_CONT vtkm::IdComponent GetNumberOfLevels() const { return this->NumberOfLevels; }
84 
86 
87 private:
88  template <vtkm::IdComponent Dim>
89  vtkm::cont::DataSet GenerateDataSet(unsigned int level, unsigned int amrIndex) const;
90 
91  vtkm::IdComponent Dimension = 2;
92  vtkm::IdComponent CellsPerDimension = 6;
93  vtkm::IdComponent NumberOfLevels = 4;
94 };
95 } //namespace source
96 } //namespace vtkm
97 
98 #endif //vtk_m_source_Amr_h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::IdComponent
vtkm::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:194
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::source::Amr::GetNumberOfLevels
vtkm::IdComponent GetNumberOfLevels() const
Definition: Amr.h:83
vtkm::source::Amr::SetDimension
void SetDimension(vtkm::IdComponent dimension)
Definition: Amr.h:70
vtkm::source::Amr
The Amr source creates a dataset similar to VTK's vtkRTAnalyticSource.
Definition: Amr.h:58
vtkm_source_export.h
vtkm::source::Amr::GetCellsPerDimension
vtkm::IdComponent GetCellsPerDimension() const
Definition: Amr.h:77
vtkm::source::Amr::SetNumberOfLevels
void SetNumberOfLevels(vtkm::IdComponent numberOfLevels)
Definition: Amr.h:79
VTKM_SOURCE_EXPORT
#define VTKM_SOURCE_EXPORT
Definition: vtkm_source_export.h:44
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::source::Amr::SetCellsPerDimension
void SetCellsPerDimension(vtkm::IdComponent cellsPerDimension)
Definition: Amr.h:73
PartitionedDataSet.h
VTKM_DEPRECATED
#define VTKM_DEPRECATED(...)
Definition: Deprecated.h:145
vtkm::cont::PartitionedDataSet
Comprises a set of vtkm::cont::DataSet objects.
Definition: PartitionedDataSet.h:26
vtkm::source::Amr::GetDimension
vtkm::IdComponent GetDimension() const
Definition: Amr.h:71