dune-istl  2.8.0
pinfo.hh
Go to the documentation of this file.
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 
6 #include <dune/common/parallel/communication.hh>
7 #include <dune/common/enumset.hh>
8 
9 #if HAVE_MPI
10 
11 #include <dune/common/parallel/mpicommunication.hh>
12 #include <dune/common/parallel/mpitraits.hh>
13 #include <dune/common/parallel/remoteindices.hh>
14 #include <dune/common/parallel/interface.hh>
15 #include <dune/common/parallel/communicator.hh>
16 
17 #endif
18 
20 namespace Dune
21 {
22  namespace Amg
23  {
24 
26  {
27  public:
28  typedef CollectiveCommunication<void*> MPICommunicator;
29  typedef EmptySet<int> CopyFlags;
30  typedef AllSet<int> OwnerSet;
31 
34  }
35 
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 
57 
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 
90  {}
91 
93  {}
94  private:
95  MPICommunicator comm_;
97  };
98 
99 
100  } // namespace Amg
101 } //namespace Dune
102 #endif
Definition: allocator.hh:9
Definition: pinfo.hh:26
SequentialInformation()
Definition: pinfo.hh:89
T globalSum(const T &t) const
Definition: pinfo.hh:47
SequentialInformation(const CollectiveCommunication< T > &)
Definition: pinfo.hh:86
CollectiveCommunication< void * > MPICommunicator
Definition: pinfo.hh:28
void project([[maybe_unused]] V &v) const
Definition: pinfo.hh:68
void dot(const T1 &, const T1 &, T2 &) const
Definition: pinfo.hh:72
EmptySet< int > CopyFlags
Definition: pinfo.hh:29
AllSet< int > OwnerSet
Definition: pinfo.hh:30
MPICommunicator communicator() const
Definition: pinfo.hh:36
void buildGlobalLookup(std::size_t)
Definition: pinfo.hh:54
const GlobalLookupIndexSet & globalLookup() const
Definition: pinfo.hh:58
SequentialInformation(const SequentialInformation &)
Definition: pinfo.hh:92
void freeGlobalLookup()
Definition: pinfo.hh:56
int GlobalLookupIndexSet
Definition: pinfo.hh:52
SolverCategory::Category category() const
Definition: pinfo.hh:32
int procs() const
Definition: pinfo.hh:41
FieldTraits< typename T1::field_type >::real_type norm(const T1 &) const
Definition: pinfo.hh:79
void copyOwnerToAll([[maybe_unused]] V &v, [[maybe_unused]] V &v1) const
Definition: pinfo.hh:64
Category
Definition: solvercategory.hh:21
@ sequential
Category for sequential solvers.
Definition: solvercategory.hh:23