MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_NoFactory.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_NOFACTORY_HPP
11 #define MUELU_NOFACTORY_HPP
12 
13 #include <algorithm> // for swap
14 #include "Teuchos_RCPDecl.hpp" // for RCP
15 #include "Teuchos_RCP.hpp" // for RCP::RCP<T>, RCP::operator=, etc
16 #include "MueLu_config.hpp" // for HAVE_MUELU_DEBUG
17 #include "MueLu_Exceptions.hpp"
18 #include "MueLu_FactoryBase.hpp"
19 #include "MueLu_Level_fwd.hpp"
20 
21 namespace MueLu {
22 
29 class NoFactory : public FactoryBase {
31  NoFactory();
32 
33  public:
35  virtual ~NoFactory();
36 
38 
39 
41  void CallBuild(Level& requestedLevel) const;
42 
44  void CallDeclareInput(Level& /* requestedLevel */) const;
45 
47 
49 
50 
52  static const RCP<const NoFactory> getRCP();
53 
55  static const NoFactory* get();
56 
58 #ifdef HAVE_MUELU_DEBUG
59  void ResetDebugData() const {}
60 #endif
61 
62  private:
63  static RCP<const NoFactory> noFactory_; // static NoFactory instance for user defined "factories"
64 
65 }; // class NoFactory
66 
67 } // namespace MueLu
68 
69 #endif // MUELU_NOFACTORY_HPP
void CallBuild(Level &requestedLevel) const
Implementation of FactoryBase interface.
void CallDeclareInput(Level &) const
Base class for factories (e.g., R, P, and A_coarse).
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
virtual ~NoFactory()
Destructor.
NoFactory()
Constructor.
static const RCP< const NoFactory > getRCP()
Static Get() functions.
static RCP< const NoFactory > noFactory_
NoFactory that is used for data stored in level class for that no generating factory is available/nec...