Dune Core Modules (2.8.0)

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
32 SolverCategory::Category category () const {
34 }
35
36 MPICommunicator communicator() const
37 {
38 return comm_;
39 }
40
41 int procs() const
42 {
43 return 1;
44 }
45
46 template<typename T>
47 T globalSum(const T& t) const
48 {
49 return t;
50 }
51
52 typedef int GlobalLookupIndexSet;
53
54 void buildGlobalLookup(std::size_t){}
55
56 void freeGlobalLookup(){}
57
58 const GlobalLookupIndexSet& globalLookup() const
59 {
60 return gli;
61 }
62
63 template<class V>
64 void copyOwnerToAll([[maybe_unused]] V& v, [[maybe_unused]] V& v1) const
65 {}
66
67 template<class V>
68 void project([[maybe_unused]] V& v) const
69 {}
70
71 template<class T1, class T2>
72 void dot (const T1&, const T1&, T2&) const
73 {
74 // This function should never be called
75 std::abort();
76 }
77
78 template<class T1>
79 typename FieldTraits<typename T1::field_type>::real_type norm (const T1&) const
80 {
81 // This function should never be called
82 std::abort();
83 }
84
85 template<class T>
86 SequentialInformation(const CollectiveCommunication<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
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
Implements an utility class that provides MPI's collective communication methods.
Traits classes for mapping types onto MPI_Datatype.
Dune namespace.
Definition: alignedallocator.hh:11
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 (Dec 22, 23:30, 2024)