From 9f16908b7d9eaf2a9573149b7c3d1be26ac30247 Mon Sep 17 00:00:00 2001 From: Markus Blatt <mblatt@dune-project.org> Date: Mon, 24 Jan 2011 11:55:06 +0000 Subject: [PATCH] Use a named enum to prevent ambiguities with MPICH. Completed checkin. [[Imported from SVN: r1446]] --- dune/istl/paamg/construction.hh | 5 +++-- dune/istl/paamg/hierarchy.hh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dune/istl/paamg/construction.hh b/dune/istl/paamg/construction.hh index 0ce21c616..514df2218 100644 --- a/dune/istl/paamg/construction.hh +++ b/dune/istl/paamg/construction.hh @@ -7,6 +7,7 @@ #include <dune/istl/bvector.hh> #include <dune/istl/operators.hh> #include <dune/istl/owneroverlapcopy.hh> +#include <dune/istl/solvercategory.hh> #include "pinfo.hh" namespace Dune @@ -105,12 +106,12 @@ namespace Dune #if HAVE_MPI struct OwnerOverlapCopyCommunicationArgs { - OwnerOverlapCopyCommunicationArgs(MPI_Comm comm, int cat) + OwnerOverlapCopyCommunicationArgs(MPI_Comm comm, SolverCategory::Category cat) : comm_(comm), cat_(cat) {} MPI_Comm comm_; - int cat_; + SolverCategory::Category cat_; }; #endif diff --git a/dune/istl/paamg/hierarchy.hh b/dune/istl/paamg/hierarchy.hh index bc4446785..78b926b89 100644 --- a/dune/istl/paamg/hierarchy.hh +++ b/dune/istl/paamg/hierarchy.hh @@ -776,7 +776,7 @@ namespace Dune static_cast<int>(MatrixOperator::category) == static_cast<int>(SolverCategory::nonoverlapping)), "MatrixOperator must be of category sequential or overlapping or nonoverlapping"); - if (static_cast<int>(MatrixOperator::category) != pinfo.getSolverCategory()) + if (static_cast<int>(MatrixOperator::category) != static_cast<int>(pinfo.getSolverCategory())) DUNE_THROW(ISTLError, "MatrixOperator and ParallelInformation must belong to the same category!"); } -- GitLab