MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu_RAPFactory_decl.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_RAPFACTORY_DECL_HPP
11#define MUELU_RAPFACTORY_DECL_HPP
12
13#include <string>
14
15#include <Xpetra_Matrix_fwd.hpp>
16
17#include "MueLu_ConfigDefs.hpp"
18
20
22#include "MueLu_Level_fwd.hpp"
25#include "Xpetra_MatrixUtils_fwd.hpp"
26
27namespace MueLu {
32template <class Scalar = DefaultScalar,
35 class Node = DefaultNode>
37#undef MUELU_RAPFACTORY_SHORT
39
40 public:
42
43
44 RAPFactory();
45
46 virtual ~RAPFactory();
47
49
51
52
53 RCP<const ParameterList> GetValidParameterList() const;
54
55 void DeclareInput(Level& fineLevel, Level& coarseLevel) const;
56
58
60
61 void Build(Level& fineLevel, Level& coarseLevel) const;
63
65
70 void AddTransferFactory(const RCP<const FactoryBase>& factory);
71
72 // TODO add a function to remove a specific transfer factory?
73
75 size_t NumTransferFactories() const { return transferFacts_.size(); }
76
78
79 private:
81
82 mutable bool hasDeclaredInput_;
83
85
87
89 std::vector<RCP<const FactoryBase> > transferFacts_;
90
92
93}; // class RAPFactory
94
95} // namespace MueLu
96
97#define MUELU_RAPFACTORY_SHORT
98#endif // MUELU_RAPFACTORY_DECL_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
Class that holds all level-specific information.
Factory for building coarse matrices.
std::vector< RCP< const FactoryBase > > transferFacts_
list of user-defined transfer Factories
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
virtual ~RAPFactory()
void DeclareInput(Level &fineLevel, Level &coarseLevel) const
Input.
size_t NumTransferFactories() const
Returns number of transfer factories.
void AddTransferFactory(const RCP< const FactoryBase > &factory)
Add transfer factory in the end of list of transfer factories in RepartitionAcFactory.
void Build(Level &fineLevel, Level &coarseLevel) const
Build an object with this factory.
Base class for factories that use two levels (fineLevel and coarseLevel).
Namespace for MueLu classes and methods.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar