MueLu Version of the Day
Loading...
Searching...
No Matches
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
22#include <Teuchos_ParameterList.hpp>
23
24#include <Xpetra_MapExtractor_fwd.hpp>
25
27#include "MueLu_SmootherPrototype.hpp"
31
32namespace MueLu {
33
42template <class Scalar = SmootherPrototype<>::scalar_type,
46class BlockedDirectSolver : public SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
47 typedef Xpetra::MapExtractor<Scalar, LocalOrdinal, GlobalOrdinal, Node> MapExtractorClass;
48
49#undef MUELU_BLOCKEDDIRECTSOLVER_SHORT
51
52 public:
54
55
58 BlockedDirectSolver(const std::string& type = "", const Teuchos::ParameterList& paramList = Teuchos::ParameterList());
59
63
65
66 RCP<const ParameterList> GetValidParameterList() const;
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
88 RCP<SmootherPrototype> Copy() const;
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
110 RCP<MergedBlockedMatrixFactory> MergedAFact_;
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_ */
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
direct solver for nxn blocked matrices
void Setup(Level &currentLevel)
Setup routine Call the underlaying Setup routine of the nested direct solver once the input block mat...
RCP< const ParameterList > GetValidParameterList() const
Input.
void DeclareInput(Level &currentLevel) const
Input.
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node > MapExtractorClass
RCP< DirectSolver > s_
Direct solver.
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.
std::string description() const
Return a simple one-line description of this object.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
RCP< MergedBlockedMatrixFactory > MergedAFact_
Factory to generate merged block matrix.
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
RCP< SmootherPrototype > Copy() const
Class that holds all level-specific information.
Base class for smoother prototypes.
Namespace for MueLu classes and methods.