dune-istl  2.7.1
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 
33  DUNE_DEPRECATED_MSG("use category()")
34  getSolverCategory () const {
36  }
37 
40  }
41 
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 
63 
65  {
66  return gli;
67  }
68 
69  template<class V>
70  void copyOwnerToAll(V& v, V& v1) const
71  {
72  DUNE_UNUSED_PARAMETER(v);
73  DUNE_UNUSED_PARAMETER(v1);
74  }
75 
76  template<class V>
77  void project(V& v) const
78  {
79  DUNE_UNUSED_PARAMETER(v);
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 
101  {}
102 
104  {}
105  private:
106  MPICommunicator comm_;
108  };
109 
110 
111  } // namespace Amg
112 } //namespace Dune
113 #endif
Definition: allocator.hh:7
Definition: pinfo.hh:26
SequentialInformation()
Definition: pinfo.hh:100
FieldTraits< typename T1::field_type >::real_type norm(const T1 &x) const
Definition: pinfo.hh:90
T globalSum(const T &t) const
Definition: pinfo.hh:53
SequentialInformation(const CollectiveCommunication< T > &)
Definition: pinfo.hh:97
CollectiveCommunication< void * > MPICommunicator
Definition: pinfo.hh:28
EmptySet< int > CopyFlags
Definition: pinfo.hh:29
void dot(const T1 &x, const T1 &y, T2 &result) const
Definition: pinfo.hh:83
AllSet< int > OwnerSet
Definition: pinfo.hh:30
void copyOwnerToAll(V &v, V &v1) const
Definition: pinfo.hh:70
MPICommunicator communicator() const
Definition: pinfo.hh:42
void buildGlobalLookup(std::size_t)
Definition: pinfo.hh:60
const GlobalLookupIndexSet & globalLookup() const
Definition: pinfo.hh:64
void project(V &v) const
Definition: pinfo.hh:77
SequentialInformation(const SequentialInformation &)
Definition: pinfo.hh:103
void freeGlobalLookup()
Definition: pinfo.hh:62
int GlobalLookupIndexSet
Definition: pinfo.hh:58
SolverCategory::Category category() const
Definition: pinfo.hh:38
int procs() const
Definition: pinfo.hh:47
SolverCategory::Category getSolverCategory() const
Definition: pinfo.hh:34
Category
Definition: solvercategory.hh:21
@ sequential
Category for sequential solvers.
Definition: solvercategory.hh:23