mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-14 09:52:01 -05:00
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:
1 parent
f67ed5d334
commit
99d7f61822
1 file changed
+4
@@ -225,10 +225,14 @@ namespace Opm
|
||||
break;
|
||||
case FastAMG:
|
||||
#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)
|
||||
{
|
||||
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_,
|
||||
linsolver_prolongate_factor_);
|
||||
#else
|
||||
|
||||
Reference in new issue
Block a user