MueLu Version of the Day
Loading...
Searching...
No Matches
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
21namespace MueLu {
22
29class NoFactory : public FactoryBase {
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
Base class for factories (e.g., R, P, and A_coarse).
Class that holds all level-specific information.
NoFactory that is used for data stored in level class for that no generating factory is available/nec...
static RCP< const NoFactory > noFactory_
NoFactory()
Constructor.
static const RCP< const NoFactory > getRCP()
Static Get() functions.
void CallBuild(Level &requestedLevel) const
Implementation of FactoryBase interface.
void CallDeclareInput(Level &) const
static const NoFactory * get()
virtual ~NoFactory()
Destructor.
Namespace for MueLu classes and methods.