MatrixSize.hpp 759 Bytes
Newer Older
Praetorius, Simon's avatar
Praetorius, Simon committed
1
2
3
4
5
6
#pragma once

#include <functional>
#include <memory>

#include <amdis/common/Index.hpp>
7
#include <amdis/linearalgebra/SymmetryStructure.hpp>
Praetorius, Simon's avatar
Praetorius, Simon committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

namespace AMDiS
{
  class MatrixSize
  {
  public:
    /// Number of rows in the matrix
    std::size_t rows() const
    {
      return rows_;
    }

    /// Number of columns in the matrix
    std::size_t cols() const
    {
      return cols_;
    }

26
    template <class RowBasis, class ColBasis>
27
28
    void init(RowBasis const& rowBasis, ColBasis const& colBasis,
              SymmetryStructure symmetry = SymmetryStructure::unknown)
29
30
31
32
    {
      rows_ = rowBasis.dimension();
      cols_ = colBasis.dimension();
    }
Praetorius, Simon's avatar
Praetorius, Simon committed
33
34

  private:
35
36
    std::size_t rows_ = 0;
    std::size_t cols_ = 0;
Praetorius, Simon's avatar
Praetorius, Simon committed
37
38
39
  };

} // end namespace AMDiS