MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_RAPFactory_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_RAPFACTORY_DECL_HPP
11 #define MUELU_RAPFACTORY_DECL_HPP
12 
13 #include <string>
14 
16 #include <Xpetra_Matrix_fwd.hpp>
18 
19 #include "MueLu_ConfigDefs.hpp"
20 
21 #include "MueLu_RAPFactory_fwd.hpp"
22 
24 #include "MueLu_Level_fwd.hpp"
25 #include "MueLu_PerfUtils_fwd.hpp"
27 #include "MueLu_Utilities_fwd.hpp"
28 
29 namespace MueLu {
34 template <class Scalar = DefaultScalar,
37  class Node = DefaultNode>
39 #undef MUELU_RAPFACTORY_SHORT
40 #include "MueLu_UseShortNames.hpp"
41 
42  public:
44 
45 
46  RAPFactory();
47 
48  virtual ~RAPFactory();
49 
51 
53 
54 
56 
57  void DeclareInput(Level& fineLevel, Level& coarseLevel) const;
58 
60 
62 
63  void Build(Level& fineLevel, Level& coarseLevel) const;
65 
67 
72  void AddTransferFactory(const RCP<const FactoryBase>& factory);
73 
74  // TODO add a function to remove a specific transfer factory?
75 
77  size_t NumTransferFactories() const { return transferFacts_.size(); }
78 
80 
81  private:
83 
84  mutable bool hasDeclaredInput_;
85 
87 
89 
91  std::vector<RCP<const FactoryBase> > transferFacts_;
92 
94 
95 }; // class RAPFactory
96 
97 } // namespace MueLu
98 
99 #define MUELU_RAPFACTORY_SHORT
100 #endif // MUELU_RAPFACTORY_DECL_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
std::vector< RCP< const FactoryBase > > transferFacts_
list of user-defined transfer Factories
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
Base class for factories that use two levels (fineLevel and coarseLevel).
void AddTransferFactory(const RCP< const FactoryBase > &factory)
Add transfer factory in the end of list of transfer factories in RepartitionAcFactory.
MueLu::DefaultNode Node
MueLu::DefaultScalar Scalar
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
virtual ~RAPFactory()
size_t NumTransferFactories() const
Returns number of transfer factories.
Factory for building coarse matrices.
void Build(Level &fineLevel, Level &coarseLevel) const
Build an object with this factory.
void DeclareInput(Level &fineLevel, Level &coarseLevel) const
Input.