Debian Codegraph @

packages/muelu/src/Transfers/Energy-Minimization/Solvers/MueLu_SolverBase.hpp

raw
1 // @HEADER
2 // *****************************************************************************
3 // MueLu: A package for multigrid based preconditioning
4 //
5 // Copyright 2012 NTESS and the MueLu contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9
10 #ifndef MUELU_SOLVERBASE_HPP
11 #define MUELU_SOLVERBASE_HPP
12
13 #include <Xpetra_MultiVector_fwd.hpp>
14 #include <Xpetra_Matrix_fwd.hpp>
15
16 #include "MueLu_ConfigDefs.hpp"
17 #include "MueLu_BaseClass.hpp"
18 #include "MueLu_Constraint_fwd.hpp"
19
20 namespace MueLu {
21
22 /*!
23 @class SolverBase class.
24 @brief Base class for energy-minimization iterative solvers
25 */
26
27 template <class Scalar = DefaultScalar,
28 class LocalOrdinal = DefaultLocalOrdinal,
29 class GlobalOrdinal = DefaultGlobalOrdinal,
30 class Node = DefaultNode>
31 class SolverBase : public BaseClass {
32 #undef MUELU_SOLVERBASE_SHORT
33 #include "MueLu_UseShortNames.hpp"
34
35 public:
36 //@{ Constructors/Destructors.
37 SolverBase() {}
38
39 virtual ~SolverBase() {}
40 //@}
41
42 //! @name Iterate methods.
43 //@{
44
45 /*! Iterate
46 \param A -- Energy matrix
47 \param C -- Constraints
48 \param P0 -- Initial guess
49 \param P -- Resulting prolongator
50 \note We assume that P0 has correct sparsity pattern
51 */
52 virtual void Iterate(const Matrix& A, const Constraint& C, const Matrix& P0, RCP<Matrix>& P) const = 0;
53
54 //@}
55
56 }; // class SolverBase
57
58 } // namespace MueLu
59
60 #define MUELU_SOLVERBASE_SHORT
61
62 #endif // ifndef MUELU_SOLVERBASE_HPP