My Project
MatrixMarketSpecializations.hpp
1 /*
2  The content of this file is based on the file dune/istl/matrixmarket.hh in
3  the Dune module dune-istl.
4 
5  The license of this file is therefore the same as that of Dune, see
6  https://www.dune-project.org/about/license/
7 */
8 
9 #ifndef OPM_MATRIXMARKETSPECIALIZATIONS_HEADER_INCLUDED
10 #define OPM_MATRIXMARKETSPECIALIZATIONS_HEADER_INCLUDED
11 
12 #include <dune/istl/matrixmarket.hh>
13 
14 namespace Opm
15 {
16 template<typename T, int i, int j>
18 }
19 
20 namespace Dune
21 {
22 
23 namespace MatrixMarketImpl
24 {
25 
26  template <typename T, int i, int j, typename A>
27  struct mm_header_printer<BCRSMatrix<Opm::MatrixBlock<T,i,j>, A>>
28  {
29  static void print(std::ostream& os)
30  {
31  os << "%%MatrixMarket matrix coordinate ";
32  os << mm_numeric_type<T>::str() << " general" << std::endl;
33  }
34  };
35 
36  template <typename T, int i, int j, typename A>
37  struct mm_block_structure_header<BCRSMatrix<Opm::MatrixBlock<T,i,j>, A>>
38  {
39  using M = BCRSMatrix<Opm::MatrixBlock<T,i,j>, A>;
40  static void print(std::ostream& os, const M&)
41  {
42  os << "% ISTL_STRUCT blocked ";
43  os << i << " " << j << std::endl;
44  }
45  };
46 
47 } // namespace MatrixMarketImpl
48 
49 template<class M>
51 
52 template <typename T, int i, int j, typename A>
53 struct mm_multipliers<BCRSMatrix<Opm::MatrixBlock<T,i,j>, A>>
54 {
55  enum {
56  rows = i,
57  cols = j
58  };
59 };
60 
61 } // namespace Dune
62 
63 #endif
Definition: MatrixBlock.hpp:370
Definition: MatrixMarketSpecializations.hpp:17
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:26
Definition: MatrixMarketSpecializations.hpp:50