dune-istl  2.6-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 
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(V& v, V& v1) const
65  {
66  DUNE_UNUSED_PARAMETER(v);
67  DUNE_UNUSED_PARAMETER(v1);
68  }
69 
70  template<class V>
71  void project(V& v) const
72  {
73  DUNE_UNUSED_PARAMETER(v);
74  }
75 
76  template<class T1, class T2>
77  void dot (const T1& x, const T1& y, T2& result) const
78  {
79  assert(false && "this function should never be called");
80  }
81 
82  template<class T1>
83  typename FieldTraits<typename T1::field_type>::real_type norm (const T1& x) const
84  {
85  assert(false && "this function should never be called");
86  return typename FieldTraits<typename T1::field_type>::real_type(0);
87  }
88 
89  template<class T>
90  SequentialInformation(const CollectiveCommunication<T>&)
91  {}
92 
94  {}
95 
97  {}
98  private:
99  MPICommunicator comm_;
101  };
102 
103 
104  } // namespace Amg
105 } //namespace Dune
106 #endif
Dune::SolverCategory::Category
Category
Definition: solvercategory.hh:21
Dune::SolverCategory::sequential
@ sequential
Category for sequential solvers.
Definition: solvercategory.hh:23
solvercategory.hh
Dune::Amg::SequentialInformation::globalSum
T globalSum(const T &t) const
Definition: pinfo.hh:47
Dune::Amg::SequentialInformation::CopyFlags
EmptySet< int > CopyFlags
Definition: pinfo.hh:29
Dune::Amg::SequentialInformation
Definition: pinfo.hh:25
Dune::Amg::SequentialInformation::norm
FieldTraits< typename T1::field_type >::real_type norm(const T1 &x) const
Definition: pinfo.hh:83
Dune::Amg::SequentialInformation::communicator
MPICommunicator communicator() const
Definition: pinfo.hh:36
Dune::Amg::SequentialInformation::MPICommunicator
CollectiveCommunication< void * > MPICommunicator
Definition: pinfo.hh:28
Dune::Amg::SequentialInformation::OwnerSet
AllSet< int > OwnerSet
Definition: pinfo.hh:30
Dune::Amg::SequentialInformation::SequentialInformation
SequentialInformation(const CollectiveCommunication< T > &)
Definition: pinfo.hh:90
Dune::Amg::SequentialInformation::copyOwnerToAll
void copyOwnerToAll(V &v, V &v1) const
Definition: pinfo.hh:64
Dune::Amg::SequentialInformation::globalLookup
const GlobalLookupIndexSet & globalLookup() const
Definition: pinfo.hh:58
Dune::Amg::SequentialInformation::SequentialInformation
SequentialInformation(const SequentialInformation &)
Definition: pinfo.hh:96
Dune::Amg::SequentialInformation::project
void project(V &v) const
Definition: pinfo.hh:71
Dune::Amg::SequentialInformation::getSolverCategory
SolverCategory::Category getSolverCategory() const
Definition: pinfo.hh:32
Dune::Amg::SequentialInformation::procs
int procs() const
Definition: pinfo.hh:41
Dune::Amg::SequentialInformation::dot
void dot(const T1 &x, const T1 &y, T2 &result) const
Definition: pinfo.hh:77
Dune::Amg::SequentialInformation::GlobalLookupIndexSet
int GlobalLookupIndexSet
Definition: pinfo.hh:52
Dune
Definition: allocator.hh:7
Dune::Amg::SequentialInformation::SequentialInformation
SequentialInformation()
Definition: pinfo.hh:93
Dune::Amg::SequentialInformation::freeGlobalLookup
void freeGlobalLookup()
Definition: pinfo.hh:56
Dune::Amg::SequentialInformation::buildGlobalLookup
void buildGlobalLookup(std::size_t)
Definition: pinfo.hh:54