minimum dune version required is now 2.7

This commit is contained in:
Arne Morten Kvarving 2023-02-27 09:20:28 +01:00
parent 0cf9321cf4
commit 4c0f31c652
7 changed files with 1 additions and 35 deletions

View File

@ -10,4 +10,4 @@ Label: 2023.04-pre
Maintainer: arne.morten.kvarving@sintef.no
MaintainerName: Arne Morten Kvarving
Url: http://opm-project.org
Depends: dune-common (>= 2.6) dune-grid (>= 2.6) dune-istl (>= 2.6) opm-common opm-grid
Depends: dune-common (>= 2.7) dune-grid (>= 2.7) dune-istl (>= 2.7) opm-common opm-grid

View File

@ -55,11 +55,7 @@ typedef Dune::SeqSSOR<Matrix, Vector, Vector> SSORSmoother;
typedef Dune::SeqJac<Matrix, Vector, Vector> JACSmoother;
//! \brief ILU0 AMG smoother
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
typedef Dune::SeqILU<Matrix, Vector, Vector> ILUSmoother;
#else
typedef Dune::SeqILU0<Matrix, Vector, Vector> ILUSmoother;
#endif
//! \brief Schwarz + ILU0 AMG smoother
typedef Dune::SeqOverlappingSchwarz<Matrix,Vector,

View File

@ -1074,11 +1074,7 @@ IMPL_FUNC(void, solve(int loadcase))
{
try {
Dune::InverseOperatorResult r;
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
u[loadcase].resize(b[loadcase].size());
#else
u[loadcase].resize(b[loadcase].size(), false);
#endif
u[loadcase] = 0;
int solver=0;
#ifdef HAVE_OPENMP

View File

@ -75,11 +75,7 @@ class MortarSchurPre : public Dune::Preconditioner<Vector,Vector> {
MortarUtils::extractBlock(temp, d, M, N);
Dune::InverseOperatorResult r;
Vector temp2;
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
temp2.resize(temp.size());
#else
temp2.resize(temp.size(), false);
#endif
Lpre.apply(temp2, temp, r);
MortarUtils::injectBlock(v, temp2, M, N);
@ -88,11 +84,7 @@ class MortarSchurPre : public Dune::Preconditioner<Vector,Vector> {
if (!symmetric)
B.mmv(temp2, temp);
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
temp2.resize(N);
#else
temp2.resize(N, false);
#endif
temp2 = 0;
Apre.apply(temp2, temp);
MortarUtils::injectBlock(v, temp2, N);

View File

@ -24,11 +24,7 @@ class MortarUtils {
//! \param[in] start The first index in the range
static void extractBlock(Vector& x, const Vector& y, int len, int start=0)
{
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
x.resize(len);
#else
x.resize(len,false);
#endif
std::copy(y.begin()+start,y.begin()+len+start,x.begin());
}

View File

@ -176,15 +176,9 @@ namespace Opm {
ScalarBlockVector,
ScalarBlockVector> opA(A);
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
Dune::SeqILU<ScalarBCRSMatrix,
ScalarBlockVector,
ScalarBlockVector> precond(A, 1.0);
#else
Dune::SeqILU0<ScalarBCRSMatrix,
ScalarBlockVector,
ScalarBlockVector> precond(A, 1.0);
#endif
int maxit = A.N();
double tol = 5.0e-7;

View File

@ -1388,11 +1388,7 @@ namespace Opm {
Adapter opS(S_);
// Construct preconditioner.
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
Dune::SeqILU<MatrixT,VectorT,VectorT> precond(S_, 1.0);
#else
Dune::SeqILU0<MatrixT,VectorT,VectorT> precond(S_, 1.0);
#endif
// Construct solver for system of linear equations.
Dune::CGSolver<VectorT> linsolve(opS, precond, residTol,
@ -1457,11 +1453,7 @@ namespace Opm {
typedef Dune::SeqOverlappingSchwarz<Matrix,Vector,Dune::MultiplicativeSchwarzMode> Smoother;
#else
#if SMOOTHER_ILU
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
typedef Dune::SeqILU<Matrix,Vector,Vector> Smoother;
#else
typedef Dune::SeqILU0<Matrix,Vector,Vector> Smoother;
#endif
#else
typedef Dune::SeqSSOR<Matrix,Vector,Vector> Smoother;
#endif