MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_CoupledRBMFactory_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_COUPLEDRBMFACTORY_DECL_HPP
11 #define MUELU_COUPLEDRBMFACTORY_DECL_HPP
12 
13 #include <Xpetra_Matrix_fwd.hpp>
16 
17 #include "MueLu_ConfigDefs.hpp"
20 
21 #include "MueLu_Level_fwd.hpp"
22 
23 namespace MueLu {
24 
34 template <class Scalar = DefaultScalar,
37  class Node = DefaultNode>
38 class CoupledRBMFactory : public SingleLevelFactoryBase {
39 #undef MUELU_COUPLEDRBMFACTORY_SHORT
40 #include "MueLu_UseShortNames.hpp"
41 
42  public:
44 
45  CoupledRBMFactory(const int numPDEs)
47  : nspName_("Nullspace")
48  , numPDEs_(numPDEs) {}
50  CoupledRBMFactory(const std::string& nspName = "Nullspace")
51  : nspName_(nspName)
52  , numPDEs_(3) {}
53 
55  virtual ~CoupledRBMFactory();
56 
58 
60 
61 
67  void DeclareInput(Level& currentLevel) const;
68 
70 
72 
73 
75  void Build(Level& currentLevel) const;
76 
77  void BuildRBM(RCP<Matrix>& A, RCP<MultiVector>& Coords, RCP<MultiVector>& nullspace) const;
78 
80  void setNumPDEs(int numPDEs) {
81  numPDEs_ = numPDEs;
82  }
83 
84  void setLastAcousticDOF(int lastDOF) {
85  lastAcousticDOF_ = lastDOF;
86  }
87 
88  private:
90  std::string nspName_;
91 
92  int numPDEs_;
93 
95 
96 }; // class CoupledRBMFactory
97 
98 } // namespace MueLu
99 
100 #define MUELU_COUPLEDRBMFACTORY_SHORT
101 #endif // MUELU_COUPLEDRBMFACTORY_DECL_HPP
std::string nspName_
name of nullspace vector on finest level
MueLu::DefaultLocalOrdinal LocalOrdinal
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
void DeclareInput(Level &currentLevel) const
Specifies the data that this class needs, and the factories that generate that data.
void Build(Level &currentLevel) const
Build an object with this factory.
MueLu::DefaultNode Node
void BuildRBM(RCP< Matrix > &A, RCP< MultiVector > &Coords, RCP< MultiVector > &nullspace) const
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 ~CoupledRBMFactory()
Destructor.
CoupledRBMFactory(const std::string &nspName="Nullspace")
Constructor.
CoupledRBMFactory(const int numPDEs)
Constructor.