From 857573abfb25a9caa884324c5a5569946269da41 Mon Sep 17 00:00:00 2001 From: Timo Koch <timokoch@math.uio.no> Date: Thu, 16 Mar 2023 18:14:26 +0100 Subject: [PATCH] [examples][cleanup] Use UMFPackIstlSolver to replace deprecated UMFPackBackend --- examples/freeflowchannel/README.md | 6 ++++-- examples/freeflowchannel/main.cc | 6 ++++-- examples/liddrivencavity/doc/problem.md | 6 ++++-- examples/liddrivencavity/main.cc | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/examples/freeflowchannel/README.md b/examples/freeflowchannel/README.md index d3076c8925..23a79587eb 100644 --- a/examples/freeflowchannel/README.md +++ b/examples/freeflowchannel/README.md @@ -384,7 +384,9 @@ systems arising from the staggered-grid discretization. ```cpp #include <dumux/nonlinear/newtonsolver.hh> -#include <dumux/linear/seqsolverbackend.hh> +#include <dumux/linear/istlsolvers.hh> +#include <dumux/linear/linearalgebratraits.hh> +#include <dumux/linear/linearsolvertraits.hh> #include <dumux/assembly/staggeredfvassembler.hh> #include <dumux/assembly/diffmethod.hh> // analytic or numeric differentiation ``` @@ -565,7 +567,7 @@ This is where the Jacobian matrix for the Newton solver is assembled. We use UMFPack as direct linear solver within each Newton iteration. ```cpp - using LinearSolver = Dumux::UMFPackBackend; + using LinearSolver = Dumux::UMFPackIstlSolver<SeqLinearSolverTraits, LinearAlgebraTraitsFromAssembler<Assembler>>; auto linearSolver = std::make_shared<LinearSolver>(); ``` diff --git a/examples/freeflowchannel/main.cc b/examples/freeflowchannel/main.cc index eda6cc688f..f96f530ca5 100644 --- a/examples/freeflowchannel/main.cc +++ b/examples/freeflowchannel/main.cc @@ -42,7 +42,9 @@ // The following files contain the non-linear Newton solver, the available linear solver backends and the assembler for the linear // systems arising from the staggered-grid discretization. #include <dumux/nonlinear/newtonsolver.hh> -#include <dumux/linear/seqsolverbackend.hh> +#include <dumux/linear/istlsolvers.hh> +#include <dumux/linear/linearalgebratraits.hh> +#include <dumux/linear/linearsolvertraits.hh> #include <dumux/assembly/staggeredfvassembler.hh> #include <dumux/assembly/diffmethod.hh> // analytic or numeric differentiation @@ -182,7 +184,7 @@ int main(int argc, char** argv) try auto assembler = std::make_shared<Assembler>(problem, gridGeometry, gridVariables); // We use UMFPack as direct linear solver within each Newton iteration. - using LinearSolver = Dumux::UMFPackBackend; + using LinearSolver = Dumux::UMFPackIstlSolver<SeqLinearSolverTraits, LinearAlgebraTraitsFromAssembler<Assembler>>; auto linearSolver = std::make_shared<LinearSolver>(); // This example considers a linear problem (incompressible Stokes flow), therefore diff --git a/examples/liddrivencavity/doc/problem.md b/examples/liddrivencavity/doc/problem.md index e2d607cd1e..a41a2b43c3 100644 --- a/examples/liddrivencavity/doc/problem.md +++ b/examples/liddrivencavity/doc/problem.md @@ -377,7 +377,9 @@ The following files contain the multi-domain Newton solver, the available linear systems arising from the staggered-grid discretization. ```cpp -#include <dumux/linear/seqsolverbackend.hh> +#include <dumux/linear/istlsolvers.hh> +#include <dumux/linear/linearalgebratraits.hh> +#include <dumux/linear/linearsolvertraits.hh> #include <dumux/multidomain/fvassembler.hh> #include <dumux/multidomain/traits.hh> #include <dumux/multidomain/newtonsolver.hh> @@ -589,7 +591,7 @@ iteration. Here, we use the direct linear solver UMFPack. the linear solver ```cpp - using LinearSolver = Dumux::UMFPackBackend; + using LinearSolver = Dumux::UMFPackIstlSolver<SeqLinearSolverTraits, LinearAlgebraTraitsFromAssembler<Assembler>>; auto linearSolver = std::make_shared<LinearSolver>(); ``` diff --git a/examples/liddrivencavity/main.cc b/examples/liddrivencavity/main.cc index 4563115cff..ba809863f8 100644 --- a/examples/liddrivencavity/main.cc +++ b/examples/liddrivencavity/main.cc @@ -41,7 +41,9 @@ // The following files contain the multi-domain Newton solver, the available linear solver backends and the assembler for the linear // systems arising from the staggered-grid discretization. -#include <dumux/linear/seqsolverbackend.hh> +#include <dumux/linear/istlsolvers.hh> +#include <dumux/linear/linearalgebratraits.hh> +#include <dumux/linear/linearsolvertraits.hh> #include <dumux/multidomain/fvassembler.hh> #include <dumux/multidomain/traits.hh> #include <dumux/multidomain/newtonsolver.hh> @@ -207,7 +209,7 @@ int main(int argc, char** argv) std::make_tuple(momentumGridVariables, massGridVariables), couplingManager, timeLoop, xOld); // the linear solver - using LinearSolver = Dumux::UMFPackBackend; + using LinearSolver = Dumux::UMFPackIstlSolver<SeqLinearSolverTraits, LinearAlgebraTraitsFromAssembler<Assembler>>; auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver -- GitLab