From 943e26209b3773cf440af50ce3bb041fc3b3c055 Mon Sep 17 00:00:00 2001 From: hanchuan <whc.shmily@gmail.com> Date: Sat, 4 Mar 2023 22:29:09 +0100 Subject: [PATCH] [examples][cleanup] remove solver deprecation warnings --- examples/2pinfiltration/main.cc | 6 ++++-- examples/shallowwaterfriction/main.cc | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/2pinfiltration/main.cc b/examples/2pinfiltration/main.cc index d74be4dce8..d8c06a1ebf 100644 --- a/examples/2pinfiltration/main.cc +++ b/examples/2pinfiltration/main.cc @@ -38,8 +38,9 @@ #include <dumux/common/initialize.hh> //We include the linear solver to be used to solve the linear system and the nonlinear Newton's method -#include <dumux/linear/amgbackend.hh> +#include <dumux/linear/istlsolvers.hh> #include <dumux/linear/linearsolvertraits.hh> +#include <dumux/linear/linearalgebratraits.hh> #include <dumux/nonlinear/newtonsolver.hh> // Further, we include assembler, which assembles the linear systems for finite volume schemes (box-scheme, tpfa-approximation, mpfa-approximation) and a file that defines the different differentiation methods used to compute the derivatives of the residual @@ -212,7 +213,8 @@ int main(int argc, char** argv) try auto assembler = std::make_shared<Assembler>(problem, gridGeometry, gridVariables, timeLoop, xOld); // We set the linear solver and the non-linear solver - using LinearSolver = AMGBiCGSTABBackend<LinearSolverTraits<GridGeometry>>; + using LinearSolver = AMGBiCGSTABIstlSolver<LinearSolverTraits<GridGeometry>, + LinearAlgebraTraitsFromAssembler<Assembler>>; auto linearSolver = std::make_shared<LinearSolver>(leafGridView, gridGeometry->dofMapper()); using NewtonSolver = Dumux::NewtonSolver<Assembler, LinearSolver>; diff --git a/examples/shallowwaterfriction/main.cc b/examples/shallowwaterfriction/main.cc index c28d65422d..e80c599ce2 100644 --- a/examples/shallowwaterfriction/main.cc +++ b/examples/shallowwaterfriction/main.cc @@ -40,8 +40,9 @@ // The following files contains the available linear solver backends, the non linear Newton Solver // and the assembler for the linear systems arising from finite volume discretizations // (box-scheme, tpfa-approximation, mpfa-approximation). +#include <dumux/linear/istlsolvers.hh> #include <dumux/linear/linearsolvertraits.hh> -#include <dumux/linear/amgbackend.hh> +#include <dumux/linear/linearalgebratraits.hh> #include <dumux/nonlinear/newtonsolver.hh> #include <dumux/assembly/fvassembler.hh> @@ -136,7 +137,8 @@ int main(int argc, char** argv) try auto assembler = std::make_shared<Assembler>(problem, gridGeometry, gridVariables, timeLoop, xOld); // We initialize the linear solver. - using LinearSolver = AMGBiCGSTABBackend<LinearSolverTraits<GridGeometry>>; + using LinearSolver = AMGBiCGSTABIstlSolver<LinearSolverTraits<GridGeometry>, + LinearAlgebraTraitsFromAssembler<Assembler>>; auto linearSolver = std::make_shared<LinearSolver>(leafGridView, gridGeometry->dofMapper()); // We initialize the non-linear solver. -- GitLab