MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu_CombinePFactory_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_COMBINEPFACTORY_DECL_HPP
11#define MUELU_COMBINEPFACTORY_DECL_HPP
12
13#include "MueLu_ConfigDefs.hpp"
14#include <Teuchos_SerialDenseVector.hpp>
15
16#include <Xpetra_MultiVector.hpp>
17#include <Xpetra_Matrix_fwd.hpp>
18
19#include "MueLu_ConfigDefs.hpp"
20#include "MueLu_PFactory.hpp"
22
23#include "MueLu_Level_fwd.hpp"
24#include <type_traits>
25
26namespace MueLuTests {
27// Forward declaration of friend tester class used to UnitTest CombinePFactory
28template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
30} // namespace MueLuTests
31
32namespace MueLu {
33
34namespace Details {
35
65template <class Scalar, class LO, class GO, class Node>
66struct has_build_p_blocked_thyra_eti : std::false_type {};
67} // namespace Details
68
127template <class Scalar = DefaultScalar,
130 class Node = DefaultNode>
131class CombinePFactory : public PFactory {
132#undef MUELU_COMBINEPFACTORY_SHORT
134
135 public:
137
139
140
143
145 virtual ~CombinePFactory() {}
147
148 RCP<const ParameterList> GetValidParameterList() const;
149
151
152
153 void DeclareInput(Level& fineLevel, Level& coarseLevel) const;
154
156
158
159
160 void Build(Level& fineLevel, Level& coarseLevel) const;
161 void BuildP(Level& fineLevel, Level& coarseLevel) const;
162
164
165 private:
166 void BuildPBlocked(Level& fineLevel, Level& coarseLevel) const;
167 void BuildPBlockedImpl(Level& fineLevel, Level& coarseLevel, std::false_type) const;
168#if defined(HAVE_XPETRA_THYRA) && defined(HAVE_MUELU_THYRA)
169 template <class S = Scalar,
170 std::enable_if_t<
172 S, LocalOrdinal, GlobalOrdinal, Node>::value,
173 int> = 0>
174 void BuildPBlockedImpl(Level& fineLevel, Level& coarseLevel, std::true_type) const;
175#endif
177
178}; // class CombinePFactory
179
180} // namespace MueLu
181
182#define MUELU_COMBINEPFACTORY_SHORT
183#endif // MUELU_COMBINEPFACTORY_DECL_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
Prolongator factory that replicates 'Psubblock' matrix to create new prolongator suitable for PDE sys...
void Build(Level &fineLevel, Level &coarseLevel) const
Build an object with this factory.
void BuildP(Level &fineLevel, Level &coarseLevel) const
Abstract Build method.
void BuildPBlocked(Level &fineLevel, Level &coarseLevel) const
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
void BuildPBlockedImpl(Level &fineLevel, Level &coarseLevel, std::false_type) const
void DeclareInput(Level &fineLevel, Level &coarseLevel) const
Input.
Class that holds all level-specific information.
Factory that provides an interface for a concrete implementation of a prolongation operator.
Namespace for MueLu classes and methods.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar
Compile-time trait indicating whether CombinePFactory::BuildPBlocked may use its Thyra-based blocked ...