MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_SteepestDescentSolver_decl.hpp
Go to the documentation of this file.
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_STEEPESTDESCENTSOLVER_DECL_HPP
11 #define MUELU_STEEPESTDESCENTSOLVER_DECL_HPP
12 
13 #include <Xpetra_Matrix_fwd.hpp>
16 
17 #include "MueLu_ConfigDefs.hpp"
18 #include "MueLu_Utilities_fwd.hpp"
19 #include "MueLu_SolverBase.hpp"
20 #include "MueLu_Constraint_fwd.hpp"
21 
22 namespace MueLu {
23 
29 template <class Scalar = DefaultScalar,
32  class Node = DefaultNode>
33 class SteepestDescentSolver : public SolverBase<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
34 #undef MUELU_STEEPESTDESCENTSOLVER_SHORT
35 #include "MueLu_UseShortNames.hpp"
36 
37  public:
39 
40 
46 
48 
50 
51 
53  void Iterate(const Matrix& A, const Constraint& C, const Matrix& P0, RCP<Matrix>& P) const;
54 
56 
57  private:
58  size_t nIts_;
60 };
61 
62 } // namespace MueLu
63 
64 #define MUELU_STEEPESTDESCENTSOLVER_SHORT
65 #endif // MUELU_STEEPESTDESCENTSOLVER_DECL_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Constraint space information for the potential prolongator.
size_t nIts_
Number of performed iterations.
MueLu::DefaultNode Node
MueLu::DefaultScalar Scalar
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Scalar SC
Implements steepest descent algorithm for energy-minimization.
void Iterate(const Matrix &A, const Constraint &C, const Matrix &P0, RCP< Matrix > &P) const
Iterate.
SC stepLength_
Modifier of the step length.
SteepestDescentSolver(size_t Its, SC StepLength=Teuchos::ScalarTraits< Scalar >::one())
Base class for energy-minimization iterative solvers.