mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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.
This commit is contained in:
parent
49a279bfac
commit
42e55ee38b
@ -60,8 +60,11 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
|
||||
|
||||
#include <opm/autodiff/ISTLSolver.hpp>
|
||||
|
||||
#include <opm/common/data/SimulationDataContainer.hpp>
|
||||
|
||||
#include <dune/istl/owneroverlapcopy.hh>
|
||||
#include <dune/common/parallel/collectivecommunication.hh>
|
||||
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
@ -439,7 +442,11 @@ namespace Opm {
|
||||
typedef Y range_type;
|
||||
typedef typename X::field_type field_type;
|
||||
|
||||
#if HAVE_MPI
|
||||
typedef Dune::OwnerOverlapCopyCommunication<int,int> communication_type;
|
||||
#else
|
||||
typedef Dune::CollectiveCommunication<int> 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_; }
|
||||
|
Loading…
Reference in New Issue
Block a user