MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu_FactoryManagerBase.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_FACTORYMANAGERBASE_HPP
11#define MUELU_FACTORYMANAGERBASE_HPP
12
13#include <string>
14
15#include "MueLu_ConfigDefs.hpp"
16#include "MueLu_BaseClass.hpp"
17
19
20namespace MueLu {
21
28 public:
32
35
37
39
41 // Return ref because user also give ref to the Hierarchy.
42 const virtual RCP<const FactoryBase> GetFactory(const std::string& varName) const = 0;
44
46 // Return true if Factory associated with varName is registered
47 virtual bool hasFactory(const std::string& varName) const = 0;
48
49 // Free temporarily hold data at the end of Hierarchy::Setup()
50 // This method is const because the clean concerns only mutable data.
51 virtual void Clean() const {} // TODO: should be used inside of MueLu::Hierarchy
52
53#ifdef HAVE_MUELU_DEBUG
54 virtual void ResetDebugData() const = 0;
55#endif
56
58 bool IgnoreUserData() const { return bIgnoreUserData_; }
59
61 void SetIgnoreUserData(bool bIgnoreUserData = false) { bIgnoreUserData_ = bIgnoreUserData; }
62
63 private:
69
70}; // class FactoryManagerBase
71
72} // namespace MueLu
73
74#define MUELU_FACTORYMANAGERBASE_SHORT
75#endif // ifndef MUELU_FACTORYMANAGERBASE_HPP
Base class for MueLu classes.
Class that provides default factories within Needs class.
virtual const RCP< const FactoryBase > GetFactory(const std::string &varName) const =0
Get.
void SetIgnoreUserData(bool bIgnoreUserData=false)
set IgnoreUserData flag
virtual bool hasFactory(const std::string &varName) const =0
Check.
bool IgnoreUserData() const
get IgnoreUserData flag
Namespace for MueLu classes and methods.