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;
309 void GetScale(
double s[3])
const;
311 double GetScale(
unsigned int d)
const;
319 std::shared_ptr<vtkHyperTreeGridScales> InitializeScales(
320 const double* scales,
bool reinitialize =
false)
const;
332 static vtkHyperTree* CreateInstance(
unsigned char branchFactor,
unsigned char dimension);
337 virtual unsigned long GetActualMemorySizeBytes() = 0;
346 return static_cast<unsigned int>(this->GetActualMemorySizeBytes() / 1024);
358 virtual bool IsGlobalIndexImplicit() = 0;
379 virtual void SetGlobalIndexStart(
vtkIdType start) = 0;
412 virtual vtkIdType GetGlobalNodeIndexMax()
const = 0;
442 virtual vtkIdType GetElderChildIndex(
unsigned int index_parent)
const = 0;
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)
482 virtual void InitializePrivate() = 0;
483 virtual void PrintSelfPrivate(ostream& os,
vtkIndent indent) = 0;
484 virtual void CopyStructurePrivate(
vtkHyperTree* ht) = 0;
498 std::shared_ptr<vtkHyperTreeData>
Datas;
504 mutable std::shared_ptr<vtkHyperTreeGridScales>
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.
void SetScales(std::shared_ptr< vtkHyperTreeGridScales > scales) const
In an hypertree, all cells are the same size by level.
std::shared_ptr< vtkHyperTreeGridScales > GetScales() const
Return all scales.
vtkIdType GetGlobalIndexStart() const
Get the start global index for the current tree for implicit global index mapping.
void SetTreeIndex(vtkIdType treeIndex)
Set/Get tree index in hypertree grid.
vtkIdType GetNumberOfChildren() const
Return the number of children per node of the tree.
unsigned char BranchFactor
int GetDimension() const
Return the spatial dimension of the tree.
unsigned int NumberOfLevels
a simple class to control print indentation
vtkIdType GetTreeIndex() const
Set/Get tree index in hypertree grid.
vtkIdType GetNumberOfVertices() const
Return the number of all vertices (coarse and fine) in the tree.
unsigned int GetActualMemorySize()
Return memory used in kibibytes (1024 bytes).
list of point or cell ids
std::shared_ptr< vtkHyperTreeGridScales > Scales
bool HasScales() const
Return the existence scales.
virtual ~vtkHyperTree() override
dynamic, self-adjusting array of bits
dynamic, self-adjusting array of unsigned long
A data object structured as a tree.
unsigned char NumberOfChildren
A specifalized type of vtkHyperTreeGrid for the case when root cells have uniform sizes in each direc...
vtkIdType GlobalIndexStart
vtkIdType GetNumberOfNodes() const
Return the number of nodes (coarse) in the tree.
int GetBranchFactor() const
Return the branch factor of the tree.
vtkIdType GetNumberOfLeaves() const
Return the number of leaf (fine) in the tree.
unsigned int GetNumberOfLevels() const
Return the number of levels.
std::shared_ptr< vtkHyperTreeData > Datas