From 877c5a2ada39bf5579de7c68dbc867f93e92ba83 Mon Sep 17 00:00:00 2001
From: Christian Engwer <christi@dune-project.org>
Date: Sun, 19 Mar 2017 19:22:50 +0100
Subject: [PATCH] [dynampic polymorphism] update the category implementation of
 the eigenvalue solvers

---
 dune/istl/eigenvalue/poweriteration.hh | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/dune/istl/eigenvalue/poweriteration.hh b/dune/istl/eigenvalue/poweriteration.hh
index 459272e4e..71f36e04c 100644
--- a/dune/istl/eigenvalue/poweriteration.hh
+++ b/dune/istl/eigenvalue/poweriteration.hh
@@ -47,8 +47,6 @@ namespace Dune
       typedef Y range_type;
       typedef typename X::field_type field_type;
 
-      enum {category = Dune::SolverCategory::sequential};
-
       ScalingLinearOperator (field_type immutable_scaling,
         const field_type& mutable_scaling)
         : immutable_scaling_(immutable_scaling),
@@ -68,6 +66,12 @@ namespace Dune
         y.axpy(alpha,temp);
       }
 
+      //! Category of the linear operator (see SolverCategory::Category)
+      virtual SolverCategory::Category category() const
+      {
+        return SolverCategory::sequential;
+      }
+
     protected:
       const field_type immutable_scaling_;
       const field_type& mutable_scaling_;
@@ -92,8 +96,6 @@ namespace Dune
       typedef typename OP1::range_type range_type;
       typedef typename domain_type::field_type field_type;
 
-      enum {category = Dune::SolverCategory::sequential};
-
       LinearOperatorSum (const OP1& op1, const OP2& op2)
         : op1_(op1), op2_(op2)
       {
@@ -118,6 +120,12 @@ namespace Dune
         y.axpy(alpha,temp);
       }
 
+      //! Category of the linear operator (see SolverCategory::Category)
+      virtual SolverCategory::Category category() const
+      {
+        return SolverCategory::sequential;
+      }
+
     protected:
       const OP1& op1_;
       const OP2& op2_;
-- 
GitLab