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_MatrixFactory_fwd.hpp>
16#include <Xpetra_Matrix_fwd.hpp>
17#include <Xpetra_MatrixUtils_fwd.hpp>
18
19#include "MueLu_ConfigDefs.hpp"
20
22
24#include "MueLu_Level_fwd.hpp"
28
29namespace MueLu {
34template <class Scalar = DefaultScalar,
37 class Node = DefaultNode>
39#undef MUELU_RAPFACTORY_SHORT
41
42 public:
44
45
46 RAPFactory();
47
48 virtual ~RAPFactory();
49
51
53
54
55 RCP<const ParameterList> GetValidParameterList() const;
56
57 void DeclareInput(Level& fineLevel, Level& coarseLevel) const;
58
60
62
63 void Build(Level& fineLevel, Level& coarseLevel) const;
65
67
72 void AddTransferFactory(const RCP<const FactoryBase>& factory);
73
74 // TODO add a function to remove a specific transfer factory?
75
77 size_t NumTransferFactories() const { return transferFacts_.size(); }
78
80
81 private:
83
84 mutable bool hasDeclaredInput_;
85
87
89
91 std::vector<RCP<const FactoryBase> > transferFacts_;
92
94
95}; // class RAPFactory
96
97} // namespace MueLu
98
99#define MUELU_RAPFACTORY_SHORT
100#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