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_PFactory.hpp"
21
22#include "MueLu_Level_fwd.hpp"
23#include <type_traits>
24
25namespace MueLuTests {
26// Forward declaration of friend tester class used to UnitTest CombinePFactory
27template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
29} // namespace MueLuTests
30
31namespace MueLu {
32
33namespace Details {
34
64template <class Scalar, class LO, class GO, class Node>
65struct has_build_p_blocked_thyra_eti : std::false_type {};
66} // namespace Details
67
126template <class Scalar = DefaultScalar,
129 class Node = DefaultNode>
130class CombinePFactory : public PFactory {
131#undef MUELU_COMBINEPFACTORY_SHORT
133
134 public:
136
138
139
142
144 virtual ~CombinePFactory() {}
146
147 RCP<const ParameterList> GetValidParameterList() const;
148
150
151
152 void DeclareInput(Level& fineLevel, Level& coarseLevel) const;
153
155
157
158
159 void Build(Level& fineLevel, Level& coarseLevel) const;
160 void BuildP(Level& fineLevel, Level& coarseLevel) const;
161
163
164 private:
165 void BuildPBlocked(Level& fineLevel, Level& coarseLevel) const;
166 void BuildPBlockedImpl(Level& fineLevel, Level& coarseLevel, std::false_type) const;
167#if defined(HAVE_XPETRA_THYRA) && defined(HAVE_MUELU_THYRA)
168 template <class S = Scalar,
169 std::enable_if_t<
171 S, LocalOrdinal, GlobalOrdinal, Node>::value,
172 int> = 0>
173 void BuildPBlockedImpl(Level& fineLevel, Level& coarseLevel, std::true_type) const;
174#endif
176
177}; // class CombinePFactory
178
179} // namespace MueLu
180
181#define MUELU_COMBINEPFACTORY_SHORT
182#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 ...