VTK  9.3.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
22 #ifndef vtkOverlappingAMR_h
23 #define vtkOverlappingAMR_h
24 
25 #include "vtkCommonDataModelModule.h" // For export macro
26 #include "vtkUniformGridAMR.h"
27 
28 VTK_ABI_NAMESPACE_BEGIN
29 class vtkAMRBox;
31 class vtkUniformGrid;
32 class vtkAMRInformation;
34 
35 class VTKCOMMONDATAMODEL_EXPORT vtkOverlappingAMR : public vtkUniformGridAMR
36 {
37 public:
38  static vtkOverlappingAMR* New();
39 
43  int GetDataObjectType() override { return VTK_OVERLAPPING_AMR; }
44 
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
52 
54 
57  void SetOrigin(const double origin[3]);
58  double* GetOrigin();
60 
62 
65  void SetSpacing(unsigned int level, const double spacing[3]);
66  void GetSpacing(unsigned int level, double spacing[3]);
68 
70 
73  void SetAMRBox(unsigned int level, unsigned int id, const vtkAMRBox& box);
74  const vtkAMRBox& GetAMRBox(unsigned int level, unsigned int id);
76 
80  void GetBounds(unsigned int level, unsigned int id, double bb[6]);
81 
85  void GetOrigin(unsigned int level, unsigned int id, double origin[3]);
86 
87  static vtkInformationIdTypeKey* NUMBER_OF_BLANKED_POINTS();
88 
93  {
95  }
97  {
99  }
100 
109  void SetRefinementRatio(unsigned int level, int refRatio);
110 
114  int GetRefinementRatio(unsigned int level);
115 
117 
121  void SetAMRBlockSourceIndex(unsigned int level, unsigned int id, int sourceId);
122  int GetAMRBlockSourceIndex(unsigned int level, unsigned int id);
124 
128  int GetRefinementRatio(vtkCompositeDataIterator* iter);
129 
133  bool HasChildrenInformation();
134 
139  void GenerateParentChildInformation();
140 
146  unsigned int* GetParents(unsigned int level, unsigned int index, unsigned int& numParents);
147 
153  unsigned int* GetChildren(unsigned int level, unsigned int index, unsigned int& numChildren);
154 
158  void PrintParentChildInfo(unsigned int level, unsigned int index);
159 
160  // Unhide superclass method
161  void GetBounds(double b[6]) { Superclass::GetBounds(b); }
162 
166  bool FindGrid(double q[3], unsigned int& level, unsigned int& gridId);
167 
171  vtkAMRInformation* GetAMRInfo() override { return Superclass::GetAMRInfo(); }
172  void SetAMRInfo(vtkAMRInformation* info) override { return Superclass::SetAMRInfo(info); }
173 
175 
180  void Audit();
181 
182 protected:
184  ~vtkOverlappingAMR() override;
186 
187 private:
188  vtkOverlappingAMR(const vtkOverlappingAMR&) = delete;
189  void operator=(const vtkOverlappingAMR&) = delete;
190 };
191 
192 VTK_ABI_NAMESPACE_END
193 #endif
const double * GetBounds()
Get the (min/max) bounds of the AMR domain.
static vtkUniformGridAMR * New()
Store vtkAlgorithm input/output information.
Encloses a rectangular region of voxel like cells.
Definition: vtkAMRBox.h:28
void SetAMRInfo(vtkAMRInformation *info) override
Get/Set the meta AMR meta info.
superclass for composite data iterators
Meta data that describes the structure of an AMR data set.
a simple class to control print indentation
Definition: vtkIndent.h:28
static vtkOverlappingAMR * SafeDownCast(vtkObjectBase *o)
void GetBounds(double bounds[6])
Return the geometric bounding box in the form (xmin,xmax, ymin,ymax, zmin,zmax).
vtkAMRInformation * GetAMRInfo() override
Get/Set the internal representation of amr meta meta data.
vtkSmartPointer< vtkDataArray > GetData(const Ioss::GroupingEntity *entity, const std::string &fieldname, Ioss::Transform *transform=nullptr, Cache *cache=nullptr, const std::string &cachekey=std::string())
Returns a VTK array for a given field (fieldname) on the chosen block (or set) entity.
vtkCompositeDataIterator * NewIterator() override
Return a new iterator (the iterator has to be deleted by the user).
#define VTK_NEWINSTANCE
image data with blanking
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.
hierarchical dataset of vtkUniformGrids
Store zero or more vtkInformation instances.
#define VTK_OVERLAPPING_AMR
Definition: vtkType.h:96
int GetDataObjectType() override
Return class name of data type (see vtkType.h for definitions).
Key for vtkIdType values in vtkInformation.
static vtkOverlappingAMR * GetData(vtkInformationVector *v, int i=0)
a concrete implementation of vtkCompositeDataSet
void GetBounds(double b[6])