00001 // $Id: pinfo.hh 1089 2009-10-01 12:00:24Z mblatt $ 00002 #ifndef DUNE_AMG_PINFO_HH 00003 #define DUNE_AMG_PINFO_HH 00004 00005 #include<dune/common/collectivecommunication.hh> 00006 #include<dune/common/enumset.hh> 00007 00008 #if HAVE_MPI 00009 00010 #include<dune/common/mpicollectivecommunication.hh> 00011 #include<dune/istl/mpitraits.hh> 00012 #include<dune/istl/remoteindices.hh> 00013 #include<dune/istl/interface.hh> 00014 #include<dune/istl/communicator.hh> 00015 00016 #endif 00017 00018 #include<dune/istl/solvercategory.hh> 00019 namespace Dune 00020 { 00021 namespace Amg 00022 { 00023 00024 class SequentialInformation 00025 { 00026 public: 00027 typedef CollectiveCommunication<void*> MPICommunicator; 00028 typedef EmptySet<int> CopyFlags; 00029 typedef AllSet<int> OwnerSet; 00030 00031 enum{ 00032 category = SolverCategory::sequential 00033 }; 00034 00035 MPICommunicator communicator() const 00036 { 00037 return comm_; 00038 } 00039 00040 int procs() const 00041 { 00042 return 1; 00043 } 00044 00045 template<typename T> 00046 T globalSum(const T& t) const 00047 { 00048 return t; 00049 } 00050 00051 typedef int GlobalLookupIndexSet; 00052 00053 void buildGlobalLookup(std::size_t){}; 00054 00055 void freeGlobalLookup(){}; 00056 00057 const GlobalLookupIndexSet& globalLookup() const 00058 { 00059 return gli; 00060 } 00061 00062 template<class V> 00063 void copyOwnerToAll(V& v, V& v1) const 00064 {} 00065 00066 template<class V> 00067 void project(V& v) const 00068 {} 00069 00070 SequentialInformation(const CollectiveCommunication<void*>&) 00071 {} 00072 00073 SequentialInformation() 00074 {} 00075 00076 SequentialInformation(const SequentialInformation&) 00077 {} 00078 private: 00079 MPICommunicator comm_; 00080 GlobalLookupIndexSet gli; 00081 }; 00082 00083 00084 }// namespace Amg 00085 } //namespace Dune 00086 #endif