VTK  9.7.1
vtkOverlappingAMR.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
38 #ifndef vtkOverlappingAMR_h
39 #define vtkOverlappingAMR_h
40 
41 #include "vtkAMRBox.h" // For vtkAMRBox
42 #include "vtkCommonDataModelModule.h" // For export macro
43 #include "vtkDeprecation.h" // for VTK_DEPRECATED_IN_9_6_0
44 #include "vtkUniformGridAMR.h"
45 
46 VTK_ABI_NAMESPACE_BEGIN
47 class vtkAMRBox;
51 
52 class VTKCOMMONDATAMODEL_EXPORT vtkOverlappingAMR : public vtkUniformGridAMR
53 {
54 public:
55  static vtkOverlappingAMR* New();
56 
60  int GetDataObjectType() VTK_FUTURE_CONST override { return VTK_OVERLAPPING_AMR; }
62  void PrintSelf(ostream& os, vtkIndent indent) override;
63 
65 
68  void SetOrigin(const double origin[3]);
69  double* GetOrigin();
71 
73 
85  void SetSpacing(unsigned int level, const double spacing[3]);
86  void GetSpacing(unsigned int level, double spacing[3]);
88 
90 
94  void SetAMRBox(unsigned int level, unsigned int id, const vtkAMRBox& box);
95  const vtkAMRBox& GetAMRBox(unsigned int level, unsigned int id);
97 
102  void SetDataSet(unsigned int level, unsigned int idx, vtkDataSet* grid) override;
103 
104  using Superclass::GetBounds;
109  const double* GetBounds() override;
110 
115  void GetBounds(unsigned int level, unsigned int id, double bb[6]);
116 
120  void GetOrigin(unsigned int level, unsigned int id, double origin[3]);
121 
122  static vtkInformationIdTypeKey* NUMBER_OF_BLANKED_POINTS();
123 
128  {
129  // VTK_DEPRECATED_IN_9_6_0:
130  // We cannot use Superclass directly because this method is deprecated
131  // When removing deprecated code, please Remove this command and replace
132  // `vtkAMRDataObject` by `Superclass` in the line below.
134  }
136  {
137  // VTK_DEPRECATED_IN_9_6_0:
138  // We cannot use Superclass directly because this method is deprecated
139  // When removing deprecated code, please Remove this command and replace
140  // `vtkAMRDataObject` by `Superclass` in the line below.
142  }
143 
152  void SetRefinementRatio(unsigned int level, int refRatio);
153 
157  int GetRefinementRatio(unsigned int level);
158 
160 
165  void SetAMRBlockSourceIndex(unsigned int level, unsigned int id, int sourceId);
166  int GetAMRBlockSourceIndex(unsigned int level, unsigned int id);
168 
173  int GetRefinementRatio(vtkCompositeDataIterator* iter);
174 
178  bool HasChildrenInformation();
179 
184  void GenerateParentChildInformation();
185 
191  unsigned int* GetParents(unsigned int level, unsigned int index, unsigned int& numParents);
192 
198  unsigned int* GetChildren(unsigned int level, unsigned int index, unsigned int& numChildren);
199 
203  void PrintParentChildInfo(unsigned int level, unsigned int index);
204 
208  bool FindGrid(double q[3], unsigned int& level, unsigned int& gridId);
209 
213  VTK_DEPRECATED_IN_9_6_0("This function is deprecated, use CheckValidity")
214  void Audit();
215 
222  [[nodiscard]] bool CheckValidity();
223 
228  [[nodiscard]] vtkOverlappingAMRMetaData* GetOverlappingAMRMetaData();
229 
235  "This function is deprecated, use GetAMRMetaData() or GetOverlappingAMRMetaData()")
236  vtkOverlappingAMRMetaData* GetAMRInfo() override { return this->GetOverlappingAMRMetaData(); }
237  VTK_DEPRECATED_IN_9_6_0("This function is deprecated, use SetAMRMetaData()")
238  void SetAMRInfo(vtkOverlappingAMRMetaData* info) override;
239 
240 protected:
242  ~vtkOverlappingAMR() override;
243 
247  void InstantiateMetaData() override;
248 
249 private:
250  vtkOverlappingAMR(const vtkOverlappingAMR&) = delete;
251  void operator=(const vtkOverlappingAMR&) = delete;
252 };
253 
254 VTK_ABI_NAMESPACE_END
255 #endif
virtual void SetDataSet(unsigned int level, unsigned int idx, vtkDataSet *grid)
At the passed in level, set grid as the idx'th block at that level.
static vtkUniformGridAMR * New()
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
Encloses a rectangular region of voxel like cells.
Definition: vtkAMRBox.h:29
virtual const double * GetBounds()
Get the (min/max) bounds of the AMR domain.
superclass for composite data iterators
#define VTK_DEPRECATED_IN_9_6_0(reason)
a simple class to control print indentation
Definition: vtkIndent.h:28
static vtkOverlappingAMR * SafeDownCast(vtkObjectBase *o)
static vtkAMRDataObject * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
Meta data that describes the structure of an overlapping AMR data set.
int GetDataObjectType() VTK_FUTURE_CONST override
Return class name of data type (see vtkType.h for definitions).
static vtkOverlappingAMR * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a multi-resolution dataset based on vtkCartesianGrid allowing overlaps
Store zero or more vtkInformation instances.
Key for vtkIdType values in vtkInformation.
static vtkOverlappingAMR * GetData(vtkInformationVector *v, int i=0)
Legacy, empty shell inheriting vtkAMRDataObject.