MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_HierarchyFactory.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_HIERARCHYFACTORY_HPP
11 #define MUELU_HIERARCHYFACTORY_HPP
12 
13 #include "Teuchos_RCP.hpp"
14 
15 #include "MueLu_ConfigDefs.hpp"
16 #include "MueLu_BaseClass.hpp"
17 
18 #include "MueLu_Hierarchy_fwd.hpp"
19 
20 namespace MueLu {
21 
23 template <class Scalar = DefaultScalar,
26  class Node = DefaultNode>
27 class HierarchyFactory : public BaseClass {
28 #undef MUELU_HIERARCHYFACTORY_SHORT
29 #include "MueLu_UseShortNames.hpp"
30 
31  public:
33 
35  virtual ~HierarchyFactory() {}
36 
38 
40  // Note: This function is not very useful at the moment as MueLu only have on Hierarchy class.
41  // In the future, we might have an abstract Hierarchy class and several derived Hierarchy classes.
42  // Using this function will then be the recommended way to generate a Hierarchy.
43  //
44  // This method is called Create() instead of Build(), because it return an non-initialized
45  // object (ie: MG setup is not done).
46  // Build() function in MueLu returns initialized objects.
47  virtual RCP<Hierarchy> CreateHierarchy() const = 0;
48 
50  virtual RCP<Hierarchy> CreateHierarchy(const std::string& label) const = 0;
51 
53  virtual void SetupHierarchy(Hierarchy& H) const = 0;
54 
55 }; // class HierarchyFactoryBase
56 
57 } // namespace MueLu
58 
59 #define MUELU_HIERARCHYFACTORY_SHORT
60 #endif // ifndef MUELU_HIERARCHYFACTORY_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
MueLu::DefaultNode Node
virtual ~HierarchyFactory()
Destructor.
virtual RCP< Hierarchy > CreateHierarchy() const =0
Create an empty Hierarchy object.
MueLu::DefaultScalar Scalar
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Base class for MueLu classes.
virtual void SetupHierarchy(Hierarchy &H) const =0
Setup Hierarchy object.
Provides methods to build a multigrid hierarchy and apply multigrid cycles.