9 #ifndef CUBBYFLOW_FDM_MG_LINEAR_SYSTEM2_IMPL_H 10 #define CUBBYFLOW_FDM_MG_LINEAR_SYSTEM2_IMPL_H 16 size_t numberOfLevels, std::vector<
Array2<T>>* levels)
18 numberOfLevels = std::max(numberOfLevels,
ONE_SIZE);
20 levels->resize(numberOfLevels);
24 Size2 res = coarsestResolution;
25 for (
size_t level = 0; level < numberOfLevels; ++level)
27 (*levels)[numberOfLevels - level - 1].Resize(res);
35 size_t maxNumberOfLevels, std::vector<
Array2<T>>* levels)
37 Size2 res = finestResolution;
40 for (; i < maxNumberOfLevels; ++i)
42 if (res.
x % 2 == 0 && res.
y % 2 == 0)
static void ResizeArrayWithFinest(const Size2 &finestResolution, size_t maxNumberOfLevels, std::vector< Array2< T >> *levels)
Resizes the array with the finest resolution and max number of levels.
Definition: FDMMGLinearSystem2-Impl.h:34
T x
X (or the first) component of the point.
Definition: Point2.h:28
2-D point class.
Definition: Point2.h:25
constexpr size_t ONE_SIZE
One size_t.
Definition: Constants.h:45
T y
Y (or the second) component of the point.
Definition: Point2.h:34
Definition: pybind11Utils.h:24
static void ResizeArrayWithCoarsest(const Size2 &coarsestResolution, size_t numberOfLevels, std::vector< Array2< T >> *levels)
Resizes the array with the coarsest resolution and number of levels.
Definition: FDMMGLinearSystem2-Impl.h:15
2-D array class.
Definition: Array2.h:42