MueLu Version of the Day
Loading...
Searching...
No Matches
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
24namespace MueLu {
25
68template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
70#undef MUELU_STRUCTUREDAGGREGATIONFACTORY_SHORT
72
73 public:
75
76
79
82
83 RCP<const ParameterList> GetValidParameterList() const;
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 */
virtual void SetFactory(const std::string &varName, const RCP< const FactoryBase > &factory)
Configuration.
Class that holds all level-specific information.
void SetParameter(const std::string &name, const ParameterEntry &entry)
Set a parameter directly as a ParameterEntry.
Base class for factories that use one level (currentLevel).
Factory for building aggregates on structured grids.
void SetOnePtMapName(const std::string name, Teuchos::RCP< const FactoryBase > mapFact)
void Build(Level &currentLevel) const
Build aggregates.
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
Namespace for MueLu classes and methods.