VTK  9.0.1
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 =========================================================================*/
28 #ifndef vtkOverlappingAMR_h
29 #define vtkOverlappingAMR_h
30 
31 #include "vtkCommonDataModelModule.h" // For export macro
32 #include "vtkUniformGridAMR.h"
33 
34 class vtkAMRBox;
36 class vtkUniformGrid;
37 class vtkAMRInformation;
39 
40 class VTKCOMMONDATAMODEL_EXPORT vtkOverlappingAMR : public vtkUniformGridAMR
41 {
42 public:
43  static vtkOverlappingAMR* New();
44 
48  int GetDataObjectType() override { return VTK_OVERLAPPING_AMR; }
49 
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
57 
59 
62  void SetOrigin(const double origin[3]);
63  double* GetOrigin();
65 
67 
70  void SetSpacing(unsigned int level, const double spacing[3]);
71  void GetSpacing(unsigned int level, double spacing[3]);
73 
75 
78  void SetAMRBox(unsigned int level, unsigned int id, const vtkAMRBox& box);
79  const vtkAMRBox& GetAMRBox(unsigned int level, unsigned int id);
81 
85  void GetBounds(unsigned int level, unsigned int id, double bb[6]);
86 
90  void GetOrigin(unsigned int level, unsigned int id, double origin[3]);
91 
92  static vtkInformationIdTypeKey* NUMBER_OF_BLANKED_POINTS();
93 
98  {
99  return vtkOverlappingAMR::SafeDownCast(Superclass::GetData(info));
100  }
102  {
103  return vtkOverlappingAMR::SafeDownCast(Superclass::GetData(v, i));
104  }
105 
114  void SetRefinementRatio(unsigned int level, int refRatio);
115 
119  int GetRefinementRatio(unsigned int level);
120 
122 
126  void SetAMRBlockSourceIndex(unsigned int level, unsigned int id, int sourceId);
127  int GetAMRBlockSourceIndex(unsigned int level, unsigned int id);
129 
133  int GetRefinementRatio(vtkCompositeDataIterator* iter);
134 
138  bool HasChildrenInformation();
139 
144  void GenerateParentChildInformation();
145 
151  unsigned int* GetParents(unsigned int level, unsigned int index, unsigned int& numParents);
152 
158  unsigned int* GetChildren(unsigned int level, unsigned int index, unsigned int& numChildren);
159 
163  void PrintParentChildInfo(unsigned int level, unsigned int index);
164 
165  // Unhide superclass method
166  void GetBounds(double b[6]) { Superclass::GetBounds(b); }
167 
171  bool FindGrid(double q[3], unsigned int& level, unsigned int& gridId);
172 
176  vtkAMRInformation* GetAMRInfo() override { return Superclass::GetAMRInfo(); }
177  void SetAMRInfo(vtkAMRInformation* info) override { return Superclass::SetAMRInfo(info); }
178 
180 
185  void Audit();
186 
187 protected:
189  ~vtkOverlappingAMR() override;
191 
192 private:
193  vtkOverlappingAMR(const vtkOverlappingAMR&) = delete;
194  void operator=(const vtkOverlappingAMR&) = delete;
195 };
196 
197 #endif
vtkAMRBox
Encloses a rectangular region of voxel like cells.
Definition: vtkAMRBox.h:33
vtkInformationIdTypeKey
Key for vtkIdType values in vtkInformation.
Definition: vtkInformationIdTypeKey.h:31
vtkCompositeDataSet::GetBounds
void GetBounds(double bounds[6])
Return the geometric bounding box in the form (xmin,xmax, ymin,ymax, zmin,zmax).
vtkUniformGridAMR::New
static vtkUniformGridAMR * New()
vtkAMRInformation
Meta data that describes the structure of an AMR data set.
Definition: vtkAMRInformation.h:47
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkUniformGrid
image data with blanking
Definition: vtkUniformGrid.h:34
vtkUniformGridAMR.h
vtkOverlappingAMR::SetAMRInfo
void SetAMRInfo(vtkAMRInformation *info) override
Definition: vtkOverlappingAMR.h:177
vtkX3D::level
@ level
Definition: vtkX3D.h:401
vtkOverlappingAMR::SafeDownCast
static vtkOverlappingAMR * SafeDownCast(vtkObjectBase *o)
vtkCompositeDataIterator
superclass for composite data iterators
Definition: vtkCompositeDataIterator.h:35
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkOverlappingAMR::GetAMRInfo
vtkAMRInformation * GetAMRInfo() override
Get/Set the internal representation of amr meta meta data.
Definition: vtkOverlappingAMR.h:176
vtkUniformGridAMR::NewIterator
vtkCompositeDataIterator * NewIterator() override
Return a new iterator (the iterator has to be deleted by user).
vtkOverlappingAMR::GetData
static vtkOverlappingAMR * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
Definition: vtkOverlappingAMR.h:97
vtkOverlappingAMR::GetDataObjectType
int GetDataObjectType() override
Return class name of data type (see vtkType.h for definitions).
Definition: vtkOverlappingAMR.h:48
vtkUniformGridAMR::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOverlappingAMR
hierarchical dataset of vtkUniformGrids
Definition: vtkOverlappingAMR.h:40
vtkX3D::spacing
@ spacing
Definition: vtkX3D.h:487
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
@ info
Definition: vtkX3D.h:382
VTK_OVERLAPPING_AMR
#define VTK_OVERLAPPING_AMR
Definition: vtkType.h:116
vtkOverlappingAMR::GetBounds
void GetBounds(double b[6])
Definition: vtkOverlappingAMR.h:166
vtkUniformGridAMR
Definition: vtkUniformGridAMR.h:32
VTK_NEWINSTANCE
#define VTK_NEWINSTANCE
Definition: vtkWrappingHints.h:42
vtkOverlappingAMR::GetData
static vtkOverlappingAMR * GetData(vtkInformationVector *v, int i=0)
Definition: vtkOverlappingAMR.h:101
vtkX3D::index
@ index
Definition: vtkX3D.h:252
vtkUniformGridAMR::GetBounds
const double * GetBounds()