MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_RigidBodyModeFactory_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_RIGIDBODYMODEFACTORY_DECL_HPP
11 #define MUELU_RIGIDBODYMODEFACTORY_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 
31 template <class Scalar = DefaultScalar,
34  class Node = DefaultNode>
35 class RigidBodyModeFactory : public SingleLevelFactoryBase {
36 #undef MUELU_RIGIDBODYMODEFACTORY_SHORT
37 #include "MueLu_UseShortNames.hpp"
38 
39  public:
41 
42 
44  RigidBodyModeFactory(const int numPDEs)
45  : nspName_("Nullspace")
46  , numPDEs_(numPDEs) {}
48  RigidBodyModeFactory(const std::string &nspName = "Nullspace")
49  : nspName_(nspName)
50  , numPDEs_(3) {}
51 
53  virtual ~RigidBodyModeFactory();
54 
56 
58 
59 
65  void DeclareInput(Level &currentLevel) const;
66 
68 
70 
71 
73  void Build(Level &currentLevel) const;
74 
76  void setNumPDEs(int numPDEs) {
77  numPDEs_ = numPDEs;
78  }
79 
80  private:
82  std::string nspName_;
83 
84  int numPDEs_;
85 
86 }; // class RigidBodyModeFactory
87 
88 } // namespace MueLu
89 
90 #define MUELU_RIGIDBODYMODEFACTORY_SHORT
91 #endif // MUELU_RIGIDBODYMODEFACTORY_DECL_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
RigidBodyModeFactory(const int numPDEs)
Constructor.
MueLu::DefaultNode Node
std::string nspName_
name of nullspace vector on finest level
MueLu::DefaultScalar Scalar
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
void Build(Level &currentLevel) const
Build an object with this factory.
void DeclareInput(Level &currentLevel) const
Specifies the data that this class needs, and the factories that generate that data.
RigidBodyModeFactory(const std::string &nspName="Nullspace")
Constructor.