MueLu Version of the Day
Loading...
Searching...
No Matches
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
19
20namespace MueLu {
21
23template <class Scalar = DefaultScalar,
26 class Node = DefaultNode>
28#undef MUELU_HIERARCHYFACTORY_SHORT
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
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
Base class for MueLu classes.
virtual void SetupHierarchy(Hierarchy &H) const =0
Setup Hierarchy object.
virtual RCP< Hierarchy > CreateHierarchy() const =0
Create an empty Hierarchy object.
virtual RCP< Hierarchy > CreateHierarchy(const std::string &label) const =0
Create a labeled empty Hierarchy object.
virtual ~HierarchyFactory()
Destructor.
Provides methods to build a multigrid hierarchy and apply multigrid cycles.
Namespace for MueLu classes and methods.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar