From 2f717df4e71930433361c157b4f2ed2c51fddd6e Mon Sep 17 00:00:00 2001
From: Rebecca Neumann <rebecca@dune-project.org>
Date: Thu, 9 Dec 2010 18:30:35 +0000
Subject: [PATCH] adapt construction method for the sequential case, add
 getSolverCategory Method

[[Imported from SVN: r1430]]
---
 dune/istl/paamg/construction.hh | 17 ++++++++++++++---
 dune/istl/paamg/pinfo.hh        |  4 ++++
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/dune/istl/paamg/construction.hh b/dune/istl/paamg/construction.hh
index 508e4069f..2dcfd1322 100644
--- a/dune/istl/paamg/construction.hh
+++ b/dune/istl/paamg/construction.hh
@@ -102,6 +102,7 @@ namespace Dune
       C* comm_;
     };
 
+#if HAVE_MPI
     struct OwnerOverlapCopyCommunicationArgs
     {
       OwnerOverlapCopyCommunicationArgs(MPI_Comm comm, int cat)
@@ -111,6 +112,16 @@ namespace Dune
       MPI_Comm comm_;
       int cat_;
     };
+#endif
+
+    struct SequentialCommunicationArgs
+    {
+      SequentialCommunicationArgs(CollectiveCommunication<void*> comm, int cat)
+        : comm_(comm)
+      {}
+
+      CollectiveCommunication<void*> comm_;
+    };
 
   } // end Amg namspace
 
@@ -188,11 +199,11 @@ namespace Dune
     class ConstructionTraits<SequentialInformation>
     {
     public:
-      typedef const CollectiveCommunication<void*> Arguments;
-
+      //typedef const CollectiveCommunication<void*> Arguments;
+      typedef const SequentialCommunicationArgs Arguments;
       static inline SequentialInformation* construct(Arguments& args)
       {
-        return new SequentialInformation(args);
+        return new SequentialInformation(args.comm_);
       }
 
       static inline void deconstruct(SequentialInformation* si)
diff --git a/dune/istl/paamg/pinfo.hh b/dune/istl/paamg/pinfo.hh
index 567dff0d5..9d0c3a3cb 100644
--- a/dune/istl/paamg/pinfo.hh
+++ b/dune/istl/paamg/pinfo.hh
@@ -34,6 +34,10 @@ namespace Dune
         category = SolverCategory::sequential
       };
 
+      const int getSolverCategory () const {
+        return SolverCategory::sequential;
+      }
+
       MPICommunicator communicator() const
       {
         return comm_;
-- 
GitLab