MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_StructuredAggregationFactory_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_STRUCTUREDAGGREGATIONFACTORY_DECL_HPP
11 #define MUELU_STRUCTUREDAGGREGATIONFACTORY_DECL_HPP
12 
13 // #include <Xpetra_Map_fwd.hpp>
14 // #include <Xpetra_CrsGraph_fwd.hpp>
15 // #include <Xpetra_CrsGraphFactory.hpp>
16 
17 #include "MueLu_ConfigDefs.hpp"
20 #include "MueLu_Level_fwd.hpp"
21 #include "MueLu_Exceptions.hpp"
23 
24 namespace MueLu {
25 
68 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
70 #undef MUELU_STRUCTUREDAGGREGATIONFACTORY_SHORT
71 #include "MueLu_UseShortNames.hpp"
72 
73  public:
75 
76 
79 
82 
84 
86 
88 
89  // set information about 1-node aggregates (map name and generating factory)
90  void SetOnePtMapName(const std::string name, Teuchos::RCP<const FactoryBase> mapFact) {
91  SetParameter("OnePt aggregate map name", ParameterEntry(std::string(name))); // revalidate
92  SetFactory("OnePt aggregate map factory", mapFact);
93  }
94 
96 
98 
99 
100  void DeclareInput(Level& currentLevel) const;
101 
103 
105 
106 
108  void Build(Level& currentLevel) const;
109 
111 
112  private:
116  mutable bool bDefinitionPhase_;
117 
118 }; // class StructuredAggregationFactory
119 
120 } // namespace MueLu
121 
122 #define MUELU_STRUCTUREDAGGREGATIONFACTORY_SHORT
123 #endif /* MUELU_STRUCTUREDAGGREGATIONFACTORY_DECL_HPP */
Factory for building aggregates on structured grids.
virtual void SetFactory(const std::string &varName, const RCP< const FactoryBase > &factory)
Configuration.
void DeclareInput(Level &currentLevel) const
Input.
void SetOnePtMapName(const std::string name, Teuchos::RCP< const FactoryBase > mapFact)
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
void SetParameter(const std::string &name, const ParameterEntry &entry)
Set a parameter directly as a ParameterEntry.
void Build(Level &currentLevel) const
Build aggregates.
Base class for factories that use one level (currentLevel).