MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu_LocalOrdinalTransferFactory_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_LOCALORDINALTRANSFER_FACTORY_DECL_HPP
11#define MUELU_LOCALORDINALTRANSFER_FACTORY_DECL_HPP
12
13#include "MueLu_ConfigDefs.hpp"
15#include "Xpetra_MultiVector_fwd.hpp"
16#include "Xpetra_CrsGraph_fwd.hpp"
17
19
20namespace MueLu {
21
57template <class LocalOrdinal = DefaultLocalOrdinal,
59 class Node = DefaultNode>
61#undef MUELU_LOCALORDINALTRANSFERFACTORY_SHORT
63
64 public:
66
67
68 // Default constructor is distabled
70
79 LocalOrdinalTransferFactory(const std::string &TransferVecName, const std::string &mode)
80 : TransferVecName_(TransferVecName) {
81 if (mode == "classical")
82 useAggregatesMode_ = false;
83 else
84 useAggregatesMode_ = true;
85 }
86
89
90 RCP<const ParameterList> GetValidParameterList() const;
91
93
95
96
102 void DeclareInput(Level &finelevel, Level &coarseLevel) const;
103
105
107
108
110 void Build(Level &fineLevel, Level &coarseLevel) const;
111
113
114 private:
115 void BuildAggregates(Level &fineLevel, Level &coarseLevel) const;
116
117 void BuildFC(Level &fineLevel, Level &coarseLevel) const;
118
121
123 std::string TransferVecName_;
124
125}; // class LocalOrdinalTransferFactory
126
127} // namespace MueLu
128
129#define MUELU_LOCALORDINALTRANSFERFACTORY_SHORT
130#endif // MUELU_LOCALORDINALTRANSFER_FACTORY_DECL_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
Class that holds all level-specific information.
Class for transferring a vector of local ordinals from a finer level to a coarser one,...
std::string TransferVecName_
The name for the vector to be transfered. This allows us to have multiple factories for different var...
void BuildFC(Level &fineLevel, Level &coarseLevel) const
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
LocalOrdinalTransferFactory(const std::string &TransferVecName, const std::string &mode)
Constructor.
void Build(Level &fineLevel, Level &coarseLevel) const
Build an object with this factory.
void BuildAggregates(Level &fineLevel, Level &coarseLevel) const
void DeclareInput(Level &finelevel, Level &coarseLevel) const
Specifies the data that this class needs, and the factories that generate that data.
bool useAggregatesMode_
Use aggregates mode (as opposed to FC mode)
Base class for factories that use two levels (fineLevel and coarseLevel).
Namespace for MueLu classes and methods.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode