MueLu
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
MueLu_GeometricInterpolationPFactory_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_GEOMETRICINTERPOLATIONPFACTORY_KOKKOS_DECL_HPP
11
#define MUELU_GEOMETRICINTERPOLATIONPFACTORY_KOKKOS_DECL_HPP
12
13
// Teuchos includes for dense linear algebra
14
#include <Teuchos_SerialDenseMatrix.hpp>
15
#include <Teuchos_SerialDenseVector.hpp>
16
#include <Teuchos_SerialDenseSolver.hpp>
17
18
#include "Xpetra_CrsGraph_fwd.hpp"
19
20
#include "MueLu_PFactory.hpp"
21
#include "
MueLu_Level_fwd.hpp
"
22
#include "
MueLu_IndexManager_kokkos_fwd.hpp
"
23
24
namespace
MueLu
{
25
26
template
<
class
Scalar,
class
LocalOrdinal,
class
GlobalOrdinal,
class
Node>
27
class
GeometricInterpolationPFactory_kokkos
:
public
PFactory
{
28
#undef MUELU_GEOMETRICINTERPOLATIONPFACTORY_KOKKOS_SHORT
29
#include "
MueLu_UseShortNames.hpp
"
30
31
public
:
32
// Declare useful types
33
using
real_type
=
typename
Teuchos::ScalarTraits<SC>::coordinateType;
34
using
realvaluedmultivector_type
= Xpetra::MultiVector<real_type, LO, GO, Node>;
35
using
device_type
=
typename
Node::device_type;
36
using
execution_space
=
typename
Node::execution_space;
37
#if KOKKOS_VERSION >= 40799
38
using
impl_scalar_type
=
typename
KokkosKernels::ArithTraits<real_type>::val_type;
39
#else
40
using
impl_scalar_type
=
typename
Kokkos::ArithTraits<real_type>::val_type;
41
#endif
42
using
coord_view_type
=
typename
Kokkos::View<
impl_scalar_type
**,
43
Kokkos::LayoutLeft,
44
device_type
>;
45
47
48
50
GeometricInterpolationPFactory_kokkos
() {}
51
53
virtual
~GeometricInterpolationPFactory_kokkos
() {}
55
56
RCP<const ParameterList>
GetValidParameterList
()
const
;
57
59
60
61
void
DeclareInput
(
Level
& fineLevel,
Level
& coarseLevel)
const
;
62
64
66
67
68
void
Build
(
Level
& fineLevel,
Level
& coarseLevel)
const
;
69
void
BuildP
(
Level
& fineLevel,
Level
& coarseLevel)
const
;
70
72
74
75
76
struct
coarseCoordinatesBuilderFunctor
{
77
IndexManager_kokkos
geoData_
;
78
coord_view_type
fineCoordView_
;
79
coord_view_type
coarseCoordView_
;
80
81
coarseCoordinatesBuilderFunctor
(RCP<IndexManager_kokkos> geoData,
82
coord_view_type
fineCoordView,
83
coord_view_type
coarseCoordView);
84
85
KOKKOS_INLINE_FUNCTION
86
void
operator()
(
const
LO nodeIdx)
const
;
87
88
};
// struct coarseCoordinatesBuilderFunctor
89
91
92
void
BuildConstantP
(RCP<Matrix>& P, RCP<const CrsGraph>& prolongatorGraph, RCP<Matrix>& A)
const
;
93
94
private
:
95
void
BuildLinearP
(RCP<Matrix>& A, RCP<const CrsGraph>& prolongatorGraph,
96
RCP<realvaluedmultivector_type>& fineCoordinates,
97
RCP<realvaluedmultivector_type>& ghostCoordinates,
98
const
int
numDimensions, RCP<Matrix>& P)
const
;
99
void
ComputeLinearInterpolationStencil
(
const
int
numDimensions,
const
int
numInterpolationPoints,
100
const
Array<Array<real_type> > coord,
101
Array<real_type>& stencil)
const
;
102
void
GetInterpolationFunctions
(
const
LO numDimensions,
103
const
Teuchos::SerialDenseVector<LO, real_type> parametricCoordinates,
104
real_type
functions[4][8])
const
;
105
106
};
// class GeometricInterpolationPFactory_kokkos
107
108
}
// namespace MueLu
109
110
#define MUELU_GEOMETRICINTERPOLATIONPFACTORY_KOKKOS_SHORT
111
#endif
// MUELU_GEOMETRICINTERPOLATIONPFACTORY_KOKKOS_DECL_HPP
MueLu_IndexManager_kokkos_fwd.hpp
MueLu_Level_fwd.hpp
MueLu_UseShortNames.hpp
MueLu::GeometricInterpolationPFactory_kokkos::execution_space
typename Node::execution_space execution_space
Definition
MueLu_GeometricInterpolationPFactory_kokkos_decl.hpp:36
MueLu::GeometricInterpolationPFactory_kokkos::coord_view_type
typename Kokkos::View< impl_scalar_type **, Kokkos::LayoutLeft, device_type > coord_view_type
Definition
MueLu_GeometricInterpolationPFactory_kokkos_decl.hpp:42
MueLu::GeometricInterpolationPFactory_kokkos::real_type
typename Teuchos::ScalarTraits< SC >::coordinateType real_type
Definition
MueLu_GeometricInterpolationPFactory_kokkos_decl.hpp:33
MueLu::GeometricInterpolationPFactory_kokkos::~GeometricInterpolationPFactory_kokkos
virtual ~GeometricInterpolationPFactory_kokkos()
Destructor.
Definition
MueLu_GeometricInterpolationPFactory_kokkos_decl.hpp:53
MueLu::GeometricInterpolationPFactory_kokkos::GeometricInterpolationPFactory_kokkos
GeometricInterpolationPFactory_kokkos()
Constructor.
Definition
MueLu_GeometricInterpolationPFactory_kokkos_decl.hpp:50
MueLu::GeometricInterpolationPFactory_kokkos::DeclareInput
void DeclareInput(Level &fineLevel, Level &coarseLevel) const
Input.
Definition
MueLu_GeometricInterpolationPFactory_kokkos_def.hpp:58
MueLu::GeometricInterpolationPFactory_kokkos::ComputeLinearInterpolationStencil
void ComputeLinearInterpolationStencil(const int numDimensions, const int numInterpolationPoints, const Array< Array< real_type > > coord, Array< real_type > &stencil) const
Definition
MueLu_GeometricInterpolationPFactory_kokkos_def.hpp:392
MueLu::GeometricInterpolationPFactory_kokkos::realvaluedmultivector_type
Xpetra::MultiVector< real_type, LO, GO, Node > realvaluedmultivector_type
Definition
MueLu_GeometricInterpolationPFactory_kokkos_decl.hpp:34
MueLu::GeometricInterpolationPFactory_kokkos::GetInterpolationFunctions
void GetInterpolationFunctions(const LO numDimensions, const Teuchos::SerialDenseVector< LO, real_type > parametricCoordinates, real_type functions[4][8]) const
Definition
MueLu_GeometricInterpolationPFactory_kokkos_def.hpp:481
MueLu::GeometricInterpolationPFactory_kokkos::Build
void Build(Level &fineLevel, Level &coarseLevel) const
Build an object with this factory.
Definition
MueLu_GeometricInterpolationPFactory_kokkos_def.hpp:77
MueLu::GeometricInterpolationPFactory_kokkos::impl_scalar_type
typename Kokkos::ArithTraits< real_type >::val_type impl_scalar_type
Definition
MueLu_GeometricInterpolationPFactory_kokkos_decl.hpp:40
MueLu::GeometricInterpolationPFactory_kokkos::BuildP
void BuildP(Level &fineLevel, Level &coarseLevel) const
Abstract Build method.
Definition
MueLu_GeometricInterpolationPFactory_kokkos_def.hpp:83
MueLu::GeometricInterpolationPFactory_kokkos::BuildConstantP
void BuildConstantP(RCP< Matrix > &P, RCP< const CrsGraph > &prolongatorGraph, RCP< Matrix > &A) const
Definition
MueLu_GeometricInterpolationPFactory_kokkos_def.hpp:184
MueLu::GeometricInterpolationPFactory_kokkos::device_type
typename Node::device_type device_type
Definition
MueLu_GeometricInterpolationPFactory_kokkos_decl.hpp:35
MueLu::GeometricInterpolationPFactory_kokkos::BuildLinearP
void BuildLinearP(RCP< Matrix > &A, RCP< const CrsGraph > &prolongatorGraph, RCP< realvaluedmultivector_type > &fineCoordinates, RCP< realvaluedmultivector_type > &ghostCoordinates, const int numDimensions, RCP< Matrix > &P) const
Definition
MueLu_GeometricInterpolationPFactory_kokkos_def.hpp:280
MueLu::GeometricInterpolationPFactory_kokkos::GetValidParameterList
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
Definition
MueLu_GeometricInterpolationPFactory_kokkos_def.hpp:28
MueLu::IndexManager_kokkos
Container class for mesh layout and indices calculation.
Definition
MueLu_IndexManager_kokkos_decl.hpp:41
MueLu::Level
Class that holds all level-specific information.
Definition
MueLu_Level.hpp:63
MueLu::PFactory::PFactory
PFactory()
Constructor.
Definition
MueLu_PFactory_decl.hpp:37
MueLu
Namespace for MueLu classes and methods.
Definition
MueLu_BrickAggregationFactory_decl.hpp:42
MueLu::GeometricInterpolationPFactory_kokkos::coarseCoordinatesBuilderFunctor::operator()
KOKKOS_INLINE_FUNCTION void operator()(const LO nodeIdx) const
Definition
MueLu_GeometricInterpolationPFactory_kokkos_def.hpp:549
MueLu::GeometricInterpolationPFactory_kokkos::coarseCoordinatesBuilderFunctor::coarseCoordinatesBuilderFunctor
coarseCoordinatesBuilderFunctor(RCP< IndexManager_kokkos > geoData, coord_view_type fineCoordView, coord_view_type coarseCoordView)
Definition
MueLu_GeometricInterpolationPFactory_kokkos_def.hpp:539
MueLu::GeometricInterpolationPFactory_kokkos::coarseCoordinatesBuilderFunctor::coarseCoordView_
coord_view_type coarseCoordView_
Definition
MueLu_GeometricInterpolationPFactory_kokkos_decl.hpp:79
MueLu::GeometricInterpolationPFactory_kokkos::coarseCoordinatesBuilderFunctor::geoData_
IndexManager_kokkos geoData_
Definition
MueLu_GeometricInterpolationPFactory_kokkos_decl.hpp:77
MueLu::GeometricInterpolationPFactory_kokkos::coarseCoordinatesBuilderFunctor::fineCoordView_
coord_view_type fineCoordView_
Definition
MueLu_GeometricInterpolationPFactory_kokkos_decl.hpp:78
src
Transfers
GeneralGeometric
MueLu_GeometricInterpolationPFactory_kokkos_decl.hpp
Generated by
1.17.0