VTK  9.5.2
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
31
32#ifndef vtkOverlappingAMR_h
33#define vtkOverlappingAMR_h
34
35#include "vtkCommonDataModelModule.h" // For export macro
36#include "vtkUniformGridAMR.h"
37
38VTK_ABI_NAMESPACE_BEGIN
39class vtkAMRBox;
41class vtkUniformGrid;
44
45class VTKCOMMONDATAMODEL_EXPORT vtkOverlappingAMR : public vtkUniformGridAMR
46{
47public:
49
53 int GetDataObjectType() VTK_FUTURE_CONST override { return VTK_OVERLAPPING_AMR; }
54
56 void PrintSelf(ostream& os, vtkIndent indent) override;
57
62
64
67 void SetOrigin(const double origin[3]);
68 double* GetOrigin();
70
72
84 void SetSpacing(unsigned int level, const double spacing[3]);
85 void GetSpacing(unsigned int level, double spacing[3]);
87
89
92 void SetAMRBox(unsigned int level, unsigned int id, const vtkAMRBox& box);
93 const vtkAMRBox& GetAMRBox(unsigned int level, unsigned int id);
95
99 void GetBounds(unsigned int level, unsigned int id, double bb[6]);
100
104 void GetOrigin(unsigned int level, unsigned int id, double origin[3]);
105
107
119
128 void SetRefinementRatio(unsigned int level, int refRatio);
129
133 int GetRefinementRatio(unsigned int level);
134
136
140 void SetAMRBlockSourceIndex(unsigned int level, unsigned int id, int sourceId);
141 int GetAMRBlockSourceIndex(unsigned int level, unsigned int id);
143
148
153
159
165 unsigned int* GetParents(unsigned int level, unsigned int index, unsigned int& numParents);
166
172 unsigned int* GetChildren(unsigned int level, unsigned int index, unsigned int& numChildren);
173
177 void PrintParentChildInfo(unsigned int level, unsigned int index);
178
179 // Unhide superclass method
180 void GetBounds(double b[6]) { Superclass::GetBounds(b); }
181
185 bool FindGrid(double q[3], unsigned int& level, unsigned int& gridId);
186
192
194
199 void Audit();
200
201protected:
205
206private:
207 vtkOverlappingAMR(const vtkOverlappingAMR&) = delete;
208 void operator=(const vtkOverlappingAMR&) = delete;
209};
210
211VTK_ABI_NAMESPACE_END
212#endif
Encloses a rectangular region of voxel like cells.
Definition vtkAMRBox.h:29
Meta data that describes the structure of an AMR data set.
double * GetBounds()
Compute cell bounding box (xmin,xmax,ymin,ymax,zmin,zmax).
superclass for composite data iterators
a simple class to control print indentation
Definition vtkIndent.h:29
Key for vtkIdType values in vtkInformation.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
static vtkOverlappingAMR * New()
static vtkInformationIdTypeKey * NUMBER_OF_BLANKED_POINTS()
static vtkOverlappingAMR * GetData(vtkInformationVector *v, int i=0)
int GetRefinementRatio(unsigned int level)
Returns the refinement of a given level.
~vtkOverlappingAMR() override
Check whether the data set is internally consistent, e.g.
void SetAMRBox(unsigned int level, unsigned int id, const vtkAMRBox &box)
Set/Get the AMRBox for a given block.
static vtkOverlappingAMR * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
void SetAMRBlockSourceIndex(unsigned int level, unsigned int id, int sourceId)
Set/Get the source id of a block.
int GetRefinementRatio(vtkCompositeDataIterator *iter)
Returns the refinement ratio for the position pointed by the iterator.
vtkAMRInformation * GetAMRInfo() override
Get/Set the internal representation of amr meta meta data.
void GetBounds(double b[6])
const vtkAMRBox & GetAMRBox(unsigned int level, unsigned int id)
Set/Get the AMRBox for a given block.
bool HasChildrenInformation()
Return whether parent child information has been generated.
void GetBounds(unsigned int level, unsigned int id, double bb[6])
Returns the bounding information of a data set.
unsigned int * GetChildren(unsigned int level, unsigned int index, unsigned int &numChildren)
Return a pointer to Children of a block.
int GetDataObjectType() VTK_FUTURE_CONST override
Return class name of data type (see vtkType.h for definitions).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void GetSpacing(unsigned int level, double spacing[3])
Get/Set the grid spacing at a given level.
int GetAMRBlockSourceIndex(unsigned int level, unsigned int id)
Set/Get the source id of a block.
bool FindGrid(double q[3], unsigned int &level, unsigned int &gridId)
Given a point q, find the highest level grid that contains it.
void SetAMRInfo(vtkAMRInformation *info) override
Get/Set the meta AMR meta info.
void SetSpacing(unsigned int level, const double spacing[3])
Get/Set the grid spacing at a given level.
double * GetOrigin()
Get/Set the global origin of the amr data set.
void GetOrigin(unsigned int level, unsigned int id, double origin[3])
Returns the origin of an AMR block.
void SetRefinementRatio(unsigned int level, int refRatio)
Sets the refinement of a given level.
void Audit()
Check whether the data set is internally consistent, e.g.
vtkCompositeDataIterator * NewIterator() override
Return a new iterator (the iterator has to be deleted by the user).
void SetOrigin(const double origin[3])
Get/Set the global origin of the amr data set.
static vtkOverlappingAMR * SafeDownCast(vtkObjectBase *o)
void PrintParentChildInfo(unsigned int level, unsigned int index)
Prints the parents and children of a requested block (Debug Routine).
void GenerateParentChildInformation()
Generate the parent/child relationships - needed to be called before GetParents or GetChildren can be...
vtkOverlappingAMR()
Check whether the data set is internally consistent, e.g.
unsigned int * GetParents(unsigned int level, unsigned int index, unsigned int &numParents)
Return a pointer to Parents of a block.
static vtkUniformGridAMR * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
virtual void SetAMRInfo(vtkAMRInformation *)
Get/Set the meta AMR meta info.
virtual vtkAMRInformation * GetAMRInfo()
Get/Set the meta AMR meta info.
image data with blanking
@ VTK_OVERLAPPING_AMR
Definition vtkType.h:111
#define VTK_NEWINSTANCE