Don't reference OwnerOverlap* unless MPI is available

The class OwnerOverlapCopyCommunication is not defined unless MPI is
avilable.  Therefore, we cannot reference the type unless we know
that MPI is available in the current translation unit.
This commit is contained in:
Bård Skaflestad
2014-04-07 19:35:10 +02:00
parent f67ed5d334
commit 99d7f61822

View File

@@ -225,10 +225,14 @@ namespace Opm
break; break;
case FastAMG: case FastAMG:
#if defined(HAS_DUNE_FAST_AMG) || DUNE_VERSION_NEWER(DUNE_ISTL, 2, 3) #if defined(HAS_DUNE_FAST_AMG) || DUNE_VERSION_NEWER(DUNE_ISTL, 2, 3)
#if HAVE_MPI
if(std::is_same<C,Dune::OwnerOverlapCopyCommunication<int,int> >::value) if(std::is_same<C,Dune::OwnerOverlapCopyCommunication<int,int> >::value)
{ {
OPM_THROW(std::runtime_error, "Trying to use sequential FastAMG solver for a parallel problem!"); OPM_THROW(std::runtime_error, "Trying to use sequential FastAMG solver for a parallel problem!");
} }
#endif // HAVE_MPI
res = solveFastAMG(opA, x, b, sp, comm, linsolver_residual_tolerance_, maxit, linsolver_verbosity_, res = solveFastAMG(opA, x, b, sp, comm, linsolver_residual_tolerance_, maxit, linsolver_verbosity_,
linsolver_prolongate_factor_); linsolver_prolongate_factor_);
#else #else