MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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"
16 #include "Xpetra_CrsGraph_fwd.hpp"
17 
19 
20 namespace MueLu {
21 
57 template <class LocalOrdinal = DefaultLocalOrdinal,
59  class Node = DefaultNode>
61 #undef MUELU_LOCALORDINALTRANSFERFACTORY_SHORT
63 
64  public:
66 
67 
68  // Default constructor is distabled
69  LocalOrdinalTransferFactory() = delete;
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 
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
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
MueLu::DefaultLocalOrdinal LocalOrdinal
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
bool useAggregatesMode_
Use aggregates mode (as opposed to FC mode)
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
void DeclareInput(Level &finelevel, Level &coarseLevel) const
Specifies the data that this class needs, and the factories that generate that data.
Class for transferring a vector of local ordinals from a finer level to a coarser one...
Base class for factories that use two levels (fineLevel and coarseLevel).
MueLu::DefaultNode Node
void Build(Level &fineLevel, Level &coarseLevel) const
Build an object with this factory.
void BuildAggregates(Level &fineLevel, Level &coarseLevel) const
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
LocalOrdinalTransferFactory(const std::string &TransferVecName, const std::string &mode)
Constructor.