MueLu
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
MueLu_MatrixFreeTentativeP_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_MATRIXFREETENTATIVEP_DECL_HPP
11
#define MUELU_MATRIXFREETENTATIVEP_DECL_HPP
12
13
#include "
MueLu_ConfigDefs.hpp
"
14
15
#include "
MueLu_MatrixFreeTentativeP_fwd.hpp
"
16
17
#include <Tpetra_KokkosCompat_ClassicNodeAPI_Wrapper.hpp>
18
19
#include <Teuchos_BLAS_types.hpp>
20
#include "Teuchos_ScalarTraits.hpp"
21
22
#include "
MueLu_Aggregates_fwd.hpp
"
23
#include "Xpetra_Map_fwd.hpp"
24
#include "Xpetra_MultiVector_fwd.hpp"
25
#include "Xpetra_Operator_fwd.hpp"
26
27
namespace
MueLu
{
28
33
// template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
34
// class MatrixFreeTentativeP;
35
36
template
<
class
Scalar,
class
LocalOrdinal,
class
GlobalOrdinal,
class
Node>
37
class
MatrixFreeTentativeP
:
public
Xpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
38
public
:
39
typedef
LocalOrdinal
local_ordinal_type
;
40
typedef
GlobalOrdinal
global_ordinal_type
;
41
typedef
typename
Node::execution_space
execution_space
;
42
typedef
Kokkos::RangePolicy<local_ordinal_type, execution_space>
range_type
;
43
typedef
Kokkos::MDRangePolicy<local_ordinal_type, execution_space, Kokkos::Rank<2>>
md_range_type
;
44
typedef
Node
node_type
;
45
typedef
typename
Teuchos::ScalarTraits<Scalar>::coordinateType
real_type
;
46
47
private
:
48
#undef MUELU_MATRIXFREETENTATIVEP_SHORT
49
#include "
MueLu_UseShortNames.hpp
"
50
51
public
:
53
54
56
MatrixFreeTentativeP
(Teuchos::RCP<const Map> coarse_map, Teuchos::RCP<const Map> fine_map, Teuchos::RCP<const Aggregates> aggregates)
57
:
fine_map_
(fine_map)
58
,
coarse_map_
(coarse_map)
59
,
aggregates_
(aggregates) {}
60
62
~MatrixFreeTentativeP
() =
default
;
64
65
// compute the apply operator, Y = alpha*R*X + beta*Y
66
void
apply
(
const
MultiVector &X, MultiVector &Y, Teuchos::ETransp mode = Teuchos::NO_TRANS,
Scalar
alpha = Teuchos::ScalarTraits<Scalar>::one(),
Scalar
beta = Teuchos::ScalarTraits<Scalar>::zero())
const override
;
67
68
// compute the residual
69
void
residual
(
const
MultiVector &X,
const
MultiVector &B, MultiVector &R)
const override
;
70
71
// get the range map
72
const
Teuchos::RCP<const Map>
getRangeMap
()
const override
{
73
return
fine_map_
;
74
}
75
76
// get the domain map
77
const
Teuchos::RCP<const Map>
getDomainMap
()
const override
{
78
return
coarse_map_
;
79
}
80
81
// get the aggregates
82
Teuchos::RCP<const Aggregates>
getAggregates
()
const
{
83
return
aggregates_
;
84
}
85
86
private
:
87
// the fine map
88
const
Teuchos::RCP<const Map>
fine_map_
;
89
90
// the coarse map
91
const
Teuchos::RCP<const Map>
coarse_map_
;
92
93
// the aggregates required for the grid transfer
94
const
Teuchos::RCP<const Aggregates>
aggregates_
;
95
};
96
97
}
// namespace MueLu
98
99
#define MUELU_MATRIXFREETENTATIVEP_SHORT
100
#endif
// MUELU_MATRIXFREETENTATIVEP_DECL_HPP
MueLu_Aggregates_fwd.hpp
MueLu_ConfigDefs.hpp
MueLu_MatrixFreeTentativeP_fwd.hpp
LocalOrdinal
MueLu::DefaultLocalOrdinal LocalOrdinal
Definition
MueLu_UseDefaultTypes.hpp:13
Scalar
MueLu::DefaultScalar Scalar
Definition
MueLu_UseDefaultTypes.hpp:12
GlobalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Definition
MueLu_UseDefaultTypes.hpp:14
Node
MueLu::DefaultNode Node
Definition
MueLu_UseDefaultTypes.hpp:15
MueLu_UseShortNames.hpp
MueLu::MatrixFreeTentativeP::getAggregates
Teuchos::RCP< const Aggregates > getAggregates() const
Definition
MueLu_MatrixFreeTentativeP_decl.hpp:82
MueLu::MatrixFreeTentativeP::fine_map_
const Teuchos::RCP< const Map > fine_map_
Definition
MueLu_MatrixFreeTentativeP_decl.hpp:88
MueLu::MatrixFreeTentativeP::execution_space
Node::execution_space execution_space
Definition
MueLu_MatrixFreeTentativeP_decl.hpp:41
MueLu::MatrixFreeTentativeP::local_ordinal_type
LocalOrdinal local_ordinal_type
Definition
MueLu_MatrixFreeTentativeP_decl.hpp:39
MueLu::MatrixFreeTentativeP::getRangeMap
const Teuchos::RCP< const Map > getRangeMap() const override
Definition
MueLu_MatrixFreeTentativeP_decl.hpp:72
MueLu::MatrixFreeTentativeP::residual
void residual(const MultiVector &X, const MultiVector &B, MultiVector &R) const override
Definition
MueLu_MatrixFreeTentativeP_def.hpp:85
MueLu::MatrixFreeTentativeP::md_range_type
Kokkos::MDRangePolicy< local_ordinal_type, execution_space, Kokkos::Rank< 2 > > md_range_type
Definition
MueLu_MatrixFreeTentativeP_decl.hpp:43
MueLu::MatrixFreeTentativeP::coarse_map_
const Teuchos::RCP< const Map > coarse_map_
Definition
MueLu_MatrixFreeTentativeP_decl.hpp:91
MueLu::MatrixFreeTentativeP::~MatrixFreeTentativeP
~MatrixFreeTentativeP()=default
Destructor.
MueLu::MatrixFreeTentativeP::getDomainMap
const Teuchos::RCP< const Map > getDomainMap() const override
Definition
MueLu_MatrixFreeTentativeP_decl.hpp:77
MueLu::MatrixFreeTentativeP::node_type
Node node_type
Definition
MueLu_MatrixFreeTentativeP_decl.hpp:44
MueLu::MatrixFreeTentativeP::MatrixFreeTentativeP
MatrixFreeTentativeP(Teuchos::RCP< const Map > coarse_map, Teuchos::RCP< const Map > fine_map, Teuchos::RCP< const Aggregates > aggregates)
Constructor.
Definition
MueLu_MatrixFreeTentativeP_decl.hpp:56
MueLu::MatrixFreeTentativeP::range_type
Kokkos::RangePolicy< local_ordinal_type, execution_space > range_type
Definition
MueLu_MatrixFreeTentativeP_decl.hpp:42
MueLu::MatrixFreeTentativeP::real_type
Teuchos::ScalarTraits< Scalar >::coordinateType real_type
Definition
MueLu_MatrixFreeTentativeP_decl.hpp:45
MueLu::MatrixFreeTentativeP::aggregates_
const Teuchos::RCP< const Aggregates > aggregates_
Definition
MueLu_MatrixFreeTentativeP_decl.hpp:94
MueLu::MatrixFreeTentativeP::apply
void apply(const MultiVector &X, MultiVector &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=Teuchos::ScalarTraits< Scalar >::one(), Scalar beta=Teuchos::ScalarTraits< Scalar >::zero()) const override
Definition
MueLu_MatrixFreeTentativeP_def.hpp:30
MueLu::MatrixFreeTentativeP::global_ordinal_type
GlobalOrdinal global_ordinal_type
Definition
MueLu_MatrixFreeTentativeP_decl.hpp:40
MueLu
Namespace for MueLu classes and methods.
Definition
MueLu_BrickAggregationFactory_decl.hpp:42
src
Transfers
Matrix-Free
MueLu_MatrixFreeTentativeP_decl.hpp
Generated by
1.17.0