MueLu
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
MueLu_NullspaceFactory_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_NULLSPACEFACTORY_DECL_HPP
11
#define MUELU_NULLSPACEFACTORY_DECL_HPP
12
13
#include "
MueLu_ConfigDefs.hpp
"
14
15
#include "Xpetra_MultiVector_fwd.hpp"
16
17
#include "
MueLu_NullspaceFactory_fwd.hpp
"
18
19
#include "
MueLu_Level_fwd.hpp
"
20
#include "
MueLu_SingleLevelFactoryBase.hpp
"
21
22
namespace
MueLu
{
23
67
template
<
class
Scalar,
class
LocalOrdinal,
class
GlobalOrdinal,
class
Node>
68
69
class
NullspaceFactory
:
public
SingleLevelFactoryBase
{
70
public
:
71
typedef
LocalOrdinal
local_ordinal_type
;
72
typedef
GlobalOrdinal
global_ordinal_type
;
73
typedef
typename
Node::execution_space
execution_space
;
74
typedef
Kokkos::RangePolicy<local_ordinal_type, execution_space>
range_type
;
75
typedef
Node
node_type
;
76
77
private
:
78
#undef MUELU_NULLSPACEFACTORY_SHORT
79
#include "
MueLu_UseShortNames.hpp
"
80
81
public
:
83
84
86
NullspaceFactory
(
const
std::string& nspName =
"Nullspace"
) {
87
SetParameter
(
"Fine level nullspace"
, ParameterEntry(nspName));
88
}
89
91
virtual
~NullspaceFactory
() {}
92
94
96
98
100
RCP<const ParameterList>
GetValidParameterList
()
const
;
101
107
108
void
DeclareInput
(
Level
& currentLevel)
const
;
109
111
113
114
116
void
Build
(
Level
& currentLevel)
const
;
117
119
120
private
:
121
using
coordinate_type
=
typename
Teuchos::ScalarTraits<Scalar>::coordinateType;
122
using
RealValuedMultiVector
= Xpetra::MultiVector<coordinate_type, LO, GO, NO>;
123
using
CoordsType
=
typename
RealValuedMultiVector::dual_view_type::t_dev_const_um;
124
using
MeanCoordsType
= Kokkos::View<typename RealValuedMultiVector::impl_scalar_type*, typename Node::memory_space>;
125
126
void
fillNullspaceVector
(
const
RCP<MultiVector>& nullspace,
LocalOrdinal
numPDEs,
LocalOrdinal
nullspaceDim,
CoordsType
coordsView,
MeanCoordsType
meanView)
const
;
127
128
mutable
bool
calculateRotations_
=
false
;
129
};
130
131
}
// namespace MueLu
132
133
#define MUELU_NULLSPACEFACTORY_SHORT
134
#endif
// MUELU_NULLSPACEFACTORY_DECL_HPP
MueLu_ConfigDefs.hpp
MueLu_Level_fwd.hpp
MueLu_NullspaceFactory_fwd.hpp
MueLu_SingleLevelFactoryBase.hpp
LocalOrdinal
MueLu::DefaultLocalOrdinal LocalOrdinal
Definition
MueLu_UseDefaultTypes.hpp:13
GlobalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Definition
MueLu_UseDefaultTypes.hpp:14
Node
MueLu::DefaultNode Node
Definition
MueLu_UseDefaultTypes.hpp:15
MueLu_UseShortNames.hpp
MueLu::Level
Class that holds all level-specific information.
Definition
MueLu_Level.hpp:63
MueLu::NullspaceFactory::calculateRotations_
bool calculateRotations_
Definition
MueLu_NullspaceFactory_decl.hpp:128
MueLu::NullspaceFactory::execution_space
Node::execution_space execution_space
Definition
MueLu_NullspaceFactory_decl.hpp:73
MueLu::NullspaceFactory::fillNullspaceVector
void fillNullspaceVector(const RCP< MultiVector > &nullspace, LocalOrdinal numPDEs, LocalOrdinal nullspaceDim, CoordsType coordsView, MeanCoordsType meanView) const
Definition
MueLu_NullspaceFactory_def.hpp:207
MueLu::NullspaceFactory::local_ordinal_type
LocalOrdinal local_ordinal_type
Definition
MueLu_NullspaceFactory_decl.hpp:71
MueLu::NullspaceFactory::Build
void Build(Level ¤tLevel) const
Build an object with this factory.
Definition
MueLu_NullspaceFactory_def.hpp:135
MueLu::NullspaceFactory::coordinate_type
typename Teuchos::ScalarTraits< Scalar >::coordinateType coordinate_type
Definition
MueLu_NullspaceFactory_decl.hpp:121
MueLu::NullspaceFactory::MeanCoordsType
Kokkos::View< typename RealValuedMultiVector::impl_scalar_type *, typename Node::memory_space > MeanCoordsType
Definition
MueLu_NullspaceFactory_decl.hpp:124
MueLu::NullspaceFactory::RealValuedMultiVector
Xpetra::MultiVector< coordinate_type, LO, GO, NO > RealValuedMultiVector
Definition
MueLu_NullspaceFactory_decl.hpp:122
MueLu::NullspaceFactory::CoordsType
typename RealValuedMultiVector::dual_view_type::t_dev_const_um CoordsType
Definition
MueLu_NullspaceFactory_decl.hpp:123
MueLu::NullspaceFactory::~NullspaceFactory
virtual ~NullspaceFactory()
Destructor.
Definition
MueLu_NullspaceFactory_decl.hpp:91
MueLu::NullspaceFactory::range_type
Kokkos::RangePolicy< local_ordinal_type, execution_space > range_type
Definition
MueLu_NullspaceFactory_decl.hpp:74
MueLu::NullspaceFactory::global_ordinal_type
GlobalOrdinal global_ordinal_type
Definition
MueLu_NullspaceFactory_decl.hpp:72
MueLu::NullspaceFactory::NullspaceFactory
NullspaceFactory(const std::string &nspName="Nullspace")
Constructor.
Definition
MueLu_NullspaceFactory_decl.hpp:86
MueLu::NullspaceFactory::GetValidParameterList
RCP< const ParameterList > GetValidParameterList() const
Define valid parameters for internal factory parameters.
Definition
MueLu_NullspaceFactory_def.hpp:26
MueLu::NullspaceFactory::node_type
Node node_type
Definition
MueLu_NullspaceFactory_decl.hpp:75
MueLu::NullspaceFactory::DeclareInput
void DeclareInput(Level ¤tLevel) const
Specifies the data that this class needs, and the factories that generate that data.
Definition
MueLu_NullspaceFactory_def.hpp:55
MueLu::ParameterListAcceptorImpl::SetParameter
void SetParameter(const std::string &name, const ParameterEntry &entry)
Set a parameter directly as a ParameterEntry.
Definition
MueLu_ParameterListAcceptor.cpp:77
MueLu::SingleLevelFactoryBase::SingleLevelFactoryBase
SingleLevelFactoryBase()
Constructor.
MueLu
Namespace for MueLu classes and methods.
Definition
MueLu_BrickAggregationFactory_decl.hpp:42
src
Transfers
Smoothed-Aggregation
MueLu_NullspaceFactory_decl.hpp
Generated by
1.17.0