Split file to ensure correct authorship and license is applied.

This commit is contained in:
Atgeirr Flø Rasmussen
2020-05-13 13:53:45 +02:00
parent 1e56b8f907
commit bf0e7f0e4a
3 changed files with 66 additions and 48 deletions

View File

@@ -21,55 +21,8 @@
#define OPM_WRITESYSTEMMATRIXHELPER_HEADER_INCLUDED
#include <dune/istl/matrixmarket.hh>
#include <opm/simulators/linalg/MatrixMarketSpecializations.hpp>
namespace Opm
{
template<typename T, int i, int j>
class MatrixBlock;
}
namespace Dune
{
namespace MatrixMarketImpl
{
template <typename T, int i, int j, typename A>
struct mm_header_printer<BCRSMatrix<Opm::MatrixBlock<T,i,j>, A>>
{
static void print(std::ostream& os)
{
os << "%%MatrixMarket matrix coordinate ";
os << mm_numeric_type<T>::str() << " general" << std::endl;
}
};
template <typename T, int i, int j, typename A>
struct mm_block_structure_header<BCRSMatrix<Opm::MatrixBlock<T,i,j>, A>>
{
using M = BCRSMatrix<Opm::MatrixBlock<T,i,j>, A>;
static void print(std::ostream& os, const M&)
{
os << "% ISTL_STRUCT blocked ";
os << i << " " << j << std::endl;
}
};
} // namespace MatrixMarketImpl
template<class M>
struct mm_multipliers;
template <typename T, int i, int j, typename A>
struct mm_multipliers<BCRSMatrix<Opm::MatrixBlock<T,i,j>, A>>
{
enum {
rows = i,
cols = j
};
};
} // namespace Dune
namespace Opm
{