VTK-m  2.0
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 
15 #include <vtkm/source/vtkm_source_export.h>
16 
17 namespace vtkm
18 {
19 namespace source
20 {
58 class VTKM_SOURCE_EXPORT Amr
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
Represents a component ID (index of component in a vector).
Definition: Types.h:168
vtkm::cont::DataSet
Definition: DataSet.h:34
vtkm::source::Amr::SetNumberOfLevels
VTKM_CONT void SetNumberOfLevels(vtkm::IdComponent numberOfLevels)
Definition: Amr.h:79
vtkm::source::Amr
The Amr source creates a dataset similar to VTK's vtkRTAnalyticSource.
Definition: Amr.h:58
vtkm::source::Amr::SetDimension
VTKM_CONT void SetDimension(vtkm::IdComponent dimension)
Definition: Amr.h:70
vtkm::source::Amr::GetCellsPerDimension
VTKM_CONT vtkm::IdComponent GetCellsPerDimension() const
Definition: Amr.h:77
vtkm::source::Amr::GetDimension
VTKM_CONT vtkm::IdComponent GetDimension() const
Definition: Amr.h:71
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::source::Amr::SetCellsPerDimension
VTKM_CONT void SetCellsPerDimension(vtkm::IdComponent cellsPerDimension)
Definition: Amr.h:73
vtkm::source::Amr::~Amr
VTKM_CONT VTKM_DEPRECATED(2.0, "Use Set* methods to set parameters.") Amr(vtkm VTKM_CON ~Amr)()=default
Definition: Amr.h:68
PartitionedDataSet.h
vtkm::source::Amr::GetNumberOfLevels
VTKM_CONT vtkm::IdComponent GetNumberOfLevels() const
Definition: Amr.h:83
VTKM_DEPRECATED
#define VTKM_DEPRECATED(...)
Definition: Deprecated.h:145
vtkm::cont::PartitionedDataSet
Definition: PartitionedDataSet.h:25