dune-istl
2.11
Toggle main menu visibility
Loading...
Searching...
No Matches
dune
istl
paamg
pinfo.hh
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4
// vi: set et ts=4 sw=2 sts=2:
5
#ifndef DUNE_AMG_PINFO_HH
6
#define DUNE_AMG_PINFO_HH
7
8
#include <dune/common/parallel/communication.hh>
9
#include <dune/common/enumset.hh>
10
11
#if HAVE_MPI
12
13
#include <dune/common/parallel/mpicommunication.hh>
14
#include <dune/common/parallel/mpitraits.hh>
15
#include <dune/common/parallel/remoteindices.hh>
16
#include <dune/common/parallel/interface.hh>
17
#include <dune/common/parallel/communicator.hh>
18
19
#endif
20
21
#include <
dune/istl/solvercategory.hh
>
22
namespace
Dune
23
{
24
namespace
Amg
25
{
26
27
class
SequentialInformation
28
{
29
public
:
30
typedef
Communication<void*>
MPICommunicator
;
31
typedef
EmptySet<int>
CopyFlags
;
32
typedef
AllSet<int>
OwnerSet
;
33
34
SolverCategory::Category
category
()
const
{
35
return
SolverCategory::sequential
;
36
}
37
38
MPICommunicator
communicator
()
const
39
{
40
return
comm_;
41
}
42
43
int
procs
()
const
44
{
45
return
1;
46
}
47
48
template
<
typename
T>
49
T
globalSum
(
const
T& t)
const
50
{
51
return
t;
52
}
53
54
typedef
int
GlobalLookupIndexSet
;
55
56
void
buildGlobalLookup
(std::size_t){}
57
58
void
freeGlobalLookup
(){}
59
60
const
GlobalLookupIndexSet
&
globalLookup
()
const
61
{
62
return
gli;
63
}
64
65
template
<
class
V>
66
void
copyOwnerToAll
([[maybe_unused]] V& v, [[maybe_unused]] V& v1)
const
67
{}
68
69
template
<
class
V>
70
void
project
([[maybe_unused]] V& v)
const
71
{}
72
73
template
<
class
T1,
class
T2>
74
void
dot
(
const
T1& x,
const
T1& y, T2& result)
const
75
{
76
result = x.dot(y);
77
}
78
79
template
<
class
T1>
80
typename
FieldTraits<typename T1::field_type>::real_type
norm
(
const
T1& x)
const
81
{
82
return
x.two_norm();
83
}
84
85
template
<
class
T>
86
SequentialInformation
(
const
Communication<T>&)
87
{}
88
89
SequentialInformation
()
90
{}
91
92
SequentialInformation
(
const
SequentialInformation
&)
93
{}
94
private
:
95
MPICommunicator
comm_{};
96
GlobalLookupIndexSet
gli{};
97
};
98
99
100
}
// namespace Amg
101
}
//namespace Dune
102
#endif
solvercategory.hh
Dune
Definition
allocator.hh:11
Dune::Amg
Definition
novlpschwarz.hh:256
Dune::Amg::SequentialInformation::SequentialInformation
SequentialInformation()
Definition
pinfo.hh:89
Dune::Amg::SequentialInformation::globalSum
T globalSum(const T &t) const
Definition
pinfo.hh:49
Dune::Amg::SequentialInformation::CopyFlags
EmptySet< int > CopyFlags
Definition
pinfo.hh:31
Dune::Amg::SequentialInformation::dot
void dot(const T1 &x, const T1 &y, T2 &result) const
Definition
pinfo.hh:74
Dune::Amg::SequentialInformation::OwnerSet
AllSet< int > OwnerSet
Definition
pinfo.hh:32
Dune::Amg::SequentialInformation::copyOwnerToAll
void copyOwnerToAll(V &v, V &v1) const
Definition
pinfo.hh:66
Dune::Amg::SequentialInformation::communicator
MPICommunicator communicator() const
Definition
pinfo.hh:38
Dune::Amg::SequentialInformation::buildGlobalLookup
void buildGlobalLookup(std::size_t)
Definition
pinfo.hh:56
Dune::Amg::SequentialInformation::project
void project(V &v) const
Definition
pinfo.hh:70
Dune::Amg::SequentialInformation::MPICommunicator
Communication< void * > MPICommunicator
Definition
pinfo.hh:30
Dune::Amg::SequentialInformation::SequentialInformation
SequentialInformation(const Communication< T > &)
Definition
pinfo.hh:86
Dune::Amg::SequentialInformation::globalLookup
const GlobalLookupIndexSet & globalLookup() const
Definition
pinfo.hh:60
Dune::Amg::SequentialInformation::SequentialInformation
SequentialInformation(const SequentialInformation &)
Definition
pinfo.hh:92
Dune::Amg::SequentialInformation::norm
FieldTraits< typenameT1::field_type >::real_type norm(const T1 &x) const
Definition
pinfo.hh:80
Dune::Amg::SequentialInformation::freeGlobalLookup
void freeGlobalLookup()
Definition
pinfo.hh:58
Dune::Amg::SequentialInformation::GlobalLookupIndexSet
int GlobalLookupIndexSet
Definition
pinfo.hh:54
Dune::Amg::SequentialInformation::category
SolverCategory::Category category() const
Definition
pinfo.hh:34
Dune::Amg::SequentialInformation::procs
int procs() const
Definition
pinfo.hh:43
Dune::SolverCategory::Category
Category
Definition
solvercategory.hh:23
Dune::SolverCategory::sequential
@ sequential
Category for sequential solvers.
Definition
solvercategory.hh:25
Generated by
1.17.0