Amesos2 - Direct Sparse Solver Interfaces  Version of the Day
Amesos2_EpetraCrsMatrix_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_EPETRACRSMATRIX_MATRIXADAPTER_DECL_HPP
22 #define AMESOS2_EPETRACRSMATRIX_MATRIXADAPTER_DECL_HPP
23 
24 #include "Amesos2_config.h"
25 
26 #include <Epetra_CrsMatrix.h>
27 
29 #include "Amesos2_MatrixAdapter_decl.hpp"
30 
31 namespace Amesos2 {
32 
33  // template <class M, class D> class AbstractConcreteMatrixAdapter;
34 
47  template <>
48  class ConcreteMatrixAdapter< Epetra_CrsMatrix >
49  : public AbstractConcreteMatrixAdapter< Epetra_RowMatrix, Epetra_CrsMatrix >
50  {
51  // Give our matrix adapter class access to our private
52  // implementation functions
53  friend class MatrixAdapter< Epetra_RowMatrix >;
54  public:
55  typedef Epetra_CrsMatrix matrix_t;
56  private:
57  typedef AbstractConcreteMatrixAdapter<Epetra_RowMatrix,
58  Epetra_CrsMatrix> super_t;
59  public:
60  // 'import' superclass types
61  typedef super_t::scalar_t scalar_t;
62  typedef super_t::local_ordinal_t local_ordinal_t;
63  typedef super_t::global_ordinal_t global_ordinal_t;
64  typedef super_t::node_t node_t;
65  typedef super_t::global_size_t global_size_t;
66 
67  typedef ConcreteMatrixAdapter<matrix_t> type;
68 
69  ConcreteMatrixAdapter(RCP<matrix_t> m);
70 
71  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;
72 
73  };
74 
75 } // end namespace Amesos2
76 
77 #endif // AMESOS2_EPETRACRSMATRIX_MATRIXADAPTER_DECL_HPP
A Matrix adapter interface for Amesos2.
Definition: Amesos2_MatrixAdapter_decl.hpp:42
Provides the Epetra_RowMatrix abstraction for the concrete Epetra row matric adapters.
Definition: Amesos2_AbstractConcreteMatrixAdapter.hpp:55
EDistribution
Definition: Amesos2_TypeDecl.hpp:89