 |
VTK
9.0.1
|
Go to the documentation of this file.
135 #ifndef vtkHyperTree_h
136 #define vtkHyperTree_h
138 #include "vtkCommonDataModelModule.h"
192 void Initialize(
unsigned char,
unsigned char,
unsigned char);
266 assert(
"post: result_greater_or_equal_to_one" && this->Datas->NumberOfLevels >= 1);
267 return this->Datas->NumberOfLevels;
285 return this->Datas->NumberOfVertices - this->Datas->NumberOfNodes;
320 const double* scales,
bool reinitialize =
false)
const;
346 return static_cast<unsigned int>(this->GetActualMemorySizeBytes() / 1024);
451 void SetScales(std::shared_ptr<vtkHyperTreeGridScales> scales)
const { this->Scales = scales; }
458 bool HasScales()
const {
return (this->Scales !=
nullptr); }
465 std::shared_ptr<vtkHyperTreeGridScales>
GetScales()
const
467 assert(this->Scales !=
nullptr);
476 , NumberOfChildren(8)
498 std::shared_ptr<vtkHyperTreeData>
Datas;
504 mutable std::shared_ptr<vtkHyperTreeGridScales>
Scales;
vtkIdType GlobalIndexStart
virtual vtkIdType GetGlobalIndexFromLocal(vtkIdType index) const =0
Get the global id of a local node identified by index.
void CopyStructure(vtkHyperTree *ht)
Copy the structure by sharing the decomposition description of the tree.
void SetTreeIndex(vtkIdType treeIndex)
Set/Get tree index in hypertree grid.
virtual bool IsGlobalIndexImplicit()=0
Return if implicit global index maping has been used.
vtkIdType GetNumberOfVertices() const
Return the number of all vertices (coarse and fine) in the tree.
unsigned int GetNumberOfLevels() const
Return the number of levels.
virtual unsigned long GetActualMemorySizeBytes()=0
Return memory used in bytes.
std::shared_ptr< vtkHyperTreeData > Datas
virtual vtkIdType GetElderChildIndex(unsigned int index_parent) const =0
Return the elder child index, local index node of first child, of node, coarse cell,...
virtual void InitializePrivate()=0
int GetDimension() const
Return the spatial dimension of the tree.
dynamic, self-adjusting array of unsigned long
void GetScale(double s[3]) const
Set/Get scale of the tree in each direction for the ground level (0).
virtual void SetGlobalIndexFromLocal(vtkIdType index, vtkIdType global)=0
Set the mapping between a node index in tree and a explicit global index mapping.
abstract base class for most VTK objects
vtkIdType NumberOfVertices
vtkIdType GetTreeIndex() const
vtkIdType GetNumberOfNodes() const
Return the number of nodes (coarse) in the tree.
unsigned int GetActualMemorySize()
Return memory used in kibibytes (1024 bytes).
unsigned char NumberOfChildren
virtual bool IsLeaf(vtkIdType index) const =0
Return if a vertice identified by index in tree as being leaf.
A specifalized type of vtkHyperTreeGrid for the case when root cells have uniform sizes in each direc...
virtual void GetByLevelForWriter(vtkBitArray *inIsMasked, vtkUnsignedLongArray *nbVerticesbyLevel, vtkBitArray *isParent, vtkBitArray *isMasked, vtkIdList *ids)=0
Initialize a state from write data.
virtual ~vtkHyperTree() override
virtual void CopyStructurePrivate(vtkHyperTree *ht)=0
virtual void PrintSelfPrivate(ostream &os, vtkIndent indent)=0
virtual bool IsTerminalNode(vtkIdType index) const =0
Return if a vertice identified by index in tree as a terminal node.
void PrintSelf(ostream &, vtkIndent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetGlobalIndexStart(vtkIdType start)=0
Set the start implicit global index mapping for the first cell in the current tree.
unsigned int NumberOfLevels
a simple class to control print indentation
list of point or cell ids
A data object structured as a tree.
std::shared_ptr< vtkHyperTreeGridScales > GetScales() const
Return all scales.
double GetScale(unsigned int d) const
virtual vtkHyperTree * Freeze(const char *mode)=0
Return a freeze instance (a priori compact but potentially unmodifiable).
virtual void SubdivideLeaf(vtkIdType index, unsigned int level)=0
Subdivide a vertice, only if its a leaf.
int GetBranchFactor() const
Return the branch factor of the tree.
std::shared_ptr< vtkHyperTreeGridScales > InitializeScales(const double *scales, bool reinitialize=false) const
In an hypertree, all cells are the same size by level.
std::shared_ptr< vtkHyperTreeGridScales > Scales
bool HasScales() const
Return the existence scales.
vtkIdType GetNumberOfLeaves() const
Return the number of leaf (fine) in the tree.
void Initialize(unsigned char, unsigned char, unsigned char)
Restore the initial state: only one vertice is then a leaf: the root cell for the hypertree.
virtual vtkIdType GetGlobalNodeIndexMax() const =0
Return the maximum value reached by global index mapping (implicit or explicit).
vtkIdType GetGlobalIndexStart() const
Get the start global index for the current tree for implicit global index mapping.
unsigned char BranchFactor
dynamic, self-adjusting array of bits
vtkIdType GetNumberOfChildren() const
Return the number of children per node of the tree.
static vtkHyperTree * CreateInstance(unsigned char branchFactor, unsigned char dimension)
Return an instance of an implementation of a hypertree for given branch factor and dimension.
void SetScales(std::shared_ptr< vtkHyperTreeGridScales > scales) const
In an hypertree, all cells are the same size by level.
virtual void InitializeForReader(vtkIdType numberOfLevels, vtkIdType nbVertices, vtkIdType nbVerticesOfLastLevel, vtkBitArray *isParent, vtkBitArray *isMasked, vtkBitArray *outIsMasked)=0
Restore a state from read data, without using a cursor Call after create hypertree with initialize.