mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fixed: quell deprecation warnings with dune 2.7
This commit is contained in:
parent
4978e72039
commit
cfa0904321
@ -53,7 +53,11 @@
|
||||
#include <opm/common/data/SimulationDataContainer.hpp>
|
||||
|
||||
#include <dune/istl/owneroverlapcopy.hh>
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
#include <dune/common/parallel/communication.hh>
|
||||
#else
|
||||
#include <dune/common/parallel/collectivecommunication.hh>
|
||||
#endif
|
||||
#include <dune/common/timer.hh>
|
||||
#include <dune/common/unused.hh>
|
||||
|
||||
|
@ -695,7 +695,11 @@ public:
|
||||
criterion_, true);
|
||||
|
||||
using CommunicationArgs = typename Dune::Amg::ConstructionTraits<Communication>::Arguments;
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
CommunicationArgs commArgs(communication_->communicator(), communication_->category());
|
||||
#else
|
||||
CommunicationArgs commArgs(communication_->communicator(), communication_->getSolverCategory());
|
||||
#endif
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
coarseLevelCommunication_ = Dune::Amg::ConstructionTraits<Communication>::construct(commArgs);
|
||||
#else
|
||||
|
@ -156,7 +156,11 @@ private:
|
||||
using C = Comm;
|
||||
doAddCreator("ILU0", [](const O& op, const P& prm, const C& comm) {
|
||||
const double w = prm.get<double>("relaxation");
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
return wrapBlockPreconditioner<DummyUpdatePreconditioner<SeqILU<M, V, V>>>(comm, op.getmat(), w);
|
||||
#else
|
||||
return wrapBlockPreconditioner<DummyUpdatePreconditioner<SeqILU0<M, V, V>>>(comm, op.getmat(), w);
|
||||
#endif
|
||||
});
|
||||
doAddCreator("ParOverILU0", [](const O& op, const P& prm, const C& comm) {
|
||||
const double w = prm.get<double>("relaxation");
|
||||
@ -167,7 +171,11 @@ private:
|
||||
doAddCreator("ILUn", [](const O& op, const P& prm, const C& comm) {
|
||||
const int n = prm.get<int>("ilulevel");
|
||||
const double w = prm.get<double>("relaxation");
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
return wrapBlockPreconditioner<DummyUpdatePreconditioner<SeqILU<M, V, V>>>(comm, op.getmat(), n, w);
|
||||
#else
|
||||
return wrapBlockPreconditioner<DummyUpdatePreconditioner<SeqILUn<M, V, V>>>(comm, op.getmat(), n, w);
|
||||
#endif
|
||||
});
|
||||
doAddCreator("Jac", [](const O& op, const P& prm, const C& comm) {
|
||||
const int n = prm.get<int>("repeats");
|
||||
@ -221,7 +229,11 @@ private:
|
||||
using P = boost::property_tree::ptree;
|
||||
doAddCreator("ILU0", [](const O& op, const P& prm) {
|
||||
const double w = prm.get<double>("relaxation");
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
return wrapPreconditioner<SeqILU<M, V, V>>(op.getmat(), w);
|
||||
#else
|
||||
return wrapPreconditioner<SeqILU0<M, V, V>>(op.getmat(), w);
|
||||
#endif
|
||||
});
|
||||
doAddCreator("ParOverILU0", [](const O& op, const P& prm) {
|
||||
const double w = prm.get<double>("relaxation");
|
||||
@ -230,7 +242,11 @@ private:
|
||||
doAddCreator("ILUn", [](const O& op, const P& prm) {
|
||||
const int n = prm.get<int>("ilulevel");
|
||||
const double w = prm.get<double>("relaxation");
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
return wrapPreconditioner<SeqILU<M, V, V>>(op.getmat(), n, w);
|
||||
#else
|
||||
return wrapPreconditioner<SeqILUn<M, V, V>>(op.getmat(), n, w);
|
||||
#endif
|
||||
});
|
||||
doAddCreator("Jac", [](const O& op, const P& prm) {
|
||||
const int n = prm.get<int>("repeats");
|
||||
@ -255,7 +271,11 @@ private:
|
||||
doAddCreator("amg", [](const O& op, const P& prm) {
|
||||
const std::string smoother = prm.get<std::string>("smoother");
|
||||
if (smoother == "ILU0") {
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
using Smoother = SeqILU<M, V, V>;
|
||||
#else
|
||||
using Smoother = SeqILU0<M, V, V>;
|
||||
#endif
|
||||
return makeAmgPreconditioner<Smoother>(op, prm);
|
||||
} else if (smoother == "Jac") {
|
||||
using Smoother = SeqJac<M, V, V>;
|
||||
@ -267,7 +287,11 @@ private:
|
||||
using Smoother = SeqSSOR<M, V, V>;
|
||||
return makeAmgPreconditioner<Smoother>(op, prm);
|
||||
} else if (smoother == "ILUn") {
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
using Smoother = SeqILU<M, V, V>;
|
||||
#else
|
||||
using Smoother = SeqILUn<M, V, V>;
|
||||
#endif
|
||||
return makeAmgPreconditioner<Smoother>(op, prm);
|
||||
} else {
|
||||
std::string msg("No such smoother: ");
|
||||
|
@ -92,7 +92,11 @@ namespace mswellhelpers
|
||||
Dune::MatrixAdapter<MatrixType, VectorType, VectorType> linearOperator(D);
|
||||
|
||||
// Sequential incomplete LU decomposition as the preconditioner
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
Dune::SeqILU<MatrixType, VectorType, VectorType> preconditioner(D, 1.0);
|
||||
#else
|
||||
Dune::SeqILU0<MatrixType, VectorType, VectorType> preconditioner(D, 1.0);
|
||||
#endif
|
||||
// Dune::SeqILUn<MatrixType, VectorType, VectorType> preconditioner(D, 1, 0.92);
|
||||
// Dune::SeqGS<MatrixType, VectorType, VectorType> preconditioner(D, 1, 1);
|
||||
// Dune::SeqJac<MatrixType, VectorType, VectorType> preconditioner(D, 1, 1);
|
||||
|
@ -30,8 +30,13 @@
|
||||
#endif
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
#include <dune/common/parallel/mpicommunication.hh>
|
||||
#include <dune/common/parallel/communication.hh>
|
||||
#else
|
||||
#include <dune/common/parallel/mpicollectivecommunication.hh>
|
||||
#include <dune/common/parallel/collectivecommunication.hh>
|
||||
#endif
|
||||
|
||||
#include <dune/common/parallel/indexset.hh>
|
||||
#include <dune/common/parallel/communicator.hh>
|
||||
|
@ -28,7 +28,11 @@
|
||||
#include <dune/common/unused.hh>
|
||||
#include <dune/common/parallel/indexset.hh>
|
||||
#include <dune/common/parallel/plocalindex.hh>
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
#include <dune/common/parallel/communication.hh>
|
||||
#else
|
||||
#include <dune/common/parallel/collectivecommunication.hh>
|
||||
#endif
|
||||
#include <dune/istl/bcrsmatrix.hh>
|
||||
#include <dune/istl/owneroverlapcopy.hh>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user