9 #ifndef CUBBYFLOW_FDM_MG_LINEAR_SYSTEM3_IMPL_H 10 #define CUBBYFLOW_FDM_MG_LINEAR_SYSTEM3_IMPL_H 16 size_t numberOfLevels, std::vector<
Array3<T>>* levels)
18 numberOfLevels = std::max(numberOfLevels,
ONE_SIZE);
20 levels->resize(numberOfLevels);
24 Size3 res = coarsestResolution;
25 for (
size_t level = 0; level < numberOfLevels; ++level)
27 (*levels)[numberOfLevels - level - 1].Resize(res);
36 size_t maxNumberOfLevels, std::vector<
Array3<T>>* levels)
38 Size3 res = finestResolution;
41 for (; i < maxNumberOfLevels; ++i)
43 if (res.
x % 2 == 0 && res.
y % 2 == 0 && res.
z % 2 == 0)
static void ResizeArrayWithCoarsest(const Size3 &coarsestResolution, size_t numberOfLevels, std::vector< Array3< T >> *levels)
Resizes the array with the coarsest resolution and number of levels.
Definition: FDMMGLinearSystem3-Impl.h:15
constexpr size_t ONE_SIZE
One size_t.
Definition: Constants.h:45
3-D point class.
Definition: Point3.h:26
Definition: pybind11Utils.h:24
T z
Z (or the third) component of the point.
Definition: Point3.h:38
T y
Y (or the second) component of the point.
Definition: Point3.h:35
T x
X (or the first) component of the point.
Definition: Point3.h:29
static void ResizeArrayWithFinest(const Size3 &finestResolution, size_t maxNumberOfLevels, std::vector< Array3< T >> *levels)
Resizes the array with the finest resolution and max number of levels.
Definition: FDMMGLinearSystem3-Impl.h:35
3-D array class.
Definition: Array3.h:45