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;