From 84988f952c31aaee4b8ec142a2751d4a8aaeb628 Mon Sep 17 00:00:00 2001 From: Timo Koch <timokoch@math.uio.no> Date: Mon, 20 Mar 2023 11:19:07 +0100 Subject: [PATCH] [test] Replace ILU0RestartedGMResBackend by ILURestartedGMResIstlSolver --- test/porenetwork/1p/main.cc | 5 ++--- test/porenetwork/1p/noncreepingflow/main.cc | 7 +++++-- test/porousmediumflow/1p/rootbenchmark/main.cc | 8 +++++--- test/porousmediumflow/2p/incompressible/main.cc | 7 ++++--- test/porousmediumflow/2p/rotationsymmetry/main.cc | 7 ++++--- 5 files changed, 20 insertions(+), 14 deletions(-) diff --git a/test/porenetwork/1p/main.cc b/test/porenetwork/1p/main.cc index 0e12adc86a..cafea70b7c 100644 --- a/test/porenetwork/1p/main.cc +++ b/test/porenetwork/1p/main.cc @@ -36,6 +36,7 @@ #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> #include <dumux/common/dumuxmessage.hh> + #include <dumux/linear/istlsolvers.hh> #include <dumux/linear/linearsolvertraits.hh> #include <dumux/linear/linearalgebratraits.hh> @@ -123,9 +124,7 @@ int main(int argc, char** argv) // solve the linear system Dune::Timer solverTimer; - using LinearSolver = ILU0RestartedGMResBackend; - // using LinearSolver = ILUnRestartedGMResBackend; - // using LinearSolver = UMFPackIstlSolver<SeqLinearSolverTraits, LinearAlgebraTraitsFromAssembler<Assembler>>; + using LinearSolver = ILURestartedGMResIstlSolver<SeqLinearSolverTraits, LinearAlgebraTraitsFromAssembler<Assembler>>; auto linearSolver = std::make_shared<LinearSolver>(); if (mpiHelper.rank() == 0) std::cout << "Solving linear system using " + linearSolver->name() + "..." << std::flush; diff --git a/test/porenetwork/1p/noncreepingflow/main.cc b/test/porenetwork/1p/noncreepingflow/main.cc index 40746fae1a..1bb3ca993b 100644 --- a/test/porenetwork/1p/noncreepingflow/main.cc +++ b/test/porenetwork/1p/noncreepingflow/main.cc @@ -32,7 +32,10 @@ #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> #include <dumux/common/dumuxmessage.hh> -#include <dumux/linear/seqsolverbackend.hh> + +#include <dumux/linear/istlsolvers.hh> +#include <dumux/linear/linearsolvertraits.hh> +#include <dumux/linear/linearalgebratraits.hh> #include <dumux/nonlinear/newtonsolver.hh> #include <dumux/porenetwork/common/pnmvtkoutputmodule.hh> @@ -106,7 +109,7 @@ int main(int argc, char** argv) const auto boundaryFlux = Dumux::PoreNetwork::BoundaryFlux(*gridVariables, assembler->localResidual(), x); // the linear solver - using LinearSolver = ILU0RestartedGMResBackend; + using LinearSolver = ILURestartedGMResIstlSolver<SeqLinearSolverTraits, LinearAlgebraTraitsFromAssembler<Assembler>>; auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver diff --git a/test/porousmediumflow/1p/rootbenchmark/main.cc b/test/porousmediumflow/1p/rootbenchmark/main.cc index 617b2168f8..8abe93afc8 100644 --- a/test/porousmediumflow/1p/rootbenchmark/main.cc +++ b/test/porousmediumflow/1p/rootbenchmark/main.cc @@ -31,7 +31,9 @@ #include <dumux/common/initialize.hh> #include <dumux/common/properties.hh> -#include <dumux/linear/seqsolverbackend.hh> +#include <dumux/linear/istlsolvers.hh> +#include <dumux/linear/linearsolvertraits.hh> +#include <dumux/linear/linearalgebratraits.hh> #include <dumux/linear/pdesolver.hh> #include <dumux/assembly/fvassembler.hh> @@ -95,8 +97,8 @@ int main(int argc, char** argv) auto assembler = std::make_shared<Assembler>(problem, gridGeometry, gridVariables); // the linear solver - using LinearSolver = SSORCGBackend; - auto linearSolver = std::make_shared<LinearSolver>(); + using LinearSolver = SSORCGIstlSolver<LinearSolverTraits<GridGeometry>, LinearAlgebraTraitsFromAssembler<Assembler>>; + auto linearSolver = std::make_shared<LinearSolver>(gridGeometry->gridView(), gridGeometry->dofMapper()); // the system solver using Solver = Dumux::LinearPDESolver<Assembler, LinearSolver>; diff --git a/test/porousmediumflow/2p/incompressible/main.cc b/test/porousmediumflow/2p/incompressible/main.cc index dafa6cbf2b..f2e75bb0a4 100644 --- a/test/porousmediumflow/2p/incompressible/main.cc +++ b/test/porousmediumflow/2p/incompressible/main.cc @@ -34,8 +34,9 @@ #include <dumux/common/parameters.hh> #include <dumux/common/dumuxmessage.hh> -#include <dumux/linear/seqsolverbackend.hh> +#include <dumux/linear/istlsolvers.hh> #include <dumux/linear/linearsolvertraits.hh> +#include <dumux/linear/linearalgebratraits.hh> #include <dumux/nonlinear/newtonsolver.hh> #include <dumux/assembly/fvassembler.hh> @@ -142,8 +143,8 @@ int main(int argc, char** argv) auto assembler = std::make_shared<Assembler>(problem, gridGeometry, gridVariables, timeLoop, xOld); // the linear solver - using LinearSolver = ILU0RestartedGMResBackend; - auto linearSolver = std::make_shared<LinearSolver>(); + using LinearSolver = ILURestartedGMResIstlSolver<LinearSolverTraits<GridGeometry>, LinearAlgebraTraitsFromAssembler<Assembler>>; + auto linearSolver = std::make_shared<LinearSolver>(gridGeometry->gridView(), gridGeometry->dofMapper()); // the non-linear solver using NewtonSolver = Dumux::NewtonSolver<Assembler, LinearSolver>; diff --git a/test/porousmediumflow/2p/rotationsymmetry/main.cc b/test/porousmediumflow/2p/rotationsymmetry/main.cc index 4859426315..b5ce6838a8 100644 --- a/test/porousmediumflow/2p/rotationsymmetry/main.cc +++ b/test/porousmediumflow/2p/rotationsymmetry/main.cc @@ -26,8 +26,9 @@ #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> -#include <dumux/linear/seqsolverbackend.hh> +#include <dumux/linear/istlsolvers.hh> #include <dumux/linear/linearsolvertraits.hh> +#include <dumux/linear/linearalgebratraits.hh> #include <dumux/nonlinear/newtonsolver.hh> #include <dumux/assembly/fvassembler.hh> @@ -96,8 +97,8 @@ int main(int argc, char** argv) auto assembler = std::make_shared<Assembler>(problem, gridGeometry, gridVariables, timeLoop, xOld); // the linear solver - using LinearSolver = ILU0RestartedGMResBackend; - auto linearSolver = std::make_shared<LinearSolver>(); + using LinearSolver = ILURestartedGMResIstlSolver<LinearSolverTraits<GridGeometry>, LinearAlgebraTraitsFromAssembler<Assembler>>; + auto linearSolver = std::make_shared<LinearSolver>(gridGeometry->gridView(), gridGeometry->dofMapper()); // the non-linear solver using NewtonSolver = Dumux::NewtonSolver<Assembler, LinearSolver>; -- GitLab