fix build with dune 2.6

This commit is contained in:
Arne Morten Kvarving 2021-12-09 08:57:40 +01:00
parent 390e5250f9
commit 2d0d48d8c9
2 changed files with 10 additions and 1 deletions

View File

@ -241,7 +241,7 @@ void CPR<block_size>::create_preconditioner_amg(BlockedMatrix *mat_) {
#if HAVE_MPI
using Communication = Dune::OwnerOverlapCopyCommunication<int, int>;
#else
using Communication = Dune::Amg::SequentialInformation;
using Communication = Dune::Amg::SequentialInformation;
#endif
using OverlapFlags = Dune::NegateSet<Communication::OwnerSet>;
if (recalculate_aggregates) {
@ -270,8 +270,12 @@ void CPR<block_size>::create_preconditioner_amg(BlockedMatrix *mat_) {
}
dune_op = std::make_shared<MatrixOperator>(*dune_coarse);
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
Dune::Amg::SequentialInformation seqinfo;
dune_amg = std::make_unique<DuneAmg>(dune_op, Dune::stackobject_to_shared_ptr(seqinfo));
#else
dune_amg = std::make_unique<DuneAmg>(*dune_op);
#endif
Opm::PropertyTree property_tree;
property_tree.put("alpha", 0.333333333333);

View File

@ -22,7 +22,12 @@
#include <mutex>
#include <dune/common/version.hh>
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
#include <dune/istl/paamg/matrixhierarchy.hh>
#else
#include <dune/istl/paamg/hierarchy.hh>
#endif
#include <dune/istl/umfpack.hh>
#include <opm/simulators/linalg/bda/BILU0.hpp>