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