VTK  9.3.20240328
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkStructuredAMRGridConnectivity Class Reference

grid connectivity. More...

#include <vtkStructuredAMRGridConnectivity.h>

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

Public Types

typedef vtkAbstractGridConnectivity Superclass
 
- Public Types inherited from vtkAbstractGridConnectivity
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...
 
vtkStructuredAMRGridConnectivityNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
void Initialize (unsigned int NumberOfLevels, unsigned int N, int RefinementRatio=-1)
 Initializes this instance of vtkStructuredAMRGridConnectivity where N is the total number of grids in the AMR hierarchy. More...
 
void ComputeNeighbors () override
 Computes neighboring information. More...
 
void CreateGhostLayers (int N=1) override
 Creates ghost layers. More...
 
virtual void RegisterGrid (int gridIdx, int level, int refinementRatio, int extents[6], vtkUnsignedCharArray *nodesGhostArray, vtkUnsignedCharArray *cellGhostArray, vtkPointData *pointData, vtkCellData *cellData, vtkPoints *gridNodes)
 Registers the AMR grid with the given global linear grid ID (starting numbering from 0) and level and refinement ratio. More...
 
virtual void RegisterGrid (int gridIdx, int level, int extents[6], vtkUnsignedCharArray *nodesGhostArray, vtkUnsignedCharArray *cellGhostArray, vtkPointData *pointData, vtkCellData *cellData, vtkPoints *gridNodes)
 Registers the AMR grid with the given global linear grid ID (starting numbering from 0) and level. More...
 
int GetNumberOfNeighbors (int gridID)
 Returns the number of neighbors for the grid corresponding to the given grid ID. More...
 
void GetGhostedExtent (int gridID, int ext[6])
 Returns the ghost extend for the grid corresponding to the given grid ID. More...
 
vtkStructuredAMRNeighbor GetNeighbor (int gridID, int nei)
 Returns the AMR neighbor for the patch with the corresponding grid ID. More...
 
virtual void SetBalancedRefinement (bool)
 Get/Set macro for BalancedRefinement property, default is true. More...
 
virtual bool GetBalancedRefinement ()
 Get/Set macro for BalancedRefinement property, default is true. More...
 
virtual void SetNodeCentered (bool)
 Get/Set macro NodeCentered property which indicates if the data is node-centered or cell-centered. More...
 
virtual bool GetNodeCentered ()
 Get/Set macro NodeCentered property which indicates if the data is node-centered or cell-centered. More...
 
virtual void SetCellCentered (bool)
 Get/Set CellCentered property which indicates if the data is cell-centered By default, cell-centered is set to true. More...
 
virtual bool GetCellCentered ()
 Get/Set CellCentered property which indicates if the data is cell-centered By default, cell-centered is set to true. More...
 
- Public Member Functions inherited from vtkAbstractGridConnectivity
vtkAbstractGridConnectivityNewInstance () const
 
unsigned int GetNumberOfGrids ()
 Returns the total number of grids. More...
 
vtkUnsignedCharArrayGetGhostedPointGhostArray (int gridID)
 Returns the ghosted points ghost array for the grid associated with the given grid ID. More...
 
vtkUnsignedCharArrayGetGhostedCellGhostArray (int gridID)
 Returns the ghosted cells ghost array for the grid associated with the given grid ID. More...
 
vtkPointDataGetGhostedGridPointData (int gridID)
 Returns the ghosted grid point data for the grid associated with the given grid ID. More...
 
vtkCellDataGetGhostedGridCellData (int gridID)
 Returns the ghosted grid cell data for the grid associated with the given grid ID. More...
 
vtkPointsGetGhostedPoints (int gridID)
 Returns the ghosted grid points for the grid associated with the given grid ID. More...
 
virtual void SetNumberOfGhostLayers (unsigned int)
 Set/Get the number of ghost layers. More...
 
virtual unsigned int GetNumberOfGhostLayers ()
 Set/Get the number of ghost layers. 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...
 
vtkCommandGetCommand (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...
 
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 vtkStructuredAMRGridConnectivityNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkStructuredAMRGridConnectivitySafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkAbstractGridConnectivity
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkAbstractGridConnectivitySafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 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 vtkObjectBaseNew ()
 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 vtkObjectBaseNewInstanceInternal () const
 
 vtkStructuredAMRGridConnectivity ()
 
 ~vtkStructuredAMRGridConnectivity () override
 
void SetNumberOfGrids (unsigned int N) override
 Sets the total number of grids(blocks) in the AMR hierarchy. More...
 
void CreateGhostedMaskArrays (int gridID)
 Creates the ghosted mask arrays. More...
 
void CreateGhostedExtent (int gridID, int N)
 Creates the ghosted extent of the given grid. More...
 
void SetGhostedExtent (int gridID, int ext[6])
 Sets the ghost extent for the grid corresponding to the given grid ID. More...
 
void GetCoarsenedExtent (int gridIdx, int fromLevel, int toLevel, int ext[6])
 Gets the coarsened extent for the grid with the given grid index. More...
 
void GetRefinedExtent (int gridIdx, int fromLevel, int toLevel, int ext[6])
 Gets the refined extent for the grid with the given grid index. More...
 
void RefineExtent (int orient[3], int ndim, int fromLevel, int toLevel, int ext[6])
 Refines the given extent. More...
 
void GetCellRefinedExtent (int orient[3], int ndim, int i, int j, int k, int fromLevel, int toLevel, int ext[6])
 Given the global i,j,k index of a cell at a coarse level, fromLevel, this method computes the range of cells on the refined grid. More...
 
void CoarsenExtent (int orient[3], int ndim, int fromLevel, int toLevel, int ext[6])
 Coarsens the given extent. More...
 
void GetGridExtent (int gridIdx, int ext[6])
 Gets the grid extent for the grid with the given grid ID. More...
 
int GetGridLevel (int gridIdx)
 Returns the level of the grid with the corresponding grid ID. More...
 
bool LevelExists (int level)
 Checks if the given level has been registered. More...
 
bool IsNodeInterior (int i, int j, int k, int GridExtent[6])
 Checks if the node is an interior node in the given extent. More...
 
bool IsNodeWithinExtent (int i, int j, int k, int GridExtent[6])
 Checks if the node is within the extent. More...
 
bool IsNodeOnSharedBoundary (int i, int j, int k, int gridId, int gridExt[6])
 Checks if the node is on a shared boundary. More...
 
bool IsNodeOnBoundaryOfExtent (int i, int j, int k, int ext[6])
 Checks if the node is on the boundary of the given extent. More...
 
void InsertGridAtLevel (int level, int gridID)
 Inserts the grid corresponding to the given ID at the prescribed level. More...
 
void ComputeNeighborSendAndRcvExtent (int gridID, int N)
 Loops through the neighbors of this grid and computes the send and rcv extents for the N requested ghost layers. More...
 
void ComputeWholeExtent ()
 Computes the whole extent w.r.t. More...
 
void GetWholeExtentAtLevel (int level, int ext[6])
 Gets the whole extent with respect to the given level. More...
 
void EstablishNeighbors (int i, int j)
 Establishes neighboring relationship between grids i,j wheren i,j are global indices. More...
 
void GetNodeOrientation (int i, int j, int k, int gridExt[6], int nodeOrientation[3])
 Computes the node orientation tuple for the given i,j,k node. More...
 
void GetOrientationVector (int dataDescription, int orient[3], int &ndim)
 Establishes the orientation vector and dimension based on the computed data description. More...
 
bool HasConstantRefinementRatio ()
 Checks if a constant refinement ratio has been specified. More...
 
void SetRefinementRatioAtLevel (int level, int r)
 Sets the refinement ratio at the given level. More...
 
int GetRefinementRatioAtLevel (int level)
 Returns the refinement ratio at the given level. More...
 
bool AreExtentsEqual (int ext1[6], int ext2[6])
 Checks if the extent ext1 and ext2 are equal. More...
 
void SetBlockTopology (int gridID)
 Constructs the block topology for the given grid. More...
 
int GetNumberOfConnectingBlockFaces (int gridID)
 Returns the number of faces of the block corresponding to the given grid ID that are adjacent to at least one other block. More...
 
void RemoveBlockConnection (int gridID, int blockDirection)
 Removes a block connection along the given direction for the block corresponding to the given gridID. More...
 
void AddBlockConnection (int gridID, int blockDirection)
 Adds a block connection along the given direction for the block corresponding to the given gridID. More...
 
void ClearBlockConnections (int gridID)
 Clears all block connections for the block corresponding to the given grid ID. More...
 
virtual void MarkNodeProperty (int gridId, int i, int j, int k, int gridExt[6], int wholeExt[6], unsigned char &p)
 Marks the ghost property for the given node. More...
 
virtual void FillNodesGhostArray (int gridId, vtkUnsignedCharArray *nodesArray)
 Fills the node ghost arrays for the given grid. More...
 
virtual void FillCellsGhostArray (int gridId, vtkUnsignedCharArray *cellsArray)
 Fills the cell ghost arrays for the given grid. More...
 
void FillGhostArrays (int gridId, vtkUnsignedCharArray *nodesArray, vtkUnsignedCharArray *cellsArray) override
 Fills ghost arrays. More...
 
vtkStructuredAMRNeighbor GetAMRNeighbor (int i, int iLevel, int next1[6], int j, int jLevel, int next2[6], int normalizedLevel, int levelDiff, vtkStructuredNeighbor &nei)
 Compute the AMR neighbor of grid "i" and its neighbor grid "j". More...
 
void ComputeAMRNeighborOverlapExtents (int iLevel, int jLevel, int normalizedLevel, const vtkStructuredNeighbor &nei, int orient[3], int ndim, int gridOverlapExtent[6], int neiOverlapExtent[6])
 A Helper method to compute the AMR neighbor overlap extents. More...
 
int Get1DOrientation (int idx, int ExtentLo, int ExtentHi, int OnLo, int OnHi, int NotOnBoundary)
 Get 1-D orientation. More...
 
void PrintExtent (std::ostream &os, int ext[6])
 Prints the extent. More...
 
void InitializeGhostData (int gridID)
 Initializes the ghost data-structures. More...
 
void TransferRegisteredDataToGhostedData (int gridID)
 Transfers the data of the registered grid, to the ghosted data-structures. More...
 
void TransferLocalNodeCenteredNeighborData (int gridID, vtkStructuredAMRNeighbor &nei)
 Transfers local node-centered neighbor data. More...
 
void GetLocalCellCentersFromCoarserLevel (int gridID, vtkStructuredAMRNeighbor &nei)
 Copy cell center value from a coarser level by direct-injection, i.e., the values within the coarse cell is assumed to be constant. More...
 
void GetLocalCellCentersFromFinerLevel (int gridID, vtkStructuredAMRNeighbor &nei)
 Copy cell center values from a finer level by cell averaging. More...
 
void GetLocalCellCentersAtSameLevel (int gridID, vtkStructuredAMRNeighbor &nei)
 Copy cell center values to fill in the ghost levels from a neighbor at the same level as the grid corresponding to the given grid ID. More...
 
void TransferLocalCellCenteredNeighborData (int gridID, vtkStructuredAMRNeighbor &nei)
 Transfers local cell-centered neighbor data. More...
 
void TransferLocalNeighborData (int gridID, vtkStructuredAMRNeighbor &nei)
 Transfers local neighbor data. More...
 
virtual void TransferGhostDataFromNeighbors (int gridID)
 Fills in the ghost data from the neighbors. More...
 
void AverageFieldData (vtkFieldData *source, vtkIdType *sourceIds, int N, vtkFieldData *target, vtkIdType targetIdx)
 Loops through all arrays and computes the average of the supplied source indices and stores the corresponding average. More...
 
void CopyFieldData (vtkFieldData *source, vtkIdType sourceIdx, vtkFieldData *target, vtkIdType targetIdx)
 Loops through all arrays in the source and for each array, it copies the tuples from sourceIdx to the target at targetIdx. More...
 
bool HasBlockConnection (int gridID, int blockDirection)
 Checks if the block corresponding to the given grid ID has a block adjacent to it in the given block direction. More...
 
- Protected Member Functions inherited from vtkAbstractGridConnectivity
 vtkAbstractGridConnectivity ()
 
 ~vtkAbstractGridConnectivity () override
 
void RegisterGridGhostArrays (int gridID, vtkUnsignedCharArray *nodesArray, vtkUnsignedCharArray *cellsArray)
 Registers the ghostarrays for the given grid. More...
 
void RegisterFieldData (int gridID, vtkPointData *PointData, vtkCellData *CellData)
 Registers the grid's field data, i.e., the node and cell data. More...
 
void RegisterGridNodes (int gridID, vtkPoints *nodes)
 Registers the grid nodes for the grid associated with the given gridID. More...
 
void AllocateUserRegisterDataStructures ()
 Allocate/De-allocate the data-structures where the user-supplied grids will be registered. More...
 
void DeAllocateUserRegisterDataStructures ()
 Allocate/De-allocate the data-structures where the user-supplied grids will be registered. More...
 
void AllocateInternalDataStructures ()
 Allocated/De-allocate the data-structures where the ghosted grid data will be stored. More...
 
void DeAllocateInternalDataStructures ()
 Allocated/De-allocate the data-structures where the ghosted grid data will be stored. More...
 
- 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 &)
 

Protected Attributes

unsigned int NumberOfLevels
 
int DataDimension
 
int DataDescription
 
int WholeExtent [6]
 
int MaxLevel
 
int RefinementRatio
 
bool NodeCentered
 
bool CellCentered
 
bool BalancedRefinement
 
std::map< int, std::set< int > > AMRHierarchy
 
std::vector< int > GridExtents
 
std::vector< int > GhostedExtents
 
std::vector< unsigned char > BlockTopology
 
std::vector< int > GridLevels
 
std::vector< std::vector< vtkStructuredAMRNeighbor > > Neighbors
 
std::vector< std::vector< int > > CellCenteredDonorLevel
 
std::vector< int > RefinementRatios
 
- Protected Attributes inherited from vtkAbstractGridConnectivity
unsigned int NumberOfGrids
 
unsigned int NumberOfGhostLayers
 
std::vector< vtkUnsignedCharArray * > GridPointGhostArrays
 
std::vector< vtkUnsignedCharArray * > GridCellGhostArrays
 
std::vector< vtkPointData * > GridPointData
 
std::vector< vtkCellData * > GridCellData
 
std::vector< vtkPoints * > GridPoints
 
bool AllocatedGhostDataStructures
 
std::vector< vtkPointData * > GhostedGridPointData
 
std::vector< vtkCellData * > GhostedGridCellData
 
std::vector< vtkUnsignedCharArray * > GhostedPointGhostArray
 
std::vector< vtkUnsignedCharArray * > GhostedCellGhostArray
 
std::vector< vtkPoints * > GhostedGridPoints
 
- 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
 

Additional Inherited Members

- Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction GetCurrentMallocFunction ()
 
static vtkReallocingFunction GetCurrentReallocFunction ()
 
static vtkFreeingFunction GetCurrentFreeFunction ()
 
static vtkFreeingFunction GetAlternateFreeFunction ()
 

Detailed Description

grid connectivity.

A concrete instance of vtkAbstractGridConnectivity that implements functionality for computing the neighboring topology within a structured AMR grid, as well as, generating ghost-layers. Support is provided for 1-D, 2-D (XY,XZ,YZ) and 3-D cell-centered datasets. This implementation does not have any support for distributed data. For the parallel implementation see vtkPStructuredAMRGridConnectivity.

See also
vtkPStructuredAMRGridConnectivity vtkAbstractGridConnectivity
Tests:
vtkStructuredAMRGridConnectivity (Tests)

Definition at line 37 of file vtkStructuredAMRGridConnectivity.h.

Member Typedef Documentation

◆ Superclass

Definition at line 42 of file vtkStructuredAMRGridConnectivity.h.

Constructor & Destructor Documentation

◆ vtkStructuredAMRGridConnectivity()

vtkStructuredAMRGridConnectivity::vtkStructuredAMRGridConnectivity ( )
protected

◆ ~vtkStructuredAMRGridConnectivity()

vtkStructuredAMRGridConnectivity::~vtkStructuredAMRGridConnectivity ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkStructuredAMRGridConnectivity* vtkStructuredAMRGridConnectivity::New ( )
static

◆ IsTypeOf()

static vtkTypeBool vtkStructuredAMRGridConnectivity::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual vtkTypeBool vtkStructuredAMRGridConnectivity::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 vtkAbstractGridConnectivity.

◆ SafeDownCast()

static vtkStructuredAMRGridConnectivity* vtkStructuredAMRGridConnectivity::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase* vtkStructuredAMRGridConnectivity::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkAbstractGridConnectivity.

◆ NewInstance()

vtkStructuredAMRGridConnectivity* vtkStructuredAMRGridConnectivity::NewInstance ( ) const

◆ PrintSelf()

void vtkStructuredAMRGridConnectivity::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 vtkAbstractGridConnectivity.

◆ Initialize()

void vtkStructuredAMRGridConnectivity::Initialize ( unsigned int  NumberOfLevels,
unsigned int  N,
int  RefinementRatio = -1 
)

Initializes this instance of vtkStructuredAMRGridConnectivity where N is the total number of grids in the AMR hierarchy.

Optionally, if the AMR dataset has a constant refinement, it should be specified during initialization as the code optimizes for it. If a -1 or no refinement ratio is specified a varying refinement ratio is assumed.

◆ ComputeNeighbors()

void vtkStructuredAMRGridConnectivity::ComputeNeighbors ( )
overridevirtual

Computes neighboring information.

Implements vtkAbstractGridConnectivity.

◆ CreateGhostLayers()

void vtkStructuredAMRGridConnectivity::CreateGhostLayers ( int  N = 1)
overridevirtual

Creates ghost layers.

Implements vtkAbstractGridConnectivity.

◆ RegisterGrid() [1/2]

virtual void vtkStructuredAMRGridConnectivity::RegisterGrid ( int  gridIdx,
int  level,
int  refinementRatio,
int  extents[6],
vtkUnsignedCharArray nodesGhostArray,
vtkUnsignedCharArray cellGhostArray,
vtkPointData pointData,
vtkCellData cellData,
vtkPoints gridNodes 
)
virtual

Registers the AMR grid with the given global linear grid ID (starting numbering from 0) and level and refinement ratio.

This method is to be used when the refinement ratio is not constant.

◆ RegisterGrid() [2/2]

virtual void vtkStructuredAMRGridConnectivity::RegisterGrid ( int  gridIdx,
int  level,
int  extents[6],
vtkUnsignedCharArray nodesGhostArray,
vtkUnsignedCharArray cellGhostArray,
vtkPointData pointData,
vtkCellData cellData,
vtkPoints gridNodes 
)
virtual

Registers the AMR grid with the given global linear grid ID (starting numbering from 0) and level.

The extents of the grid are expected to be global node extents.

◆ SetBalancedRefinement()

virtual void vtkStructuredAMRGridConnectivity::SetBalancedRefinement ( bool  )
virtual

Get/Set macro for BalancedRefinement property, default is true.

If the refinement is balanced, then, adjacent grids in the AMR hierarchy can only differ by one level. By default, a balanced refinement is assumed.

◆ GetBalancedRefinement()

virtual bool vtkStructuredAMRGridConnectivity::GetBalancedRefinement ( )
virtual

Get/Set macro for BalancedRefinement property, default is true.

If the refinement is balanced, then, adjacent grids in the AMR hierarchy can only differ by one level. By default, a balanced refinement is assumed.

◆ SetNodeCentered()

virtual void vtkStructuredAMRGridConnectivity::SetNodeCentered ( bool  )
virtual

Get/Set macro NodeCentered property which indicates if the data is node-centered or cell-centered.

By default, node-centered is set to false since AMR datasets are primarily cell-centered.

◆ GetNodeCentered()

virtual bool vtkStructuredAMRGridConnectivity::GetNodeCentered ( )
virtual

Get/Set macro NodeCentered property which indicates if the data is node-centered or cell-centered.

By default, node-centered is set to false since AMR datasets are primarily cell-centered.

◆ SetCellCentered()

virtual void vtkStructuredAMRGridConnectivity::SetCellCentered ( bool  )
virtual

Get/Set CellCentered property which indicates if the data is cell-centered By default, cell-centered is set to true.

◆ GetCellCentered()

virtual bool vtkStructuredAMRGridConnectivity::GetCellCentered ( )
virtual

Get/Set CellCentered property which indicates if the data is cell-centered By default, cell-centered is set to true.

◆ GetNumberOfNeighbors()

int vtkStructuredAMRGridConnectivity::GetNumberOfNeighbors ( int  gridID)
inline

Returns the number of neighbors for the grid corresponding to the given grid ID.

Definition at line 524 of file vtkStructuredAMRGridConnectivity.h.

◆ GetGhostedExtent()

void vtkStructuredAMRGridConnectivity::GetGhostedExtent ( int  gridID,
int  ext[6] 
)

Returns the ghost extend for the grid corresponding to the given grid ID.

◆ GetNeighbor()

vtkStructuredAMRNeighbor vtkStructuredAMRGridConnectivity::GetNeighbor ( int  gridID,
int  nei 
)
inline

Returns the AMR neighbor for the patch with the corresponding grid ID.

Definition at line 534 of file vtkStructuredAMRGridConnectivity.h.

◆ SetNumberOfGrids()

void vtkStructuredAMRGridConnectivity::SetNumberOfGrids ( unsigned int  N)
overrideprotectedvirtual

Sets the total number of grids(blocks) in the AMR hierarchy.

Implements vtkAbstractGridConnectivity.

◆ CreateGhostedMaskArrays()

void vtkStructuredAMRGridConnectivity::CreateGhostedMaskArrays ( int  gridID)
protected

Creates the ghosted mask arrays.

◆ CreateGhostedExtent()

void vtkStructuredAMRGridConnectivity::CreateGhostedExtent ( int  gridID,
int  N 
)
protected

Creates the ghosted extent of the given grid.

◆ SetGhostedExtent()

void vtkStructuredAMRGridConnectivity::SetGhostedExtent ( int  gridID,
int  ext[6] 
)
protected

Sets the ghost extent for the grid corresponding to the given grid ID.

◆ GetCoarsenedExtent()

void vtkStructuredAMRGridConnectivity::GetCoarsenedExtent ( int  gridIdx,
int  fromLevel,
int  toLevel,
int  ext[6] 
)
protected

Gets the coarsened extent for the grid with the given grid index.

◆ GetRefinedExtent()

void vtkStructuredAMRGridConnectivity::GetRefinedExtent ( int  gridIdx,
int  fromLevel,
int  toLevel,
int  ext[6] 
)
protected

Gets the refined extent for the grid with the given grid index.

◆ RefineExtent()

void vtkStructuredAMRGridConnectivity::RefineExtent ( int  orient[3],
int  ndim,
int  fromLevel,
int  toLevel,
int  ext[6] 
)
protected

Refines the given extent.

◆ GetCellRefinedExtent()

void vtkStructuredAMRGridConnectivity::GetCellRefinedExtent ( int  orient[3],
int  ndim,
int  i,
int  j,
int  k,
int  fromLevel,
int  toLevel,
int  ext[6] 
)
protected

Given the global i,j,k index of a cell at a coarse level, fromLevel, this method computes the range of cells on the refined grid.

◆ CoarsenExtent()

void vtkStructuredAMRGridConnectivity::CoarsenExtent ( int  orient[3],
int  ndim,
int  fromLevel,
int  toLevel,
int  ext[6] 
)
protected

Coarsens the given extent.

◆ GetGridExtent()

void vtkStructuredAMRGridConnectivity::GetGridExtent ( int  gridIdx,
int  ext[6] 
)
inlineprotected

Gets the grid extent for the grid with the given grid ID.

Definition at line 689 of file vtkStructuredAMRGridConnectivity.h.

◆ GetGridLevel()

int vtkStructuredAMRGridConnectivity::GetGridLevel ( int  gridIdx)
inlineprotected

Returns the level of the grid with the corresponding grid ID.

Definition at line 645 of file vtkStructuredAMRGridConnectivity.h.

◆ LevelExists()

bool vtkStructuredAMRGridConnectivity::LevelExists ( int  level)
inlineprotected

Checks if the given level has been registered.

Definition at line 701 of file vtkStructuredAMRGridConnectivity.h.

◆ IsNodeInterior()

bool vtkStructuredAMRGridConnectivity::IsNodeInterior ( int  i,
int  j,
int  k,
int  GridExtent[6] 
)
protected

Checks if the node is an interior node in the given extent.

◆ IsNodeWithinExtent()

bool vtkStructuredAMRGridConnectivity::IsNodeWithinExtent ( int  i,
int  j,
int  k,
int  GridExtent[6] 
)
protected

Checks if the node is within the extent.

◆ IsNodeOnSharedBoundary()

bool vtkStructuredAMRGridConnectivity::IsNodeOnSharedBoundary ( int  i,
int  j,
int  k,
int  gridId,
int  gridExt[6] 
)
protected

Checks if the node is on a shared boundary.

◆ IsNodeOnBoundaryOfExtent()

bool vtkStructuredAMRGridConnectivity::IsNodeOnBoundaryOfExtent ( int  i,
int  j,
int  k,
int  ext[6] 
)
protected

Checks if the node is on the boundary of the given extent.

◆ InsertGridAtLevel()

void vtkStructuredAMRGridConnectivity::InsertGridAtLevel ( int  level,
int  gridID 
)
inlineprotected

Inserts the grid corresponding to the given ID at the prescribed level.

Definition at line 711 of file vtkStructuredAMRGridConnectivity.h.

◆ ComputeNeighborSendAndRcvExtent()

void vtkStructuredAMRGridConnectivity::ComputeNeighborSendAndRcvExtent ( int  gridID,
int  N 
)
protected

Loops through the neighbors of this grid and computes the send and rcv extents for the N requested ghost layers.

◆ ComputeWholeExtent()

void vtkStructuredAMRGridConnectivity::ComputeWholeExtent ( )
protected

Computes the whole extent w.r.t.

level 0 as well as the AMR dataset description and dimension.

◆ GetWholeExtentAtLevel()

void vtkStructuredAMRGridConnectivity::GetWholeExtentAtLevel ( int  level,
int  ext[6] 
)
protected

Gets the whole extent with respect to the given level.

NOTE: This method assument that the whole extent has been computed.

◆ EstablishNeighbors()

void vtkStructuredAMRGridConnectivity::EstablishNeighbors ( int  i,
int  j 
)
protected

Establishes neighboring relationship between grids i,j wheren i,j are global indices.

◆ GetNodeOrientation()

void vtkStructuredAMRGridConnectivity::GetNodeOrientation ( int  i,
int  j,
int  k,
int  gridExt[6],
int  nodeOrientation[3] 
)
protected

Computes the node orientation tuple for the given i,j,k node.

◆ GetOrientationVector()

void vtkStructuredAMRGridConnectivity::GetOrientationVector ( int  dataDescription,
int  orient[3],
int &  ndim 
)
protected

Establishes the orientation vector and dimension based on the computed data description.

The orientation vector is a 3-tuple, which encodes the dimensions that are used. For example, let's say that we want to define the orientation to be in the XZ plane, then, the orient array would be constructed as follows: {0,2 -1}, where -1 indicates a NIL value.

◆ HasConstantRefinementRatio()

bool vtkStructuredAMRGridConnectivity::HasConstantRefinementRatio ( )
inlineprotected

Checks if a constant refinement ratio has been specified.

Definition at line 679 of file vtkStructuredAMRGridConnectivity.h.

◆ SetRefinementRatioAtLevel()

void vtkStructuredAMRGridConnectivity::SetRefinementRatioAtLevel ( int  level,
int  r 
)
inlineprotected

Sets the refinement ratio at the given level.

Definition at line 654 of file vtkStructuredAMRGridConnectivity.h.

◆ GetRefinementRatioAtLevel()

int vtkStructuredAMRGridConnectivity::GetRefinementRatioAtLevel ( int  level)
inlineprotected

Returns the refinement ratio at the given level.

Definition at line 666 of file vtkStructuredAMRGridConnectivity.h.

◆ AreExtentsEqual()

bool vtkStructuredAMRGridConnectivity::AreExtentsEqual ( int  ext1[6],
int  ext2[6] 
)
inlineprotected

Checks if the extent ext1 and ext2 are equal.

Definition at line 621 of file vtkStructuredAMRGridConnectivity.h.

◆ SetBlockTopology()

void vtkStructuredAMRGridConnectivity::SetBlockTopology ( int  gridID)
protected

Constructs the block topology for the given grid.

◆ GetNumberOfConnectingBlockFaces()

int vtkStructuredAMRGridConnectivity::GetNumberOfConnectingBlockFaces ( int  gridID)
inlineprotected

Returns the number of faces of the block corresponding to the given grid ID that are adjacent to at least one other block.

Note, this is not the total number of neighbors for the block. This method simply checks how many out of the 6 block faces have connections. Thus, the return value has an upper-bound of 6.

Definition at line 561 of file vtkStructuredAMRGridConnectivity.h.

◆ HasBlockConnection()

bool vtkStructuredAMRGridConnectivity::HasBlockConnection ( int  gridID,
int  blockDirection 
)
inlineprotected

Checks if the block corresponding to the given grid ID has a block adjacent to it in the given block direction.

NOTE: The block direction is essentially one of the 6 faces of the block defined as follows:

  • FRONT = 0 (+k diretion)
  • BACK = 1 (-k direction)
  • RIGHT = 2 (+i direction)
  • LEFT = 3 (-i direction)
  • TOP = 4 (+j direction)
  • BOTTOM = 5 (-j direction)

Definition at line 305 of file vtkStructuredAMRGridConnectivity.h.

◆ RemoveBlockConnection()

void vtkStructuredAMRGridConnectivity::RemoveBlockConnection ( int  gridID,
int  blockDirection 
)
inlineprotected

Removes a block connection along the given direction for the block corresponding to the given gridID.

NOTE: The block direction is essentially one of the 6 faces of the block defined as follows:

  • FRONT = 0 (+k diretion)
  • BACK = 1 (-k direction)
  • RIGHT = 2 (+i direction)
  • LEFT = 3 (-i direction)
  • TOP = 4 (+j direction)
  • BOTTOM = 5 (-j direction)

Definition at line 582 of file vtkStructuredAMRGridConnectivity.h.

◆ AddBlockConnection()

void vtkStructuredAMRGridConnectivity::AddBlockConnection ( int  gridID,
int  blockDirection 
)
inlineprotected

Adds a block connection along the given direction for the block corresponding to the given gridID.

NOTE: The block direction is essentially one of the 6 faces of the block defined as follows:

  • FRONT = 0 (+k diretion)
  • BACK = 1 (-k direction)
  • RIGHT = 2 (+i direction)
  • LEFT = 3 (-i direction)
  • TOP = 4 (+j direction)
  • BOTTOM = 5 (-j direction)

Definition at line 595 of file vtkStructuredAMRGridConnectivity.h.

◆ ClearBlockConnections()

void vtkStructuredAMRGridConnectivity::ClearBlockConnections ( int  gridID)
inlineprotected

Clears all block connections for the block corresponding to the given grid ID.

Definition at line 607 of file vtkStructuredAMRGridConnectivity.h.

◆ MarkNodeProperty()

virtual void vtkStructuredAMRGridConnectivity::MarkNodeProperty ( int  gridId,
int  i,
int  j,
int  k,
int  gridExt[6],
int  wholeExt[6],
unsigned char &  p 
)
protectedvirtual

Marks the ghost property for the given node.

◆ FillNodesGhostArray()

virtual void vtkStructuredAMRGridConnectivity::FillNodesGhostArray ( int  gridId,
vtkUnsignedCharArray nodesArray 
)
protectedvirtual

Fills the node ghost arrays for the given grid.

◆ FillCellsGhostArray()

virtual void vtkStructuredAMRGridConnectivity::FillCellsGhostArray ( int  gridId,
vtkUnsignedCharArray cellsArray 
)
protectedvirtual

Fills the cell ghost arrays for the given grid.

◆ FillGhostArrays()

void vtkStructuredAMRGridConnectivity::FillGhostArrays ( int  gridId,
vtkUnsignedCharArray nodesArray,
vtkUnsignedCharArray cellsArray 
)
overrideprotectedvirtual

Fills ghost arrays.

Implements vtkAbstractGridConnectivity.

◆ GetAMRNeighbor()

vtkStructuredAMRNeighbor vtkStructuredAMRGridConnectivity::GetAMRNeighbor ( int  i,
int  iLevel,
int  next1[6],
int  j,
int  jLevel,
int  next2[6],
int  normalizedLevel,
int  levelDiff,
vtkStructuredNeighbor nei 
)
protected

Compute the AMR neighbor of grid "i" and its neighbor grid "j".

Given the structured neighbors computed in normalized space (i.e., at the same level) between the two grids, this method computes the corresponding AMR neighbor which essentially adds other bits of information, such as level, relationship type, etc.

NOTE: The extents next1 and next2 for each grid are the normalized extents

◆ ComputeAMRNeighborOverlapExtents()

void vtkStructuredAMRGridConnectivity::ComputeAMRNeighborOverlapExtents ( int  iLevel,
int  jLevel,
int  normalizedLevel,
const vtkStructuredNeighbor nei,
int  orient[3],
int  ndim,
int  gridOverlapExtent[6],
int  neiOverlapExtent[6] 
)
protected

A Helper method to compute the AMR neighbor overlap extents.

The method coarsens/refines the gridOverlap and neiOverlap extents accordingly s.t. they are w.r.t. to the level of the grid they refer to.

◆ Get1DOrientation()

int vtkStructuredAMRGridConnectivity::Get1DOrientation ( int  idx,
int  ExtentLo,
int  ExtentHi,
int  OnLo,
int  OnHi,
int  NotOnBoundary 
)
inlineprotected

Get 1-D orientation.

Definition at line 546 of file vtkStructuredAMRGridConnectivity.h.

◆ PrintExtent()

void vtkStructuredAMRGridConnectivity::PrintExtent ( std::ostream &  os,
int  ext[6] 
)
inlineprotected

Prints the extent.

Definition at line 634 of file vtkStructuredAMRGridConnectivity.h.

◆ InitializeGhostData()

void vtkStructuredAMRGridConnectivity::InitializeGhostData ( int  gridID)
protected

Initializes the ghost data-structures.

◆ TransferRegisteredDataToGhostedData()

void vtkStructuredAMRGridConnectivity::TransferRegisteredDataToGhostedData ( int  gridID)
protected

Transfers the data of the registered grid, to the ghosted data-structures.

◆ TransferLocalNodeCenteredNeighborData()

void vtkStructuredAMRGridConnectivity::TransferLocalNodeCenteredNeighborData ( int  gridID,
vtkStructuredAMRNeighbor nei 
)
protected

Transfers local node-centered neighbor data.

◆ GetLocalCellCentersFromCoarserLevel()

void vtkStructuredAMRGridConnectivity::GetLocalCellCentersFromCoarserLevel ( int  gridID,
vtkStructuredAMRNeighbor nei 
)
protected

Copy cell center value from a coarser level by direct-injection, i.e., the values within the coarse cell is assumed to be constant.

◆ GetLocalCellCentersFromFinerLevel()

void vtkStructuredAMRGridConnectivity::GetLocalCellCentersFromFinerLevel ( int  gridID,
vtkStructuredAMRNeighbor nei 
)
protected

Copy cell center values from a finer level by cell averaging.

◆ GetLocalCellCentersAtSameLevel()

void vtkStructuredAMRGridConnectivity::GetLocalCellCentersAtSameLevel ( int  gridID,
vtkStructuredAMRNeighbor nei 
)
protected

Copy cell center values to fill in the ghost levels from a neighbor at the same level as the grid corresponding to the given grid ID.

◆ TransferLocalCellCenteredNeighborData()

void vtkStructuredAMRGridConnectivity::TransferLocalCellCenteredNeighborData ( int  gridID,
vtkStructuredAMRNeighbor nei 
)
protected

Transfers local cell-centered neighbor data.

◆ TransferLocalNeighborData()

void vtkStructuredAMRGridConnectivity::TransferLocalNeighborData ( int  gridID,
vtkStructuredAMRNeighbor nei 
)
protected

Transfers local neighbor data.

◆ TransferGhostDataFromNeighbors()

virtual void vtkStructuredAMRGridConnectivity::TransferGhostDataFromNeighbors ( int  gridID)
protectedvirtual

Fills in the ghost data from the neighbors.

◆ AverageFieldData()

void vtkStructuredAMRGridConnectivity::AverageFieldData ( vtkFieldData source,
vtkIdType sourceIds,
int  N,
vtkFieldData target,
vtkIdType  targetIdx 
)
protected

Loops through all arrays and computes the average of the supplied source indices and stores the corresponding average.

◆ CopyFieldData()

void vtkStructuredAMRGridConnectivity::CopyFieldData ( vtkFieldData source,
vtkIdType  sourceIdx,
vtkFieldData target,
vtkIdType  targetIdx 
)
protected

Loops through all arrays in the source and for each array, it copies the tuples from sourceIdx to the target at targetIdx.

This method assumes that the source and target have a one-to-one array correspondence, that is array i in the source corresponds to array i in the target.

Member Data Documentation

◆ NumberOfLevels

unsigned int vtkStructuredAMRGridConnectivity::NumberOfLevels
protected

Definition at line 478 of file vtkStructuredAMRGridConnectivity.h.

◆ DataDimension

int vtkStructuredAMRGridConnectivity::DataDimension
protected

Definition at line 479 of file vtkStructuredAMRGridConnectivity.h.

◆ DataDescription

int vtkStructuredAMRGridConnectivity::DataDescription
protected

Definition at line 480 of file vtkStructuredAMRGridConnectivity.h.

◆ WholeExtent

int vtkStructuredAMRGridConnectivity::WholeExtent[6]
protected

Definition at line 481 of file vtkStructuredAMRGridConnectivity.h.

◆ MaxLevel

int vtkStructuredAMRGridConnectivity::MaxLevel
protected

Definition at line 482 of file vtkStructuredAMRGridConnectivity.h.

◆ RefinementRatio

int vtkStructuredAMRGridConnectivity::RefinementRatio
protected

Definition at line 483 of file vtkStructuredAMRGridConnectivity.h.

◆ NodeCentered

bool vtkStructuredAMRGridConnectivity::NodeCentered
protected

Definition at line 488 of file vtkStructuredAMRGridConnectivity.h.

◆ CellCentered

bool vtkStructuredAMRGridConnectivity::CellCentered
protected

Definition at line 489 of file vtkStructuredAMRGridConnectivity.h.

◆ BalancedRefinement

bool vtkStructuredAMRGridConnectivity::BalancedRefinement
protected

Definition at line 491 of file vtkStructuredAMRGridConnectivity.h.

◆ AMRHierarchy

std::map<int, std::set<int> > vtkStructuredAMRGridConnectivity::AMRHierarchy
protected

Definition at line 496 of file vtkStructuredAMRGridConnectivity.h.

◆ GridExtents

std::vector<int> vtkStructuredAMRGridConnectivity::GridExtents
protected

Definition at line 499 of file vtkStructuredAMRGridConnectivity.h.

◆ GhostedExtents

std::vector<int> vtkStructuredAMRGridConnectivity::GhostedExtents
protected

Definition at line 500 of file vtkStructuredAMRGridConnectivity.h.

◆ BlockTopology

std::vector<unsigned char> vtkStructuredAMRGridConnectivity::BlockTopology
protected

Definition at line 501 of file vtkStructuredAMRGridConnectivity.h.

◆ GridLevels

std::vector<int> vtkStructuredAMRGridConnectivity::GridLevels
protected

Definition at line 502 of file vtkStructuredAMRGridConnectivity.h.

◆ Neighbors

std::vector<std::vector<vtkStructuredAMRNeighbor> > vtkStructuredAMRGridConnectivity::Neighbors
protected

Definition at line 503 of file vtkStructuredAMRGridConnectivity.h.

◆ CellCenteredDonorLevel

std::vector<std::vector<int> > vtkStructuredAMRGridConnectivity::CellCenteredDonorLevel
protected

Definition at line 508 of file vtkStructuredAMRGridConnectivity.h.

◆ RefinementRatios

std::vector<int> vtkStructuredAMRGridConnectivity::RefinementRatios
protected

Definition at line 512 of file vtkStructuredAMRGridConnectivity.h.


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