dune-istl
2.2.0
|
00001 // $Id: pinfo.hh 1458 2011-03-01 09:48:45Z rebecca $ 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/common/mpitraits.hh> 00012 #include<dune/common/parallel/remoteindices.hh> 00013 #include<dune/common/parallel/interface.hh> 00014 #include<dune/common/parallel/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 const SolverCategory::Category getSolverCategory () const { 00036 return SolverCategory::sequential; 00037 } 00038 00039 MPICommunicator communicator() const 00040 { 00041 return comm_; 00042 } 00043 00044 int procs() const 00045 { 00046 return 1; 00047 } 00048 00049 template<typename T> 00050 T globalSum(const T& t) const 00051 { 00052 return t; 00053 } 00054 00055 typedef int GlobalLookupIndexSet; 00056 00057 void buildGlobalLookup(std::size_t){}; 00058 00059 void freeGlobalLookup(){}; 00060 00061 const GlobalLookupIndexSet& globalLookup() const 00062 { 00063 return gli; 00064 } 00065 00066 template<class V> 00067 void copyOwnerToAll(V& v, V& v1) const 00068 {} 00069 00070 template<class V> 00071 void project(V& v) const 00072 {} 00073 00074 template<class T> 00075 SequentialInformation(const CollectiveCommunication<T>&) 00076 {} 00077 00078 SequentialInformation() 00079 {} 00080 00081 SequentialInformation(const SequentialInformation&) 00082 {} 00083 private: 00084 MPICommunicator comm_; 00085 GlobalLookupIndexSet gli; 00086 }; 00087 00088 00089 }// namespace Amg 00090 } //namespace Dune 00091 #endif