Template Function combigrid::CombiCom::sumAndCheckSubspaceSizes(const SparseGridType&, const std::vector<SubspaceSizeType>&)
Defined in File CombiCom.hpp
Function Documentation
-
template<typename SparseGridType>
size_t combigrid::CombiCom::sumAndCheckSubspaceSizes(const SparseGridType &dsg, const std::vector<SubspaceSizeType> &subspaceSizes) check if the allocated subspace sizes of a DistributedSparseGrid are correct
They must be either 0 or the same as the declared size of the subspace. Only fails if the sizes are different and the program was compiled in Debug mode; otherwise only prints to std::cout.
- Template Parameters:
SparseGridType – (derived from) DistributedSparseGridUniform
- Parameters:
dsg – the DistributedSparseGrid
subspaceSizes – the declared sizes of the allocated subspaces
- Returns:
the sum of all elements in
subspaceSizes