VTK: vtkAMRInformation Class Reference

| VTK 9.3.1

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkAMRInformation Class Reference

Meta data that describes the structure of an AMR data set. More...

`#include <vtkAMRInformation.h>`

Inheritance diagram for vtkAMRInformation:
[legend]
Collaboration diagram for vtkAMRInformation:
[legend]

## Public Types
typedef vtkObject | Superclass

## Public Member Functions
virtual vtkTypeBool | IsA (const char *type)
| Return 1 if this class is the same type of (or a subclass of) the named class. More...
vtkAMRInformation * | NewInstance () const
void | PrintSelf (ostream &os, vtkIndent indent) override
| Methods invoked by print to print information about the object including superclasses. More...
bool | operator== (const vtkAMRInformation &other)
void | Initialize (int numLevels, const int *blocksPerLevel)
| Initialize the meta information numLevels is the number of levels blocksPerLevel[i] is the number of blocks at level i. More...
unsigned int | GetNumberOfLevels () const
| Return the number of levels. More...
unsigned int | GetNumberOfDataSets (unsigned int level) const
| Returns the number of datasets at the given levelx. More...
unsigned int | GetTotalNumberOfBlocks ()
| Returns total number of datasets. More...
int | GetIndex (unsigned int level, unsigned int id) const
| Returns the single index from a pair of indices. More...
void | ComputeIndexPair (unsigned int index, unsigned int &level, unsigned int &id)
| Returns the an index pair given a single index. More...
const double * | GetBounds ()
| Returns the bounds of the entire domain. More...
void | GetBounds (unsigned int level, unsigned int id, double *bb)
| Returns the bounding box of a given box. More...
bool | GetOrigin (unsigned int level, unsigned int id, double *origin)
| Returns the origin of the grid at (level,id) More...
void | GetSpacing (unsigned int level, double spacing[3])
| Return the spacing at the given fiven. More...
bool | HasSpacing (unsigned int level)
bool | GetCoarsenedAMRBox (unsigned int level, unsigned int id, vtkAMRBox &box) const
| return the amr box coarsened to the previous level More...
void | GenerateRefinementRatio ()
| This method computes the refinement ratio at each level. More...
bool | HasRefinementRatio ()
| Returns whether refinement ratio has been set (either by calling GenerateRefinementRatio() or by calling SetRefinementRatio() More...
void | SetRefinementRatio (unsigned int level, int ratio)
| Set the refinement ratio at a level. More...
int | GetRefinementRatio (unsigned int level) const
| Returns the refinement of a given level. More...
void | SetSpacing (unsigned int level, const double *h)
| Set the spacing at a given level. More...
bool | HasChildrenInformation ()
| Return whether parent child information has been generated. More...
unsigned int * | GetParents (unsigned int level, unsigned int index, unsigned int &numParents)
| Return a pointer to Parents of a block. More...
unsigned int * | GetChildren (unsigned int level, unsigned int index, unsigned int &numChildren)
| Return a pointer to Children of a block. More...
void | PrintParentChildInfo (unsigned int level, unsigned int index)
| Prints the parents and children of a requested block (Debug Routine) More...
void | GenerateParentChildInformation ()
| Generate the parent/child relationships - needed to be called before GetParents or GetChildren can be used! More...
bool | Audit ()
| Checks whether the meta data is internally consistent. More...
bool | FindCell (double q[3], unsigned int level, unsigned int index, int &cellIdx)
| Given a point q, find whether q is bounded by the data set at (level,index). More...
bool | FindGrid (double q[3], int level, unsigned int &gridId)
| find the grid that contains the point q at the specified level More...
bool | FindGrid (double q[3], unsigned int &level, unsigned int &gridId)
| Given a point q, find the highest level grid that contains it. More...
const std::vector< int > & | GetNumBlocks () const
| Returns internal arrays. More...
std::vector< std::vector< unsigned int > > & | GetChildrenAtLevel (unsigned int i)
void | DeepCopy (vtkAMRInformation *other)
virtual int | GetGridDescription ()
| returns the value of vtkUniformGrid::GridDescription() of any block More...
void | SetGridDescription (int description)
| returns the value of vtkUniformGrid::GridDescription() of any block More...
void | GetOrigin (double origin[3])
| Get the AMR dataset origin The origin is essentially the minimum of all the grids. More...
double * | GetOrigin ()
| Get the AMR dataset origin The origin is essentially the minimum of all the grids. More...
void | SetOrigin (const double *origin)
| Get the AMR dataset origin The origin is essentially the minimum of all the grids. More...
void | SetAMRBox (unsigned int level, unsigned int id, const vtkAMRBox &box)
| Methods to set and get the AMR box at a given position. More...
const vtkAMRBox & | GetAMRBox (unsigned int level, unsigned int id) const
| Methods to set and get the AMR box at a given position. More...
int | GetAMRBlockSourceIndex (int index)
| Get/Set the SourceIndex of a block. More...
void | SetAMRBlockSourceIndex (int index, int sourceId)
| Get/Set the SourceIndex of a block. More...
Public Member Functions inherited from vtkObject
| vtkBaseTypeMacro (vtkObject, vtkObjectBase)
virtual void | DebugOn ()
| Turn debugging output on. More...
virtual void | DebugOff ()
| Turn debugging output off. More...
bool | GetDebug ()
| Get the value of the debug flag. More...
void | SetDebug (bool debugFlag)
| Set the value of the debug flag. More...
virtual void | Modified ()
| Update the modification time for this object. More...
virtual vtkMTimeType | GetMTime ()
| Return this object's modified time. More...
void | RemoveObserver (unsigned long tag)
void | RemoveObservers (unsigned long event)
void | RemoveObservers (const char *event)
void | RemoveAllObservers ()
vtkTypeBool | HasObserver (unsigned long event)
vtkTypeBool | HasObserver (const char *event)
vtkTypeBool | InvokeEvent (unsigned long event)
vtkTypeBool | InvokeEvent (const char *event)
std::string | GetObjectDescription () const override
| The object description printed in messages and PrintSelf output. More...
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f)
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
vtkCommand * | GetCommand (unsigned long tag)
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
void | RemoveObserver (vtkCommand *)
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
void | RemoveObservers (unsigned long event, vtkCommand *)
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
void | RemoveObservers (const char *event, vtkCommand *)
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
vtkTypeBool | HasObserver (unsigned long event, vtkCommand *)
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
vtkTypeBool | HasObserver (const char *event, vtkCommand *)
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
template<class U , class T >
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
| Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
template<class U , class T >
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
| Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
template<class U , class T >
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
| Allow user to set the AbortFlagOn() with the return value of the callback method. More...
vtkTypeBool | InvokeEvent (unsigned long event, void *callData)
| This method invokes an event and return whether the event was aborted or not. More...
vtkTypeBool | InvokeEvent (const char *event, void *callData)
| This method invokes an event and return whether the event was aborted or not. More...
virtual void | SetObjectName (const std::string &objectName)
| Set/get the name of this object for reporting purposes. More...
virtual std::string | GetObjectName () const
| Set/get the name of this object for reporting purposes. More...
Public Member Functions inherited from vtkObjectBase
const char * | GetClassName () const
| Return the class name as a string. More...
virtual vtkIdType | GetNumberOfGenerationsFromBase (const char *name)
| Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More...
virtual void | Delete ()
| Delete a VTK object. More...
virtual void | FastDelete ()
| Delete a reference to this object. More...
void | InitializeObjectBase ()
void | Print (ostream &os)
| Print an object to an ostream. More...
virtual void | Register (vtkObjectBase *o)
| Increase the reference count (mark as used by another object). More...
virtual void | UnRegister (vtkObjectBase *o)
| Decrease the reference count (release by another object). More...
int | GetReferenceCount ()
| Return the current reference count of this object. More...
void | SetReferenceCount (int)
| Sets the reference count. More...
bool | GetIsInMemkind () const
| A local state flag that remembers whether this object lives in the normal or extended memory space. More...
virtual void | PrintHeader (ostream &os, vtkIndent indent)
| Methods invoked by print to print information about the object including superclasses. More...
virtual void | PrintTrailer (ostream &os, vtkIndent indent)
| Methods invoked by print to print information about the object including superclasses. More...
virtual bool | UsesGarbageCollector () const
| Indicate whether the class uses `vtkGarbageCollector` or not. More...

## Static Public Member Functions
static vtkAMRInformation * | New ()
static vtkTypeBool | IsTypeOf (const char *type)
static vtkAMRInformation * | SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkObject
static vtkObject * | New ()
| Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
static void | BreakOnError ()
| This method is called when vtkErrorMacro executes. More...
static void | SetGlobalWarningDisplay (vtkTypeBool val)
| This is a global flag that controls whether any debug, warning or error messages are displayed. More...
static void | GlobalWarningDisplayOn ()
| This is a global flag that controls whether any debug, warning or error messages are displayed. More...
static void | GlobalWarningDisplayOff ()
| This is a global flag that controls whether any debug, warning or error messages are displayed. More...
static vtkTypeBool | GetGlobalWarningDisplay ()
| This is a global flag that controls whether any debug, warning or error messages are displayed. More...
Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool | IsTypeOf (const char *name)
| Return 1 if this class type is the same type of (or a subclass of) the named class. More...
static vtkIdType | GetNumberOfGenerationsFromBaseType (const char *name)
| Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More...
static vtkObjectBase * | New ()
| Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
static void | SetMemkindDirectory (const char *directoryname)
| The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. More...
static bool | GetUsingMemkind ()
| A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space. More...

## Protected Member Functions
virtual vtkObjectBase * | NewInstanceInternal () const
Protected Member Functions inherited from vtkObject
| vtkObject ()
| ~vtkObject () override
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
| These methods allow a command to exclusively grab all events. More...
void | InternalReleaseFocus ()
| These methods allow a command to exclusively grab all events. More...
Protected Member Functions inherited from vtkObjectBase
| vtkObjectBase ()
virtual | ~vtkObjectBase ()
virtual void | ReportReferences (vtkGarbageCollector *)
| vtkObjectBase (const vtkObjectBase &)
void | operator= (const vtkObjectBase &)

## Additional Inherited Members
Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction | GetCurrentMallocFunction ()
static vtkReallocingFunction | GetCurrentReallocFunction ()
static vtkFreeingFunction | GetCurrentFreeFunction ()
static vtkFreeingFunction | GetAlternateFreeFunction ()
Protected Attributes inherited from vtkObject
bool | Debug
vtkTimeStamp | MTime
vtkSubjectHelper * | SubjectHelper
std::string | ObjectName
Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > | ReferenceCount
vtkWeakPointerBase ** | WeakPointers

## Detailed Description

Meta data that describes the structure of an AMR data set.

vtkAMRInformation encapsulates the following meta information for an AMR data set

- a list of vtkAMRBox objects
- Refinement ratio between AMR levels
- Grid spacing for each level
- The file block index for each block
- parent child information, if requested

See also
  vtkOverlappingAMR, vtkAMRBox

Definition at line 36 of file vtkAMRInformation.h.

## Member Typedef Documentation

## ◆ Superclass

typedef vtkObject vtkAMRInformation::Superclass

Definition at line 40 of file vtkAMRInformation.h.

## Member Function Documentation

## ◆ New()

static vtkAMRInformation* vtkAMRInformation::New | ( |  | ) |
| static

## ◆ IsTypeOf()

static vtkTypeBool vtkAMRInformation::IsTypeOf | ( | const char * | type | ) |
| static

## ◆ IsA()

virtual vtkTypeBool vtkAMRInformation::IsA | ( | const char * | name | ) |
| virtual

Return 1 if this class is the same type of (or a subclass of) the named class.

Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObjectBase.

## ◆ SafeDownCast()

static vtkAMRInformation* vtkAMRInformation::SafeDownCast | ( | vtkObjectBase * | o | ) |
| static

## ◆ NewInstanceInternal()

virtual vtkObjectBase* vtkAMRInformation::NewInstanceInternal | ( |  | ) | const
| protectedvirtual

## ◆ NewInstance()

vtkAMRInformation* vtkAMRInformation::NewInstance | ( |  | ) | const

## ◆ PrintSelf()

void vtkAMRInformation::PrintSelf | ( | ostream & | os,
|  | vtkIndent | indent
| ) |  |
| overridevirtual

Methods invoked by print to print information about the object including superclasses.

Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

## ◆ operator==()

bool vtkAMRInformation::operator== | ( | const vtkAMRInformation & | other | ) |

## ◆ Initialize()

void vtkAMRInformation::Initialize | ( | int | numLevels,
|  | const int * | blocksPerLevel
| ) |  |

Initialize the meta information numLevels is the number of levels blocksPerLevel[i] is the number of blocks at level i.

## ◆ GetGridDescription()

virtual int vtkAMRInformation::GetGridDescription | ( |  | ) |
| virtual

returns the value of vtkUniformGrid::GridDescription() of any block

## ◆ SetGridDescription()

void vtkAMRInformation::SetGridDescription | ( | int | description | ) |

returns the value of vtkUniformGrid::GridDescription() of any block

## ◆ GetOrigin() [1/3]

void vtkAMRInformation::GetOrigin | ( | double | origin[3] | ) |

Get the AMR dataset origin The origin is essentially the minimum of all the grids.

## ◆ GetOrigin() [2/3]

double* vtkAMRInformation::GetOrigin | ( |  | ) |

Get the AMR dataset origin The origin is essentially the minimum of all the grids.

## ◆ SetOrigin()

void vtkAMRInformation::SetOrigin | ( | const double * | origin | ) |

Get the AMR dataset origin The origin is essentially the minimum of all the grids.

## ◆ GetNumberOfLevels()

unsigned int vtkAMRInformation::GetNumberOfLevels | ( |  | ) | const
| inline

Return the number of levels.

Definition at line 74 of file vtkAMRInformation.h.

## ◆ GetNumberOfDataSets()

unsigned int vtkAMRInformation::GetNumberOfDataSets | ( | unsigned int | level | ) | const

Returns the number of datasets at the given levelx.

## ◆ GetTotalNumberOfBlocks()

unsigned int vtkAMRInformation::GetTotalNumberOfBlocks | ( |  | ) |
| inline

Returns total number of datasets.

Definition at line 87 of file vtkAMRInformation.h.

## ◆ GetIndex()

int vtkAMRInformation::GetIndex | ( | unsigned int | level,
|  | unsigned int | id
| ) |  | const
| inline

Returns the single index from a pair of indices.

Definition at line 92 of file vtkAMRInformation.h.

## ◆ ComputeIndexPair()

void vtkAMRInformation::ComputeIndexPair | ( | unsigned int | index,
|  | unsigned int & | level,
|  | unsigned int & | id
| ) |  |

Returns the an index pair given a single index.

## ◆ GetBounds() [1/2]

const double* vtkAMRInformation::GetBounds | ( |  | ) |

Returns the bounds of the entire domain.

## ◆ GetBounds() [2/2]

void vtkAMRInformation::GetBounds | ( | unsigned int | level,
|  | unsigned int | id,
|  | double * | bb
| ) |  |

Returns the bounding box of a given box.

## ◆ GetOrigin() [3/3]

bool vtkAMRInformation::GetOrigin | ( | unsigned int | level,
|  | unsigned int | id,
|  | double * | origin
| ) |  |

Returns the origin of the grid at (level,id)

## ◆ GetSpacing()

void vtkAMRInformation::GetSpacing | ( | unsigned int | level,
|  | double | spacing[3]
| ) |  |

Return the spacing at the given fiven.

## ◆ HasSpacing()

bool vtkAMRInformation::HasSpacing | ( | unsigned int | level | ) |

## ◆ SetAMRBox()

void vtkAMRInformation::SetAMRBox | ( | unsigned int | level,
|  | unsigned int | id,
|  | const vtkAMRBox & | box
| ) |  |

Methods to set and get the AMR box at a given position.

## ◆ GetAMRBox()

const vtkAMRBox& vtkAMRInformation::GetAMRBox | ( | unsigned int | level,
|  | unsigned int | id
| ) |  | const

Methods to set and get the AMR box at a given position.

## ◆ GetCoarsenedAMRBox()

bool vtkAMRInformation::GetCoarsenedAMRBox | ( | unsigned int | level,
|  | unsigned int | id,
|  | vtkAMRBox & | box
| ) |  | const

return the amr box coarsened to the previous level

## ◆ GetAMRBlockSourceIndex()

int vtkAMRInformation::GetAMRBlockSourceIndex | ( | int | index | ) |

Get/Set the SourceIndex of a block.

Typically, this is a file-type specific index that can be used by a reader to load a particular file block

## ◆ SetAMRBlockSourceIndex()

void vtkAMRInformation::SetAMRBlockSourceIndex | ( | int | index,
|  | int | sourceId
| ) |  |

Get/Set the SourceIndex of a block.

Typically, this is a file-type specific index that can be used by a reader to load a particular file block

## ◆ GenerateRefinementRatio()

void vtkAMRInformation::GenerateRefinementRatio | ( |  | ) |

This method computes the refinement ratio at each level.

At each level, l, the refinement ratio r_l is computed by r_l = D_{l} / D_{l+1}, where D_{l+1} and D_{l} are the grid spacings at the next and current level respectively.

.SECTION Assumptions 1) Within each level, the refinement ratios are the same for all blocks. 2) The refinement ratio is uniform along each dimension of the block.

## ◆ HasRefinementRatio()

bool vtkAMRInformation::HasRefinementRatio | ( |  | ) |

Returns whether refinement ratio has been set (either by calling GenerateRefinementRatio() or by calling SetRefinementRatio()

## ◆ SetRefinementRatio()

void vtkAMRInformation::SetRefinementRatio | ( | unsigned int | level,
|  | int | ratio
| ) |  |

Set the refinement ratio at a level.

This method should be called for all levels, if called at all.

## ◆ GetRefinementRatio()

int vtkAMRInformation::GetRefinementRatio | ( | unsigned int | level | ) | const

Returns the refinement of a given level.

## ◆ SetSpacing()

void vtkAMRInformation::SetSpacing | ( | unsigned int | level,
|  | const double * | h
| ) |  |

Set the spacing at a given level.

## ◆ HasChildrenInformation()

bool vtkAMRInformation::HasChildrenInformation | ( |  | ) |

Return whether parent child information has been generated.

## ◆ GetParents()

unsigned int* vtkAMRInformation::GetParents | ( | unsigned int | level,
|  | unsigned int | index,
|  | unsigned int & | numParents
| ) |  |

Return a pointer to Parents of a block.

The first entry is the number of parents the block has followed by its parent ids in level-1. If none exits it returns nullptr.

## ◆ GetChildren()

unsigned int* vtkAMRInformation::GetChildren | ( | unsigned int | level,
|  | unsigned int | index,
|  | unsigned int & | numChildren
| ) |  |

Return a pointer to Children of a block.

The first entry is the number of children the block has followed by its children ids in level+1. If none exits it returns nullptr.

## ◆ PrintParentChildInfo()

void vtkAMRInformation::PrintParentChildInfo | ( | unsigned int | level,
|  | unsigned int | index
| ) |  |

Prints the parents and children of a requested block (Debug Routine)

## ◆ GenerateParentChildInformation()

void vtkAMRInformation::GenerateParentChildInformation | ( |  | ) |

Generate the parent/child relationships - needed to be called before GetParents or GetChildren can be used!

## ◆ Audit()

bool vtkAMRInformation::Audit | ( |  | ) |

Checks whether the meta data is internally consistent.

## ◆ FindCell()

bool vtkAMRInformation::FindCell | ( | double | q[3],
|  | unsigned int | level,
|  | unsigned int | index,
|  | int & | cellIdx
| ) |  |

Given a point q, find whether q is bounded by the data set at (level,index).

If it is, set cellIdx to the cell index and return true; otherwise return false

## ◆ FindGrid() [1/2]

bool vtkAMRInformation::FindGrid | ( | double | q[3],
|  | int | level,
|  | unsigned int & | gridId
| ) |  |

find the grid that contains the point q at the specified level

## ◆ FindGrid() [2/2]

bool vtkAMRInformation::FindGrid | ( | double | q[3],
|  | unsigned int & | level,
|  | unsigned int & | gridId
| ) |  |

Given a point q, find the highest level grid that contains it.

## ◆ GetNumBlocks()

const std::vector<int>& vtkAMRInformation::GetNumBlocks | ( |  | ) | const
| inline

Returns internal arrays.

Definition at line 232 of file vtkAMRInformation.h.

## ◆ GetChildrenAtLevel()

std::vector<std::vector<unsigned int> >& vtkAMRInformation::GetChildrenAtLevel | ( | unsigned int | i | ) |
| inline

Definition at line 234 of file vtkAMRInformation.h.

## ◆ DeepCopy()

void vtkAMRInformation::DeepCopy | ( | vtkAMRInformation * | other | ) |

The documentation for this class was generated from the following file:

- Common/DataModel/vtkAMRInformation.h