Dune Core Modules (2.9.0)

pinfo.hh
1// SPDX-FileCopyrightText: Copyright (C) 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
10
11#if HAVE_MPI
12
18
19#endif
20
21#include <dune/istl/solvercategory.hh>
22namespace 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 {
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&, const T1&, T2&) const
75 {
76 // This function should never be called
77 std::abort();
78 }
79
80 template<class T1>
81 typename FieldTraits<typename T1::field_type>::real_type norm (const T1&) const
82 {
83 // This function should never be called
84 std::abort();
85 }
86
87 template<class T>
88 SequentialInformation(const Communication<T>&)
89 {}
90
91 SequentialInformation()
92 {}
93
94 SequentialInformation(const SequentialInformation&)
95 {}
96 private:
97 MPICommunicator comm_;
98 GlobalLookupIndexSet gli;
99 };
100
101
102 } // namespace Amg
103} //namespace Dune
104#endif
Provides utility classes for syncing distributed data via MPI communication.
Implements an utility class that provides collective communication methods for sequential programs.
Provides classes for building the communication interface between remote indices.
Classes for building sets out of enumeration values.
auto dot(const A &a, const B &b) -> typename std::enable_if< IsNumber< A >::value &&!IsVector< A >::value &&!std::is_same< typename FieldTraits< A >::field_type, typename FieldTraits< A >::real_type > ::value, decltype(conj(a) *b)>::type
computes the dot product for fundamental data types according to Petsc's VectDot function: dot(a,...
Definition: dotproduct.hh:42
Implements an utility class that provides MPI's collective communication methods.
Traits classes for mapping types onto MPI_Datatype.
Dune namespace.
Definition: alignedallocator.hh:13
Classes describing a distributed indexset.
Category
Definition: solvercategory.hh:23
@ sequential
Category for sequential solvers.
Definition: solvercategory.hh:25
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)