126 #ifndef vtkHyperTree_h
127 #define vtkHyperTree_h
129 #include "vtkCommonDataModelModule.h"
135 VTK_ABI_NAMESPACE_BEGIN
139 class vtkTypeInt64Array;
182 unsigned char branchFactor,
unsigned char dimension,
unsigned char numberOfChildren);
227 virtual void BuildFromBreadthFirstOrderDescriptor(
267 virtual void ComputeBreadthFirstOrderDescriptor(
vtkBitArray* inputMask,
268 vtkTypeInt64Array* numberOfVerticesPerDepth,
vtkBitArray* descriptor,
301 assert(
"post: result_greater_or_equal_to_one" && this->Datas->NumberOfLevels >= 1);
302 return this->Datas->NumberOfLevels;
320 return this->Datas->NumberOfVertices - this->Datas->NumberOfNodes;
344 void GetScale(
double s[3])
const;
346 double GetScale(
unsigned int d)
const;
354 std::shared_ptr<vtkHyperTreeGridScales> InitializeScales(
355 const double* scales,
bool reinitialize =
false)
const;
367 static vtkHyperTree* CreateInstance(
unsigned char branchFactor,
unsigned char dimension);
372 virtual unsigned long GetActualMemorySizeBytes() = 0;
381 return static_cast<unsigned int>(this->GetActualMemorySizeBytes() / 1024);
393 virtual bool IsGlobalIndexImplicit() = 0;
414 virtual void SetGlobalIndexStart(
vtkIdType start) = 0;
447 virtual vtkIdType GetGlobalNodeIndexMax()
const = 0;
477 virtual vtkIdType GetElderChildIndex(
unsigned int index_parent)
const = 0;
483 virtual const unsigned int* GetElderChildIndexArray(
size_t& nbElements)
const = 0;
492 void SetScales(std::shared_ptr<vtkHyperTreeGridScales> scales)
const { this->Scales = scales; }
499 bool HasScales()
const {
return (this->Scales !=
nullptr); }
506 std::shared_ptr<vtkHyperTreeGridScales>
GetScales()
const
508 assert(this->Scales !=
nullptr);
518 virtual void InitializePrivate() = 0;
519 virtual void PrintSelfPrivate(ostream& os,
vtkIndent indent) = 0;
520 virtual void CopyStructurePrivate(
vtkHyperTree* ht) = 0;
534 std::shared_ptr<vtkHyperTreeData>
Datas;
540 mutable std::shared_ptr<vtkHyperTreeGridScales>
Scales;
544 unsigned char branchFactor,
unsigned char dimension,
unsigned char numberOfChildren);
549 VTK_ABI_NAMESPACE_END
vtkIdType GetGlobalIndexStart() const
Get the start global index for the current tree for implicit global index mapping.
bool HasScales() const
Return the existence scales.
abstract base class for most VTK objects
vtkIdType NumberOfVertices
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int GetDimension() const
Return the spatial dimension of the tree.
void SetTreeIndex(vtkIdType treeIndex)
Set/Get tree index in hypertree grid.
void SetScales(std::shared_ptr< vtkHyperTreeGridScales > scales) const
In an hypertree, all cells are the same size by level.
unsigned char BranchFactor
unsigned int NumberOfLevels
a simple class to control print indentation
std::shared_ptr< vtkHyperTreeGridScales > GetScales() const
Return all scales.
unsigned int GetActualMemorySize()
Return memory used in kibibytes (1024 bytes).
list of point or cell ids
std::shared_ptr< vtkHyperTreeGridScales > Scales
vtkIdType GetNumberOfChildren() const
Return the number of children per node of the tree.
vtkIdType GetNumberOfLeaves() const
Return the number of leaf (fine) in the tree.
int GetBranchFactor() const
Return the branch factor of the tree.
unsigned int GetNumberOfLevels() const
Return the number of levels.
vtkIdType GetTreeIndex() const
Set/Get tree index in hypertree grid.
dynamic, self-adjusting array of bits
A data object structured as a tree.
vtkIdType GetNumberOfVertices() const
Return the number of all vertices (coarse and fine) in the tree.
unsigned char NumberOfChildren
vtkIdType GetNumberOfNodes() const
Return the number of nodes (coarse) in the tree.
A specifalized type of vtkHyperTreeGrid for the case when root cells have uniform sizes in each direc...
vtkIdType GlobalIndexStart
std::shared_ptr< vtkHyperTreeData > Datas