dune-istl  2.3.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 // $Id$
4 #ifndef DUNE_AMG_PINFO_HH
5 #define DUNE_AMG_PINFO_HH
6 
7 #include <dune/common/parallel/collectivecommunication.hh>
8 #include <dune/common/enumset.hh>
9 
10 #if HAVE_MPI
11 
12 #include <dune/common/parallel/mpicollectivecommunication.hh>
13 #include <dune/common/parallel/mpitraits.hh>
14 #include <dune/common/parallel/remoteindices.hh>
15 #include <dune/common/parallel/interface.hh>
16 #include <dune/common/parallel/communicator.hh>
17 
18 #endif
19 
21 namespace Dune
22 {
23  namespace Amg
24  {
25 
27  {
28  public:
29  typedef CollectiveCommunication<void*> MPICommunicator;
30  typedef EmptySet<int> CopyFlags;
31  typedef AllSet<int> OwnerSet;
32 
33  enum {
35  };
36 
39  }
40 
42  {
43  return comm_;
44  }
45 
46  int procs() const
47  {
48  return 1;
49  }
50 
51  template<typename T>
52  T globalSum(const T& t) const
53  {
54  return t;
55  }
56 
57  typedef int GlobalLookupIndexSet;
58 
59  void buildGlobalLookup(std::size_t){}
60 
62 
64  {
65  return gli;
66  }
67 
68  template<class V>
69  void copyOwnerToAll(V& v, V& v1) const
70  {
71  DUNE_UNUSED_PARAMETER(v);
72  DUNE_UNUSED_PARAMETER(v1);
73  }
74 
75  template<class V>
76  void project(V& v) const
77  {
78  DUNE_UNUSED_PARAMETER(v);
79  }
80 
81  template<class T>
82  SequentialInformation(const CollectiveCommunication<T>&)
83  {}
84 
86  {}
87 
89  {}
90  private:
91  MPICommunicator comm_;
93  };
94 
95 
96  } // namespace Amg
97 } //namespace Dune
98 #endif
SequentialInformation(const CollectiveCommunication< T > &)
Definition: pinfo.hh:82
int GlobalLookupIndexSet
Definition: pinfo.hh:57
int procs() const
Definition: pinfo.hh:46
AllSet< int > OwnerSet
Definition: pinfo.hh:31
SequentialInformation()
Definition: pinfo.hh:85
const GlobalLookupIndexSet & globalLookup() const
Definition: pinfo.hh:63
const SolverCategory::Category getSolverCategory() const
Definition: pinfo.hh:37
void copyOwnerToAll(V &v, V &v1) const
Definition: pinfo.hh:69
void freeGlobalLookup()
Definition: pinfo.hh:61
Category
Definition: solvercategory.hh:20
MPICommunicator communicator() const
Definition: pinfo.hh:41
Category for sequential solvers.
Definition: solvercategory.hh:22
SequentialInformation(const SequentialInformation &)
Definition: pinfo.hh:88
void buildGlobalLookup(std::size_t)
Definition: pinfo.hh:59
EmptySet< int > CopyFlags
Definition: pinfo.hh:30
void project(V &v) const
Definition: pinfo.hh:76
Definition: pinfo.hh:26
CollectiveCommunication< void * > MPICommunicator
Definition: pinfo.hh:29
T globalSum(const T &t) const
Definition: pinfo.hh:52