29#ifndef vtkHyperTreeGridScales_h
30#define vtkHyperTreeGridScales_h
42 : BranchFactor(branchfactor)
61 return this->CellScales.data() + 3 *
level;
70 return this->CellScales[3 *
level + 0];
79 return this->CellScales[3 *
level + 1];
88 return this->CellScales[3 *
level + 2];
97 memcpy(
scale, this->CellScales.data() + 3 *
level, 3 *
sizeof(
double));
114 void Update(
unsigned int level)
const
116 if (level < this->CurrentFailLevel)
120 this->CurrentFailLevel =
level + 1;
121 this->CellScales.resize(3 * this->CurrentFailLevel);
122 auto current = this->CellScales.begin() + 3 * (this->CurrentFailLevel - 1);
124 auto end = this->CellScales.end();
125 for (; current != end; ++current, ++
previous)
127 *current = *
previous / this->BranchFactor;
134 const double BranchFactor;
139 mutable unsigned int CurrentFailLevel;
140 mutable std::vector<double> CellScales;
A specifalized type of vtkHyperTreeGrid for the case when root cells have uniform sizes in each direc...
double GetScaleX(unsigned int level) const
JB.
vtkHyperTreeGridScales(double branchfactor, const double scale[3])
JB Construit cette classe a partir du scale de la maille d'origine d'un HyperTree et du subdivision f...
~vtkHyperTreeGridScales()=default
double GetBranchFactor() const
JB Retourne le scale des mailles du niveau demande.
double GetScaleY(unsigned int level) const
JB.
double * GetScale(unsigned int level) const
JB Retourne le scale des mailles du niveau demande.
unsigned int GetCurrentFailLevel() const
JB.
void GetScale(unsigned int level, double scale[3]) const
JB Retourne le scale des mailles du niveau demande.
double GetScaleZ(unsigned int level) const
JB.