MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu_TentativePFactory_kokkos_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_TENTATIVEPFACTORY_KOKKOS_DECL_HPP
11#define MUELU_TENTATIVEPFACTORY_KOKKOS_DECL_HPP
12
13#include <Teuchos_ScalarTraits.hpp>
14#include <Tpetra_KokkosCompat_ClassicNodeAPI_Wrapper.hpp>
15
16#include <Xpetra_CrsGraphFactory_fwd.hpp>
17
18#include "MueLu_ConfigDefs.hpp"
19
22#include "MueLu_Level_fwd.hpp"
24#include "MueLu_PFactory.hpp"
26
27namespace MueLu {
28
67template <class Scalar = DefaultScalar,
70 class Node = DefaultNode>
72 public:
73 using execution_space = typename Node::execution_space;
74 using range_type = Kokkos::RangePolicy<LocalOrdinal, execution_space>;
75 using DeviceType = typename Node::device_type;
76
77 private:
78#undef MUELU_TENTATIVEPFACTORY_KOKKOS_SHORT
80
81 public:
83
84
87
91
92 RCP<const ParameterList> GetValidParameterList() const override;
93
95
96
97 void DeclareInput(Level& fineLevel, Level& coarseLevel) const override;
98
100
102
103
104 void Build(Level& fineLevel, Level& coarseLevel) const override;
105 void BuildP(Level& fineLevel, Level& coarseLevel) const override;
106
108
109 // NOTE: All of these should really be private, but CUDA doesn't like that
110
111 void BuildPuncoupled(Level& coarseLevel, RCP<Matrix> A, RCP<Aggregates> aggregates,
112 RCP<AmalgamationInfo> amalgInfo, RCP<MultiVector> fineNullspace,
113 RCP<const Map> coarseMap, RCP<Matrix>& Ptentative,
114 RCP<MultiVector>& coarseNullspace, int levelID) const;
115
116 void BuildPuncoupledBlockCrs(Level& coarseLevel, RCP<Matrix> A, RCP<Aggregates> aggregates, RCP<AmalgamationInfo> amalgInfo,
117 RCP<MultiVector> fineNullspace, RCP<const Map> coarsePointMap, RCP<Matrix>& Ptentative, RCP<MultiVector>& coarseNullspace, int levelID) const;
118
119 void BuildPcoupled(RCP<Matrix> A, RCP<Aggregates> aggregates,
120 RCP<AmalgamationInfo> amalgInfo, RCP<MultiVector> fineNullspace,
121 RCP<const Map> coarseMap, RCP<Matrix>& Ptentative,
122 RCP<MultiVector>& coarseNullspace) const;
123
124 mutable bool bTransferCoordinates_ = false;
125};
126
127} // namespace MueLu
128
129#define MUELU_TENTATIVEPFACTORY_KOKKOS_SHORT
130#endif // MUELU_TENTATIVEPFACTORY_KOKKOS_DECL_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
Class that holds all level-specific information.
Factory that provides an interface for a concrete implementation of a prolongation operator.
void DeclareInput(Level &fineLevel, Level &coarseLevel) const override
Input.
RCP< const ParameterList > GetValidParameterList() const override
Return a const parameter list of valid parameters that setParameterList() will accept.
TentativePFactory_kokkos()
Constructor.
void BuildP(Level &fineLevel, Level &coarseLevel) const override
Abstract Build method.
void BuildPuncoupled(Level &coarseLevel, RCP< Matrix > A, RCP< Aggregates > aggregates, RCP< AmalgamationInfo > amalgInfo, RCP< MultiVector > fineNullspace, RCP< const Map > coarseMap, RCP< Matrix > &Ptentative, RCP< MultiVector > &coarseNullspace, int levelID) const
~TentativePFactory_kokkos() override
Destructor.
void BuildPuncoupledBlockCrs(Level &coarseLevel, RCP< Matrix > A, RCP< Aggregates > aggregates, RCP< AmalgamationInfo > amalgInfo, RCP< MultiVector > fineNullspace, RCP< const Map > coarsePointMap, RCP< Matrix > &Ptentative, RCP< MultiVector > &coarseNullspace, int levelID) const
void BuildPcoupled(RCP< Matrix > A, RCP< Aggregates > aggregates, RCP< AmalgamationInfo > amalgInfo, RCP< MultiVector > fineNullspace, RCP< const Map > coarseMap, RCP< Matrix > &Ptentative, RCP< MultiVector > &coarseNullspace) const
void Build(Level &fineLevel, Level &coarseLevel) const override
Build an object with this factory.
Kokkos::RangePolicy< LocalOrdinal, execution_space > range_type
Namespace for MueLu classes and methods.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar