Go to the documentation of this file.
46 #ifndef vtkHyperTreeGrid_h
47 #define vtkHyperTreeGrid_h
49 #include "vtkCommonDataModelModule.h"
74 class vtkHyperTreePositionCursor;
104 vtkGetVector3Macro(GridSize,
unsigned int);
121 vtkSetMacro(TransposedRootIndexing,
bool);
122 vtkGetMacro(TransposedRootIndexing,
bool);
124 { this->SetTransposedRootIndexing(
false ); }
126 { this->SetTransposedRootIndexing(
true ); }
134 vtkGetMacro(Dimension,
unsigned int);
145 vtkGetMacro(Orientation,
unsigned int);
153 vtkGetMacro(BranchFactor,
unsigned int);
240 vtkSetMacro( HasInterface,
bool );
241 vtkGetMacro( HasInterface,
bool );
242 vtkBooleanMacro( HasInterface,
bool );
249 vtkSetStringMacro(InterfaceNormalsName);
250 vtkGetStringMacro(InterfaceNormalsName);
257 vtkSetStringMacro(InterfaceInterceptsName);
258 vtkGetStringMacro(InterfaceInterceptsName);
355 return this->Superclass::GetCell(i,j,k);
435 double tol2,
int& subId,
double pcoords[3],
436 double *weights )
override;
447 double tol2,
int& subId,
double pcoords[3],
448 double *weights )
override;
510 vtkGetMacro(NumberOfChildren,
unsigned int);
633 unsigned short Level;
678 std::map<vtkIdType, vtkHyperTree*>::iterator
Iterator;
717 unsigned int GridSize[3];
740 std::map<vtkIdType, double> PointShifts[3];
829 #if !defined(__VTK_WRAP__) && !defined(__WRAP_GCCXML__)
represent and manipulate 3D points
Objects for depth-first traversal HyperTreeGrids.
void EvaluateDualCorner(vtkHyperTreeSimpleCursor *)
vtkIdType GetLeafIndex()
Only valid for leaves.
vtkCellLinks * Links
Not really needed.
unsigned int BranchFactor
vtkDataArray * ZCoordinates
vtkHyperTreeCursor * NewCursor(vtkIdType, bool create=false)
Create a new hyper tree cursor: an object that can traverse the cells of an individual hyper tree at ...
void TraverseDualRecursively(vtkHyperTreeGridCursor *, vtkBitArray *)
Recursively descend into tree down to leaves to generate dual, when a mask array is present.
void SetTree(vtkIdType, vtkHyperTree *)
Assign given tree to given index of hyper tree grid NB: This will create a new slot in the grid if ne...
vtkIdTypeArray * GetConnectivity()
vtkHyperTree * GetNextTree(vtkIdType &index)
Get the next tree and set its index then increment the iterator.
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
void Initialize(vtkHyperTreeGrid *)
Initialize the iterator on the tree set of the given grid.
bool TransposedRootIndexing
vtkIdType GetNumberOfLevels(vtkIdType)
Return the number of levels in an individual (primal) tree.
vtkHyperTreeGridCursor * NewGeometricCursor(vtkIdType, bool create=false)
Create a new hyper tree grid geometric cursor: an object that can traverse the cells of a hyper tree ...
vtkIdType GetNumberOfVertices()
Get the number of vertices in the primal tree grid.
vtkIdTypeArray * Connectivity
void SetDimension(unsigned int)
Set/Get the dimensionality of the grid.
void GetPointCells(vtkIdType, vtkIdList *) override
This method should be avoided in favor of cell/point iterators.
static vtkInformationIntegerKey * LEVELS()
represent and manipulate attribute data in a dataset
vtkHyperTreeSimpleCursor()
vtkHyperTree * GetTree(vtkIdType)
Return tree located at given index of hyper tree grid NB: This will return nullptr if grid slot is em...
std::map< vtkIdType, double > ReductionFactors
std::map< vtkIdType, vtkHyperTree * >::iterator Iterator
unsigned int GetShiftedLevelZeroIndex(vtkIdType, int, int, int)
Return the root index of a root cell with given index displaced.
void DeepCopy(vtkDataObject *) override
Create deep copy of hyper tree grid.
vtkLine * Line
These are needed by the GetCell() method.
void GetCell(vtkIdType, vtkGenericCell *) override
This method should be avoided in favor of cell/point iterators.
char * InterfaceNormalsName
void TraverseDualRecursively(vtkHyperTreeGridCursor *)
Recursively descend into tree down to leaves to generate dual.
virtual void SetOrientation(unsigned int)
Set/Get the orientation of 1D or 2D grids:
vtkIdType FindCell(double x[3], vtkCell *cell, vtkGenericCell *gencell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
This is a version of the above method that can be used with multithreaded applications.
unsigned int GetChildMask(unsigned int)
Return hard-coded bitcode correspondng to child mask Dimension 1: Factor 2: 0: 100,...
void ShiftDualCornerFromMaskedLeaf2D(vtkHyperTreeGridCursor *, vtkBitArray *)
Compute appropriate shifts for dual corners of masked cells in 2D.
void SetBranchFactor(unsigned int)
Set/Get the subdivision factor in the grid refinement scheme.
A simplified hyper tree cursor, to be used by the hyper tree.
bool InitPureMaterialMask
void SetIndexingModeToKJI()
abstract superclass for arrays of numeric data
Public structure used by filters to move around the hyper tree grid and easily access neighbors to le...
vtkIdType GetNumberOfPoints() override
Return the number of points in the dual grid.
vtkHyperTree * GetTree()
Methods that belong to the vtkHyperTreeCursor API.
vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
Locate cell based on global coordinate x and tolerance squared.
static vtkInformationIntegerKey * ORIENTATION()
unsigned short GetLevel()
Return level at which cursor is positioned.
void SetMaterialMask(vtkBitArray *)
Set/Get the blanking mask of primal leaf cells.
void GetLevelZeroCoordinatesFromIndex(vtkIdType, unsigned int &, unsigned int &, unsigned int &)
Convert the global index of a root to its Cartesian coordinates in the grid.
void DeleteTrees()
Remove existing trees.
~vtkHyperTreeSimpleCursor()
An iterator object to iteratively access trees in the grid.
vtkHyperTreeSimpleCursor * GetCursor(int)
vtkBitArray * MaterialMask
void GenerateDualCornerFromLeaf3D(vtkHyperTreeGridCursor *, vtkBitArray *)
Process leaf cell and issue corresponding dual corner point in 3D, when a mask array is present.
void ResetSuperCursor()
A convenience method to reset all cursors in a super cursor, either Von Neumann or Moore.
int GetExtentType() override
Structured extent.
vtkIdType GetNumberOfLevels()
Return the number of levels in the hyper tree grid.
cell represents a 1D line
vtkIdType RecursivelyFindPoint(double x[3], vtkHyperTreeGridCursor *, double *, double *)
Recursive method called under the hood by FindPoint().
vtkHyperTreeGridIterator()
void GenerateDualCornerFromLeaf2D(vtkHyperTreeGridCursor *)
Process leaf cell and issue corresponding dual corner point in 2D.
bool HasMaterialMask()
Determine whether blanking mask is empty or not.
Fast Simple Class for dealing with 3D bounds.
~vtkHyperTreeGrid() override
Destructor.
unsigned int NumberOfChildren
static vtkHyperTreeGrid * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
int GetMaxCellSize() override
Convenience method to return largest cell size in dataset.
vtkIdType GetNumberOfLeaves()
Get the number of leaves in the primal tree grid.
create and manipulate ordered lists of objects
void DeepCopyCursors(vtkHyperTreeCursor *, vtkHyperTreeCursor *)
Perform left to right deep copy of hyper tree cursors.
void GetCellNeighbors(vtkIdType, vtkIdList *, vtkIdList *) override
This method should be avoided in favor of cell/point iterators.
void GetCellPoints(vtkIdType, vtkIdList *) override
This method should be avoided in favor of cell/point iterators.
void SetYCoordinates(vtkDataArray *)
Set/Get the grid coordinates in the y-direction.
vtkDataArray * XCoordinates
abstract class to specify cell behavior
Objects for depth-first traversal HyperTrees.
std::map< vtkIdType, vtkHyperTree * > HyperTrees
void GetPoint(vtkIdType, double[3]) override
This method should be avoided in favor of cell/point iterators.
void GetIndexFromLevelZeroCoordinates(vtkIdType &, unsigned int, unsigned int, unsigned int)
Convert the Cartesian coordinates of a root in the grid to its global index.
double * GetPoint(vtkIdType) override
This method should be avoided in favor of cell/point iterators.
void SetZCoordinates(vtkDataArray *)
Set/Get the grid coordinates in the z-direction.
void CopyStructure(vtkDataSet *) override
Copy the internal geometric and topological structure of a vtkHyperTreeGrid object.
void GenerateDualCornerFromLeaf1D(vtkHyperTreeGridCursor *)
Process leaf cell and issue corresponding dual corner point in 1D.
a simple class to control print indentation
object represents upward pointers from points to list of cells using each point
void SetGridExtent(int extent[6])
Set/Get extent of the underlying rectilinear grid dataset.
list of point or cell ids
void SetGridSize(unsigned int[3])
Set/Get the number of local cells in each direction for the underlying rectilinear grid dataset.
vtkIdType GetNumberOfTrees()
Return the number of trees in the level 0 grid.
An object structured as a tree where each node has exactly either 2^d or 3^d children.
void GenerateDualCornerFromLeaf1D(vtkHyperTreeGridCursor *, vtkBitArray *)
Process leaf cell and issue corresponding dual corner point in 1D, when a mask array is present.
vtkCell * GetCell(int i, int j, int k) override
Overridden so as no not unintentionally hide parent class.
vtkHyperTreeGridCursor * NewVonNeumannSuperCursor(vtkIdType, bool create=false)
Create a new hyper tree grid Von Neumann super cursor: an object that can traverse the cells of a hyp...
void SetXCoordinates(vtkDataArray *)
Set/Get the grid coordinates in the x-direction.
void GetCellPoints(vtkIdType, vtkIdType &, vtkIdType *&)
Return a pointer to a list of point ids defining cell.
void SetGridExtent(int, int, int, int, int, int)
int GetCellType(vtkIdType) override
All cell types are 2: quadrilaters,3d: hexahedrons.
vtkBitArray * PureMaterialMask
vtkIdType FindPoint(double x[3]) override
Find cell to which this point belongs, or at least closest one, even if the point is outside the grid...
abstract class to specify dataset behavior
bool RecursivelyInitializePureMaterialMask(vtkHyperTreeGridCursor *cursor)
Recursively initialize pure material mask.
void GenerateDualCornerFromLeaf3D(vtkHyperTreeGridCursor *)
Process leaf cell and issue corresponding dual corner point in 3D.
void InitializeTreeIterator(vtkHyperTreeGridIterator &)
Initialize an iterator to browse level 0 trees.
vtkBitArray * GetPureMaterialMask()
Get or create pure material mask.
void ResetDual()
Reset dual mesh.
dynamic, self-adjusting array of vtkIdType
virtual void SetMaterialMaskIndex(vtkIdTypeArray *)
Set/Get the visibility mask of primal leaf cells.
a cell that represents an orthogonal quadrilateral
char * InterfaceInterceptsName
void ComputeDualGrid()
Traverse tree with 3x3x3 super cursor.
vtkIdTypeArray * MaterialMaskIndex
vtkHyperTreeGrid()
Constructor with default bounds (0,1, 0,1, 0,1).
vtkHyperTreeGridCursor * NewMooreSuperCursor(vtkIdType, bool create=false)
Create a new hyper tree grid Moore super cursor: an object that can traverse the cells of a hyper tre...
provides thread-safe access to cells
static vtkHyperTreeGrid * New()
vtkHyperTreeGridCursor * NewGridCursor(vtkIdType, bool create=false)
Create a new hyper tree grid cursor: an object that can traverse the cells of a hyper tree grid,...
void SubdivideLeaf(vtkHyperTreeCursor *, vtkIdType)
Subdivide node pointed by cursor, only if its a leaf.
static vtkHyperTreeGrid * GetData(vtkInformationVector *v, int i=0)
static vtkInformationIntegerKey * DIMENSION()
void SetGridSize(unsigned int, unsigned int, unsigned int)
dynamic, self-adjusting array of bits
vtkIdType GetNumberOfCells() override
Return the number of cells in the dual grid.
void GenerateDualCornerFromLeaf2D(vtkHyperTreeGridCursor *, vtkBitArray *)
Process leaf cell and issue corresponding dual corner point in 2D, when a mask array is present.
void ShallowCopy(vtkDataObject *) override
Create shallow copy of hyper tree grid.
vtkHyperTree * GetNextTree()
Get the next tree and set its index then increment the iterator.
general representation of visualization data
static vtkInformationDoubleVectorKey * SIZES()
void PrintSelf(ostream &, vtkIndent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataArray * YCoordinates
vtkCell * GetCell(vtkIdType) override
This method should be avoided in favor of cell/point iterators.
void ShiftDualCornerFromMaskedLeaf3D(vtkHyperTreeGridCursor *, vtkBitArray *)
Compute appropriate shifts for dual corners of masked cells in 3D.
std::map< vtkIdType, bool > PointShifted
int GetDataObjectType() override
Return what type of dataset this is.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
void Initialize() override
Restore data object to initial state.
void ComputeBounds() override
Compute the data bounding box from data points.
void SetIndexingModeToIJK()
virtual void GenerateTrees()
This method must be called once the tree settings change.
a cell that represents a 3D orthogonal parallelepiped