Amesos2 - Direct Sparse Solver Interfaces  Version of the Day
Amesos2_TpetraCrsMatrix_MatrixAdapter_decl.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Amesos2: Templated Direct Sparse Solver Package
4 //
5 // Copyright 2011 NTESS and the Amesos2 contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 
21 #ifndef AMESOS2_TPETRACRSMATRIX_MATRIXADAPTER_DECL_HPP
22 #define AMESOS2_TPETRACRSMATRIX_MATRIXADAPTER_DECL_HPP
23 
24 #include "Amesos2_config.h"
25 
26 #include "Amesos2_TpetraRowMatrix_AbstractMatrixAdapter_decl.hpp"
27 #include "Amesos2_MatrixAdapter_decl.hpp"
28 
29 namespace Amesos2 {
30 
43  template <typename Scalar,
44  typename LocalOrdinal,
45  typename GlobalOrdinal,
46  typename Node>
47  class ConcreteMatrixAdapter<Tpetra::CrsMatrix<Scalar,
48  LocalOrdinal,
49  GlobalOrdinal,
50  Node> >
51  : public AbstractConcreteMatrixAdapter<Tpetra::RowMatrix<Scalar,
52  LocalOrdinal,
53  GlobalOrdinal,
54  Node>,
55  Tpetra::CrsMatrix<Scalar,
56  LocalOrdinal,
57  GlobalOrdinal,
58  Node> >
59  {
60  // Give our matrix adapter class access to our private
61  // implementation functions
62  friend class MatrixAdapter<Tpetra::RowMatrix<Scalar,
63  LocalOrdinal,
64  GlobalOrdinal,
65  Node> >;
66  public:
67  typedef Tpetra::CrsMatrix<Scalar,
68  LocalOrdinal,
69  GlobalOrdinal,
70  Node> matrix_t;
71  private:
73  Tpetra::RowMatrix<Scalar,
74  LocalOrdinal,
75  GlobalOrdinal,
76  Node>, matrix_t> super_t;
77  public:
78  // 'import' superclass types
79  typedef typename super_t::scalar_t scalar_t;
80  typedef typename super_t::local_ordinal_t local_ordinal_t;
81  typedef typename super_t::global_ordinal_t global_ordinal_t;
82  typedef typename super_t::node_t node_t;
83  typedef typename super_t::global_size_t global_size_t;
84 
85  typedef ConcreteMatrixAdapter<matrix_t> type;
86 
87  ConcreteMatrixAdapter(RCP<matrix_t> m);
88 
89  RCP<const MatrixAdapter<matrix_t> > get_impl(const Teuchos::Ptr<const Tpetra::Map<local_ordinal_t,global_ordinal_t,node_t> > map, EDistribution distribution = ROOTED) const;
90 
91  };
92 
93 } // end namespace Amesos2
94 
95 #endif // AMESOS2_TPETRACRSMATRIX_MATRIXADAPTER_DECL_HPP
A Matrix adapter interface for Amesos2.
Definition: Amesos2_MatrixAdapter_decl.hpp:42
Definition: Amesos2_AbstractConcreteMatrixAdapter.hpp:55