6#include <dune/common/math.hh>
8#include <amdis/Observer.hpp>
9#include <amdis/common/Index.hpp>
10#include <amdis/common/Math.hpp>
11#include <amdis/linearalgebra/SymmetryStructure.hpp>
18 template <
class RowBasis,
class ColBasis>
19 SlotSize(RowBasis
const& rowBasis, ColBasis
const& colBasis,
20 SymmetryStructure
symmetry = SymmetryStructure::unknown)
21 : rows_(rowBasis.dimension())
22 , cols_(colBasis.dimension())
25 init(rowBasis, colBasis);
56 template <
class RowBasis,
class ColBasis>
57 void init(RowBasis
const& rowBasis, ColBasis
const& colBasis)
59 using GridView =
typename RowBasis::GridView;
60 static std::size_t surrounding
61 = Math::pow<GridView::dimension>(2) * Dune::factorial(
int(GridView::dimension));
63 estRowSize_ = std::min(cols_, colBasis.localView().maxSize() * surrounding);
69 std::size_t estRowSize_;
70 SymmetryStructure symmetry_;
Definition: SlotSize.hpp:16
SymmetryStructure symmetry() const
Symmetry of the matrix entries.
Definition: SlotSize.hpp:47
std::size_t rows() const
Number of rows in the matrix.
Definition: SlotSize.hpp:29
std::size_t cols() const
Number of columns in the matrix.
Definition: SlotSize.hpp:35
std::size_t rowSizeEstimate() const
Estimate of the non-zeros per row.
Definition: SlotSize.hpp:41