MueLu Version of the Day
Loading...
Searching...
No Matches
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>
14#include <Xpetra_VectorFactory_fwd.hpp>
15#include <Xpetra_MultiVectorFactory_fwd.hpp>
16
17#include "MueLu_ConfigDefs.hpp"
20
21#include "MueLu_Level_fwd.hpp"
22
23namespace MueLu {
24
31template <class Scalar = DefaultScalar,
34 class Node = DefaultNode>
36#undef MUELU_RIGIDBODYMODEFACTORY_SHORT
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
85
86}; // class RigidBodyModeFactory
87
88} // namespace MueLu
89
90#define MUELU_RIGIDBODYMODEFACTORY_SHORT
91#endif // MUELU_RIGIDBODYMODEFACTORY_DECL_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
Class that holds all level-specific information.
Nullspace Factory for building rigid body modes.
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.
RigidBodyModeFactory(const int numPDEs)
Constructor.
std::string nspName_
name of nullspace vector on finest level
Base class for factories that use one level (currentLevel).
Namespace for MueLu classes and methods.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar