MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_BlockedDirectSolver_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 /*
11  * MueLu_BlockedDirectSolver_decl.hpp
12  *
13  * Created on: 09.02.2014
14  * Author: tobias
15  */
16 
17 #ifndef MUELU_BLOCKEDDIRECTSOLVER_DECL_HPP_
18 #define MUELU_BLOCKEDDIRECTSOLVER_DECL_HPP_
19 
20 #include "MueLu_ConfigDefs.hpp"
21 
23 
25 
27 #include "MueLu_SmootherPrototype.hpp"
31 
32 namespace MueLu {
33 
42 template <class Scalar = SmootherPrototype<>::scalar_type,
43  class LocalOrdinal = typename SmootherPrototype<Scalar>::local_ordinal_type,
44  class GlobalOrdinal = typename SmootherPrototype<Scalar, LocalOrdinal>::global_ordinal_type,
45  class Node = typename SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
46 class BlockedDirectSolver : public SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
48 
49 #undef MUELU_BLOCKEDDIRECTSOLVER_SHORT
50 #include "MueLu_UseShortNames.hpp"
51 
52  public:
54 
55 
58  BlockedDirectSolver(const std::string& type = "", const Teuchos::ParameterList& paramList = Teuchos::ParameterList());
59 
61  virtual ~BlockedDirectSolver() {}
63 
65 
67 
68  void DeclareInput(Level& currentLevel) const;
70 
72 
73 
77  void Setup(Level& currentLevel);
78 
85  void Apply(MultiVector& X, const MultiVector& B, bool InitialGuessIsZero = false) const;
87 
89 
91 
92 
94  std::string description() const;
95 
97  // using MueLu::Describable::describe; // overloading, not hiding
98  void print(Teuchos::FancyOStream& out, const VerbLevel verbLevel = Default) const;
99 
101  size_t getNodeSmootherComplexity() const;
102 
104 
105  private:
107  std::string type_;
108 
111 
113  RCP<DirectSolver> s_; // solver object
114 
116  RCP<Matrix> A_; // < ! internal blocked operator "A" generated by AFact_
117 
118 }; // class BlockedDirectSolver
119 
120 } // namespace MueLu
121 
122 #define MUELU_BLOCKEDDIRECTSOLVER_SHORT
123 
124 #endif /* MUELU_BLOCKEDDIRECTSOLVER_DECL_HPP_ */
void Setup(Level &currentLevel)
Setup routine Call the underlaying Setup routine of the nested direct solver once the input block mat...
MueLu::DefaultLocalOrdinal LocalOrdinal
BlockedDirectSolver(const std::string &type="", const Teuchos::ParameterList &paramList=Teuchos::ParameterList())
Constructor.
void DeclareInput(Level &currentLevel) const
Input.
Base class for smoother prototypes.
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node > MapExtractorClass
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the direct solver. Solves the linear system AX=B using the constructed solver.
RCP< const ParameterList > GetValidParameterList() const
Input.
std::string description() const
Return a simple one-line description of this object.
MueLu::DefaultNode Node
RCP< MergedBlockedMatrixFactory > MergedAFact_
Factory to generate merged block matrix.
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
RCP< SmootherPrototype > Copy() const
direct solver for nxn blocked matrices
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
RCP< DirectSolver > s_
Direct solver.