From 42e55ee38b6ea9908cdb852a748b63f1a4a09536 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Fri, 11 Nov 2016 14:25:19 +0100 Subject: [PATCH] fix the build if MPI is not available I'm not really sure if the fix is semantically correct (Dune communicators are strange beasts if you're new to them), but at least this patch fixes the build without MPI and the resulting flow_ebos binary seems to work fine. --- opm/autodiff/BlackoilModelEbos.hpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/opm/autodiff/BlackoilModelEbos.hpp b/opm/autodiff/BlackoilModelEbos.hpp index dff068ba9..cb1bcebfe 100644 --- a/opm/autodiff/BlackoilModelEbos.hpp +++ b/opm/autodiff/BlackoilModelEbos.hpp @@ -60,8 +60,11 @@ #include #include - #include + +#include +#include + #include #include #include @@ -439,7 +442,11 @@ namespace Opm { typedef Y range_type; typedef typename X::field_type field_type; +#if HAVE_MPI typedef Dune::OwnerOverlapCopyCommunication communication_type; +#else + typedef Dune::CollectiveCommunication communication_type; +#endif enum { //! \brief The solver category. @@ -465,8 +472,10 @@ namespace Opm { A_.mv( x, y ); wellMod_.applyWellModel(x, y ); +#if HAVE_MPI if( comm_ ) comm_->project( y ); +#endif } virtual void applyscaleadd (field_type alpha, const X& x, Y& y) const @@ -474,8 +483,10 @@ namespace Opm { A_.usmv(alpha,x,y); wellMod_.applyWellModel(x, y ); +#if HAVE_MPI if( comm_ ) comm_->project( y ); +#endif } virtual const matrix_type& getmat() const { return A_; }