Xpetra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Xpetra_MatrixFactory_decl.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Xpetra: A linear algebra interface package
4 //
5 // Copyright 2012 NTESS and the Xpetra contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 // WARNING: This code is experimental. Backwards compatibility should not be expected.
11 
12 #ifndef XPETRA_MATRIXFACTORY_DECL_HPP
13 #define XPETRA_MATRIXFACTORY_DECL_HPP
14 
15 #include "Xpetra_ConfigDefs.hpp"
17 #include "Xpetra_Matrix.hpp"
18 #include "Xpetra_CrsMatrixWrap.hpp"
20 #include "Xpetra_Map.hpp"
21 #include "Xpetra_BlockedMap.hpp"
22 #include "Xpetra_Vector.hpp"
23 #include "Xpetra_BlockedVector.hpp"
24 #include "Xpetra_Exceptions.hpp"
25 
26 namespace Xpetra {
27 
28 template <class Scalar,
29  class LocalOrdinal,
30  class GlobalOrdinal,
31  class Node>
33 #undef XPETRA_MATRIXFACTORY_SHORT
34 #include "Xpetra_UseShortNames.hpp"
35 
36  private:
39 
40  public:
43  static RCP<Matrix> Build(const RCP<const Map>& rowMap);
44 
46  static RCP<Matrix> Build(const RCP<const Map>& rowMap, size_t maxNumEntriesPerRow);
47 
49  static RCP<Matrix> Build(const RCP<const Map>& rowMap, const RCP<const Map>& colMap, size_t maxNumEntriesPerRow);
50 
52  static RCP<Matrix> Build(const RCP<const Map>& rowMap, const RCP<const Map>& colMap, const ArrayRCP<const size_t>& NumEntriesPerRowToAlloc);
53 
55  static RCP<Matrix> Build(
56  const Teuchos::RCP<const Map>& rowMap,
57  const Teuchos::RCP<const Map>& colMap,
59  const Teuchos::RCP<Teuchos::ParameterList>& params = null);
61  static RCP<Matrix> Build(
63  const Teuchos::RCP<const Map>& rowMap,
64  const Teuchos::RCP<const Map>& colMap,
65  const Teuchos::RCP<const Map>& domainMap = Teuchos::null,
66  const Teuchos::RCP<const Map>& rangeMap = Teuchos::null,
67  const Teuchos::RCP<Teuchos::ParameterList>& params = null);
68 
70  static RCP<Matrix> Build(const RCP<const Map>& rowMap, const ArrayRCP<const size_t>& NumEntriesPerRowToAlloc);
71 
73  static RCP<Matrix> Build(const RCP<const CrsGraph>& graph, const RCP<ParameterList>& paramList = Teuchos::null);
74 
76  static RCP<Matrix> Build(const RCP<const CrsGraph>& graph,
78  const RCP<ParameterList>& paramList = Teuchos::null);
79 
81  static RCP<Matrix> Build(const RCP<const Vector>& diagonal);
82 
84  static RCP<Matrix> Build(const RCP<const Matrix>& sourceMatrix, const Import& importer, const RCP<const Map>& domainMap = Teuchos::null, const RCP<const Map>& rangeMap = Teuchos::null, const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
85 
87  static RCP<Matrix> Build(const RCP<const Matrix>& sourceMatrix, const Export& exporter, const RCP<const Map>& domainMap, const RCP<const Map>& rangeMap, const Teuchos::RCP<Teuchos::ParameterList>& params);
88 
90  static RCP<Matrix> Build(const RCP<const Matrix>& sourceMatrix, const Import& RowImporter, const Import& DomainImporter, const RCP<const Map>& domainMap, const RCP<const Map>& rangeMap, const Teuchos::RCP<Teuchos::ParameterList>& params);
91 
93  static RCP<Matrix> Build(const RCP<const Matrix>& sourceMatrix, const Export& RowExporter, const Export& DomainExporter, const RCP<const Map>& domainMap = Teuchos::null, const RCP<const Map>& rangeMap = Teuchos::null, const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
94 
97  static RCP<Xpetra::Matrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> > BuildCopy(const RCP<const Xpetra::Matrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> > A, bool setFixedBlockSize = true);
98 };
99 #define XPETRA_MATRIXFACTORY_SHORT
100 
101 } // namespace Xpetra
102 
103 #define XPETRA_MATRIXFACTORY_SHORT
104 #endif // ifndef XPETRA_MATRIXFACTORY_DECL_HPP
static RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > BuildCopy(const RCP< const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > A, bool setFixedBlockSize=true)
static RCP< Matrix > Build(const RCP< const Map > &rowMap)
KokkosSparse::CrsMatrix< impl_scalar_type, LocalOrdinal, execution_space, void, typename local_graph_type::size_type > local_matrix_type
The specialization of Kokkos::CrsMatrix that represents the part of the sparse matrix on each MPI pro...
Xpetra-specific matrix class.
MatrixFactory()
Private constructor. This is a static class.