Dune Core Modules (2.7.1)

pinfo.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_AMG_PINFO_HH
4#define DUNE_AMG_PINFO_HH
5
8
9#if HAVE_MPI
10
16
17#endif
18
19#include <dune/istl/solvercategory.hh>
20namespace Dune
21{
22 namespace Amg
23 {
24
25 class SequentialInformation
26 {
27 public:
28 typedef CollectiveCommunication<void*> MPICommunicator;
29 typedef EmptySet<int> CopyFlags;
30 typedef AllSet<int> OwnerSet;
31
33 DUNE_DEPRECATED_MSG("use category()")
34 getSolverCategory () const {
36 }
37
38 SolverCategory::Category category () const {
40 }
41
42 MPICommunicator communicator() const
43 {
44 return comm_;
45 }
46
47 int procs() const
48 {
49 return 1;
50 }
51
52 template<typename T>
53 T globalSum(const T& t) const
54 {
55 return t;
56 }
57
58 typedef int GlobalLookupIndexSet;
59
60 void buildGlobalLookup(std::size_t){}
61
62 void freeGlobalLookup(){}
63
64 const GlobalLookupIndexSet& globalLookup() const
65 {
66 return gli;
67 }
68
69 template<class V>
70 void copyOwnerToAll(V& v, V& v1) const
71 {
74 }
75
76 template<class V>
77 void project(V& v) const
78 {
80 }
81
82 template<class T1, class T2>
83 void dot (const T1& x, const T1& y, T2& result) const
84 {
85 // This function should never be called
86 std::abort();
87 }
88
89 template<class T1>
90 typename FieldTraits<typename T1::field_type>::real_type norm (const T1& x) const
91 {
92 // This function should never be called
93 std::abort();
94 }
95
96 template<class T>
97 SequentialInformation(const CollectiveCommunication<T>&)
98 {}
99
100 SequentialInformation()
101 {}
102
103 SequentialInformation(const SequentialInformation&)
104 {}
105 private:
106 MPICommunicator comm_;
107 GlobalLookupIndexSet gli;
108 };
109
110
111 } // namespace Amg
112} //namespace Dune
113#endif
Implements an utility class that provides collective communication methods for sequential programs.
Provides utility classes for syncing distributed data via MPI communication.
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<!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:40
#define DUNE_DEPRECATED_MSG(text)
Mark some entity as deprecated.
Definition: deprecated.hh:169
#define DUNE_UNUSED_PARAMETER(parm)
A macro to mark intentionally unused function parameters with.
Definition: unused.hh:25
Implements an utility class that provides MPI's collective communication methods.
Traits classes for mapping types onto MPI_Datatype.
Dune namespace.
Definition: alignedallocator.hh:14
Classes describing a distributed indexset.
Category
Definition: solvercategory.hh:21
@ sequential
Category for sequential solvers.
Definition: solvercategory.hh:23
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 13, 23:29, 2024)