VTK  9.1.0
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 =========================================================================*/
67 #ifndef vtkOverlappingAMR_h
68 #define vtkOverlappingAMR_h
69 
70 #include "vtkCommonDataModelModule.h" // For export macro
71 #include "vtkUniformGridAMR.h"
72 
73 class vtkAMRBox;
75 class vtkUniformGrid;
76 class vtkAMRInformation;
78 
79 class VTKCOMMONDATAMODEL_EXPORT vtkOverlappingAMR : public vtkUniformGridAMR
80 {
81 public:
83 
87  int GetDataObjectType() override { return VTK_OVERLAPPING_AMR; }
88 
90  void PrintSelf(ostream& os, vtkIndent indent) override;
91 
96 
98 
101  void SetOrigin(const double origin[3]);
102  double* GetOrigin();
104 
106 
109  void SetSpacing(unsigned int level, const double spacing[3]);
110  void GetSpacing(unsigned int level, double spacing[3]);
112 
114 
117  void SetAMRBox(unsigned int level, unsigned int id, const vtkAMRBox& box);
118  const vtkAMRBox& GetAMRBox(unsigned int level, unsigned int id);
120 
124  void GetBounds(unsigned int level, unsigned int id, double bb[6]);
125 
129  void GetOrigin(unsigned int level, unsigned int id, double origin[3]);
130 
132 
137  {
139  }
141  {
143  }
144 
153  void SetRefinementRatio(unsigned int level, int refRatio);
154 
158  int GetRefinementRatio(unsigned int level);
159 
161 
165  void SetAMRBlockSourceIndex(unsigned int level, unsigned int id, int sourceId);
166  int GetAMRBlockSourceIndex(unsigned int level, unsigned int id);
168 
173 
178 
184 
190  unsigned int* GetParents(unsigned int level, unsigned int index, unsigned int& numParents);
191 
197  unsigned int* GetChildren(unsigned int level, unsigned int index, unsigned int& numChildren);
198 
202  void PrintParentChildInfo(unsigned int level, unsigned int index);
203 
204  // Unhide superclass method
205  void GetBounds(double b[6]) { Superclass::GetBounds(b); }
206 
210  bool FindGrid(double q[3], unsigned int& level, unsigned int& gridId);
211 
215  vtkAMRInformation* GetAMRInfo() override { return Superclass::GetAMRInfo(); }
216  void SetAMRInfo(vtkAMRInformation* info) override { return Superclass::SetAMRInfo(info); }
217 
219 
224  void Audit();
225 
226 protected:
228  ~vtkOverlappingAMR() override;
230 
231 private:
232  vtkOverlappingAMR(const vtkOverlappingAMR&) = delete;
233  void operator=(const vtkOverlappingAMR&) = delete;
234 };
235 
236 #endif
vtkAMRBox
Encloses a rectangular region of voxel like cells.
Definition: vtkAMRBox.h:73
vtkInformationIdTypeKey
Key for vtkIdType values in vtkInformation.
Definition: vtkInformationIdTypeKey.h:32
vtkOverlappingAMR::GetParents
unsigned int * GetParents(unsigned int level, unsigned int index, unsigned int &numParents)
Return a pointer to Parents of a block.
vtkOverlappingAMR::NewIterator
vtkCompositeDataIterator * NewIterator() override
Return a new iterator (the iterator has to be deleted by the user).
vtkCompositeDataSet::GetBounds
void GetBounds(double bounds[6])
Return the geometric bounding box in the form (xmin,xmax, ymin,ymax, zmin,zmax).
vtkOverlappingAMR::NUMBER_OF_BLANKED_POINTS
static vtkInformationIdTypeKey * NUMBER_OF_BLANKED_POINTS()
vtkOverlappingAMR::GenerateParentChildInformation
void GenerateParentChildInformation()
Generate the parent/child relationships - needed to be called before GetParents or GetChildren can be...
vtkOverlappingAMR::GetRefinementRatio
int GetRefinementRatio(unsigned int level)
Returns the refinement of a given level.
vtkOverlappingAMR::FindGrid
bool FindGrid(double q[3], unsigned int &level, unsigned int &gridId)
Given a point q, find the highest level grid that contains it.
vtkAMRInformation
Meta data that describes the structure of an AMR data set.
Definition: vtkAMRInformation.h:48
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkOverlappingAMR::Audit
void Audit()
Check whether the data set is internally consistent, e.g.
vtkUniformGrid
image data with blanking
Definition: vtkUniformGrid.h:74
vtkUniformGridAMR.h
vtkOverlappingAMR::GetBounds
void GetBounds(unsigned int level, unsigned int id, double bb[6])
Returns the bounding information of a data set.
vtkOverlappingAMR::SetAMRInfo
void SetAMRInfo(vtkAMRInformation *info) override
Definition: vtkOverlappingAMR.h:216
vtkOverlappingAMR::SetAMRBlockSourceIndex
void SetAMRBlockSourceIndex(unsigned int level, unsigned int id, int sourceId)
Set/Get the source id of a block.
vtkOverlappingAMR::GetOrigin
void GetOrigin(unsigned int level, unsigned int id, double origin[3])
Returns the origin of an AMR block.
vtkX3D::level
@ level
Definition: vtkX3D.h:401
vtkOverlappingAMR::SafeDownCast
static vtkOverlappingAMR * SafeDownCast(vtkObjectBase *o)
vtkOverlappingAMR::GetAMRBlockSourceIndex
int GetAMRBlockSourceIndex(unsigned int level, unsigned int id)
Set/Get the source id of a block.
vtkCompositeDataIterator
superclass for composite data iterators
Definition: vtkCompositeDataIterator.h:36
vtkOverlappingAMR::GetAMRBox
const vtkAMRBox & GetAMRBox(unsigned int level, unsigned int id)
Set/Get the AMRBox for a given block.
vtkOverlappingAMR::GetOrigin
double * GetOrigin()
Get/Set the global origin of the amr data set.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkOverlappingAMR::GetAMRInfo
vtkAMRInformation * GetAMRInfo() override
Get/Set the internal representation of amr meta meta data.
Definition: vtkOverlappingAMR.h:215
vtkOverlappingAMR::GetChildren
unsigned int * GetChildren(unsigned int level, unsigned int index, unsigned int &numChildren)
Return a pointer to Children of a block.
vtkOverlappingAMR::SetAMRBox
void SetAMRBox(unsigned int level, unsigned int id, const vtkAMRBox &box)
Set/Get the AMRBox for a given block.
vtkOverlappingAMR::New
static vtkOverlappingAMR * New()
vtkOverlappingAMR::GetData
static vtkOverlappingAMR * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
Definition: vtkOverlappingAMR.h:136
vtkOverlappingAMR::GetDataObjectType
int GetDataObjectType() override
Return class name of data type (see vtkType.h for definitions).
Definition: vtkOverlappingAMR.h:87
vtkOverlappingAMR
hierarchical dataset of vtkUniformGrids
Definition: vtkOverlappingAMR.h:80
vtkX3D::spacing
@ spacing
Definition: vtkX3D.h:487
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkOverlappingAMR::PrintParentChildInfo
void PrintParentChildInfo(unsigned int level, unsigned int index)
Prints the parents and children of a requested block (Debug Routine)
vtkOverlappingAMR::SetOrigin
void SetOrigin(const double origin[3])
Get/Set the global origin of the amr data set.
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkOverlappingAMR::~vtkOverlappingAMR
~vtkOverlappingAMR() override
Check whether the data set is internally consistent, e.g.
VTK_OVERLAPPING_AMR
#define VTK_OVERLAPPING_AMR
Definition: vtkType.h:108
vtkOverlappingAMR::SetSpacing
void SetSpacing(unsigned int level, const double spacing[3])
Get/Set the grid spacing at a given level.
vtkOverlappingAMR::GetBounds
void GetBounds(double b[6])
Definition: vtkOverlappingAMR.h:205
vtkOverlappingAMR::HasChildrenInformation
bool HasChildrenInformation()
Return whether parent child information has been generated.
vtkOverlappingAMR::GetSpacing
void GetSpacing(unsigned int level, double spacing[3])
Get/Set the grid spacing at a given level.
vtkUniformGridAMR
Definition: vtkUniformGridAMR.h:33
VTK_NEWINSTANCE
#define VTK_NEWINSTANCE
Definition: vtkWrappingHints.h:44
vtkOverlappingAMR::GetRefinementRatio
int GetRefinementRatio(vtkCompositeDataIterator *iter)
Returns the refinement ratio for the position pointed by the iterator.
vtkOverlappingAMR::vtkOverlappingAMR
vtkOverlappingAMR()
Check whether the data set is internally consistent, e.g.
vtkIOSSUtilities::GetData
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.
vtkOverlappingAMR::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOverlappingAMR::GetData
static vtkOverlappingAMR * GetData(vtkInformationVector *v, int i=0)
Definition: vtkOverlappingAMR.h:140
vtkX3D::index
@ index
Definition: vtkX3D.h:252
vtkOverlappingAMR::SetRefinementRatio
void SetRefinementRatio(unsigned int level, int refRatio)
Sets the refinement of a given level.