VTK  9.2.6
vtkOverlappingAMR.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOverlappingAMR.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
34 #ifndef vtkOverlappingAMR_h
35 #define vtkOverlappingAMR_h
36 
37 #include "vtkCommonDataModelModule.h" // For export macro
38 #include "vtkUniformGridAMR.h"
39 
40 class vtkAMRBox;
42 class vtkUniformGrid;
43 class vtkAMRInformation;
45 
46 class VTKCOMMONDATAMODEL_EXPORT vtkOverlappingAMR : public vtkUniformGridAMR
47 {
48 public:
49  static vtkOverlappingAMR* New();
50 
54  int GetDataObjectType() override { return VTK_OVERLAPPING_AMR; }
55 
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
63 
65 
68  void SetOrigin(const double origin[3]);
69  double* GetOrigin();
71 
73 
76  void SetSpacing(unsigned int level, const double spacing[3]);
77  void GetSpacing(unsigned int level, double spacing[3]);
79 
81 
84  void SetAMRBox(unsigned int level, unsigned int id, const vtkAMRBox& box);
85  const vtkAMRBox& GetAMRBox(unsigned int level, unsigned int id);
87 
91  void GetBounds(unsigned int level, unsigned int id, double bb[6]);
92 
96  void GetOrigin(unsigned int level, unsigned int id, double origin[3]);
97 
98  static vtkInformationIdTypeKey* NUMBER_OF_BLANKED_POINTS();
99 
104  {
106  }
108  {
110  }
111 
120  void SetRefinementRatio(unsigned int level, int refRatio);
121 
125  int GetRefinementRatio(unsigned int level);
126 
128 
132  void SetAMRBlockSourceIndex(unsigned int level, unsigned int id, int sourceId);
133  int GetAMRBlockSourceIndex(unsigned int level, unsigned int id);
135 
139  int GetRefinementRatio(vtkCompositeDataIterator* iter);
140 
144  bool HasChildrenInformation();
145 
150  void GenerateParentChildInformation();
151 
157  unsigned int* GetParents(unsigned int level, unsigned int index, unsigned int& numParents);
158 
164  unsigned int* GetChildren(unsigned int level, unsigned int index, unsigned int& numChildren);
165 
169  void PrintParentChildInfo(unsigned int level, unsigned int index);
170 
171  // Unhide superclass method
172  void GetBounds(double b[6]) { Superclass::GetBounds(b); }
173 
177  bool FindGrid(double q[3], unsigned int& level, unsigned int& gridId);
178 
182  vtkAMRInformation* GetAMRInfo() override { return Superclass::GetAMRInfo(); }
183  void SetAMRInfo(vtkAMRInformation* info) override { return Superclass::SetAMRInfo(info); }
184 
186 
191  void Audit();
192 
193 protected:
195  ~vtkOverlappingAMR() override;
197 
198 private:
199  vtkOverlappingAMR(const vtkOverlappingAMR&) = delete;
200  void operator=(const vtkOverlappingAMR&) = delete;
201 };
202 
203 #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:39
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:39
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:108
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])