MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_InverseApproximationFactory_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_INVERSEAPPROXIMATIONFACTORY_DECL_HPP_
11 #define MUELU_INVERSEAPPROXIMATIONFACTORY_DECL_HPP_
12 
13 #include "MueLu_ConfigDefs.hpp"
14 
16 
17 #include <Xpetra_CrsMatrix_fwd.hpp>
18 #include <Xpetra_Map_fwd.hpp>
19 
22 #include "MueLu_Utilities_fwd.hpp"
23 
24 namespace MueLu {
25 
59 template <class Scalar = DefaultScalar,
62  class Node = DefaultNode>
64 #undef MUELU_INVERSEAPPROXIMATIONFACTORY_SHORT
65 #include "MueLu_UseShortNames.hpp"
66 
67  public:
69 
70 
72  InverseApproximationFactory() = default;
73 
75 
76 
77  void DeclareInput(Level& currentLevel) const;
78 
80 
82 
84 
87  void Build(Level& currentLevel) const;
88 
90 
91  private:
93  RCP<Matrix> GetSparseInverse(const RCP<Matrix>& A, const RCP<const CrsGraph>& sparsityPattern) const;
94 
95 }; // class InverseApproximationFactory
96 
97 } // namespace MueLu
98 
99 #define MUELU_INVERSEAPPROXIMATIONFACTORY_SHORT
100 #endif /* MUELU_INVERSEAPPROXIMATIONFACTORY_DECL_HPP_ */
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
MueLu::DefaultLocalOrdinal LocalOrdinal
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
InverseApproximationFactory()=default
Constructor.
void Build(Level &currentLevel) const
Build an object with this factory.
MueLu::DefaultNode Node
Factory for building the approximate inverse of a matrix.
MueLu::DefaultScalar Scalar
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
RCP< Matrix > GetSparseInverse(const RCP< Matrix > &A, const RCP< const CrsGraph > &sparsityPattern) const
Sparse inverse calculation method.
void DeclareInput(Level &currentLevel) const
Input.
Base class for factories that use one level (currentLevel).