From c0c82fc073a22d822f8043cbe988d7c5489bfb45 Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Sun, 19 Feb 2023 14:11:09 +0100 Subject: [PATCH] [linear][test] Use new-style ISTL solvers in several tests --- examples/biomineralization/doc/mainfile.md | 8 ++++++-- examples/biomineralization/main.cc | 8 ++++++-- test/freeflow/navierstokes/donea/CMakeLists.txt | 2 +- test/freeflow/navierstokes/donea/main.cc | 7 +++++-- test/freeflow/navierstokes/donea/main_momentum.cc | 4 +++- test/freeflow/navierstokes/kovasznay/main.cc | 8 ++++++-- test/freeflow/navierstokes/sincos/CMakeLists.txt | 6 +++--- test/freeflow/navierstokes/sincos/main.cc | 2 ++ test/freeflow/shallowwater/dambreak/main.cc | 6 ++++-- test/multidomain/boundary/darcydarcy/1p_1p/main.cc | 8 +++++--- .../boundary/darcydarcy/1p_1p/params.input | 3 +++ test/multidomain/poromechanics/el1p/main.cc | 8 ++++++-- .../porousmediumflow/1p/incompressible/CMakeLists.txt | 5 +++-- test/porousmediumflow/1p/incompressible/main.cc | 11 ++++++++--- test/porousmediumflow/2p2c/injection/main.cc | 6 ++++-- test/porousmediumflow/2p2c/waterair/main.cc | 6 ++++-- test/porousmediumflow/richards/lens/main.cc | 6 +++++- 17 files changed, 74 insertions(+), 30 deletions(-) diff --git a/examples/biomineralization/doc/mainfile.md b/examples/biomineralization/doc/mainfile.md index 12270ff24e..1585debf7f 100644 --- a/examples/biomineralization/doc/mainfile.md +++ b/examples/biomineralization/doc/mainfile.md @@ -49,7 +49,9 @@ The following files contain the nonlinear Newtown method, the linear solver and ```cpp #include <dumux/nonlinear/newtonsolver.hh> -#include <dumux/linear/amgbackend.hh> +#include <dumux/linear/istlsolvers.hh> +#include <dumux/linear/linearalgebratraits.hh> +#include <dumux/linear/linearsolvertraits.hh> #include <dumux/assembly/fvassembler.hh> #include <dumux/assembly/diffmethod.hh> ``` @@ -222,7 +224,9 @@ Additionally the linear and non-linear solvers are set auto assembler = std::make_shared<Assembler>(problem, gridGeometry, gridVariables, timeLoop, xOld); //We set the linear solver - using LinearSolver = Dumux::ILU0BiCGSTABBackend; + using LinearSolver = ILUBiCGSTABIstlSolver< + LinearSolverTraits<GridGeometry>, LinearAlgebraTraitsFromAssembler<Assembler> + >; auto linearSolver = std::make_shared<LinearSolver>(); //We set the non-linear solver diff --git a/examples/biomineralization/main.cc b/examples/biomineralization/main.cc index b6a70efd04..98862b9c0a 100644 --- a/examples/biomineralization/main.cc +++ b/examples/biomineralization/main.cc @@ -41,7 +41,9 @@ // The following files contain the nonlinear Newtown method, the linear solver and the assembler #include <dumux/nonlinear/newtonsolver.hh> -#include <dumux/linear/amgbackend.hh> +#include <dumux/linear/istlsolvers.hh> +#include <dumux/linear/linearalgebratraits.hh> +#include <dumux/linear/linearsolvertraits.hh> #include <dumux/assembly/fvassembler.hh> #include <dumux/assembly/diffmethod.hh> @@ -182,7 +184,9 @@ int main(int argc, char** argv) try auto assembler = std::make_shared<Assembler>(problem, gridGeometry, gridVariables, timeLoop, xOld); //We set the linear solver - using LinearSolver = Dumux::ILU0BiCGSTABBackend; + using LinearSolver = ILUBiCGSTABIstlSolver< + LinearSolverTraits<GridGeometry>, LinearAlgebraTraitsFromAssembler<Assembler> + >; auto linearSolver = std::make_shared<LinearSolver>(); //We set the non-linear solver diff --git a/test/freeflow/navierstokes/donea/CMakeLists.txt b/test/freeflow/navierstokes/donea/CMakeLists.txt index 9ed592e5be..6692a2a11d 100644 --- a/test/freeflow/navierstokes/donea/CMakeLists.txt +++ b/test/freeflow/navierstokes/donea/CMakeLists.txt @@ -14,7 +14,7 @@ dumux_add_test(NAME test_ff_stokes_donea_momentum dumux_add_test(NAME test_ff_stokes_donea_momentum_parallel LABELS freeflow navierstokes donea TARGET test_ff_stokes_donea_momentum - CMAKE_GUARD "( HAVE_UMFPACK AND HAVE_MPI AND ( DUNE_ISTL_VERSION VERSION_GREATER_EQUAL 2.8 ) )" + CMAKE_GUARD "( HAVE_UMFPACK AND HAVE_MPI )" COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --zeroThreshold {"rank":100} --files ${CMAKE_SOURCE_DIR}/test/references/test_ff_stokes_donea_momentum-reference.vtu diff --git a/test/freeflow/navierstokes/donea/main.cc b/test/freeflow/navierstokes/donea/main.cc index f93531b781..541ec64892 100644 --- a/test/freeflow/navierstokes/donea/main.cc +++ b/test/freeflow/navierstokes/donea/main.cc @@ -36,7 +36,10 @@ #include <dumux/common/properties.hh> #include <dumux/io/grid/gridmanager.hh> #include <dumux/io/vtkoutputmodule.hh> -#include <dumux/linear/seqsolverbackend.hh> + +#include <dumux/linear/istlsolvers.hh> +#include <dumux/linear/linearsolvertraits.hh> +#include <dumux/linear/linearalgebratraits.hh> #include <dumux/multidomain/fvassembler.hh> #include <dumux/multidomain/traits.hh> @@ -142,7 +145,7 @@ int main(int argc, char** argv) couplingManager); // the linear solver - using LinearSolver = Dumux::UMFPackBackend; + using LinearSolver = UMFPackIstlSolver<SeqLinearSolverTraits, LinearAlgebraTraitsFromAssembler<Assembler>>; auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver diff --git a/test/freeflow/navierstokes/donea/main_momentum.cc b/test/freeflow/navierstokes/donea/main_momentum.cc index ae16a4fa74..af23d0888a 100644 --- a/test/freeflow/navierstokes/donea/main_momentum.cc +++ b/test/freeflow/navierstokes/donea/main_momentum.cc @@ -49,6 +49,7 @@ #include <dumux/nonlinear/newtonsolver.hh> #include <dumux/linear/linearsolvertraits.hh> +#include <dumux/linear/linearalgebratraits.hh> #include <dumux/linear/istlsolverfactorybackend.hh> #include <test/freeflow/navierstokes/analyticalsolutionvectors.hh> @@ -233,7 +234,8 @@ int main(int argc, char** argv) using Assembler = FVAssembler<TypeTag, DiffMethod::numeric>; auto assembler = std::make_shared<Assembler>(problem, gridGeometry, gridVariables); - using LinearSolver = IstlSolverFactoryBackend<LinearSolverTraits<GridGeometry>>; + using LinearSolver = IstlSolverFactoryBackend<LinearSolverTraits<GridGeometry>, + LinearAlgebraTraitsFromAssembler<Assembler>>; const auto& dofMapper = LinearSolverTraits<GridGeometry>::dofMapper(*gridGeometry); auto linearSolver = std::make_shared<LinearSolver>(gridGeometry->gridView(), dofMapper); diff --git a/test/freeflow/navierstokes/kovasznay/main.cc b/test/freeflow/navierstokes/kovasznay/main.cc index 3aee4a5e28..f552eb33ab 100644 --- a/test/freeflow/navierstokes/kovasznay/main.cc +++ b/test/freeflow/navierstokes/kovasznay/main.cc @@ -41,9 +41,11 @@ #include <dumux/io/grid/gridmanager_sub.hh> #include <dumux/io/grid/gridmanager_yasp.hh> #include <dumux/io/staggeredvtkoutputmodule.hh> -#include <dumux/linear/seqsolverbackend.hh> #include <dumux/nonlinear/newtonsolver.hh> + #include <dumux/linear/linearsolvertraits.hh> +#include <dumux/linear/istlsolvers.hh> +#include <dumux/linear/linearalgebratraits.hh> #include <test/freeflow/navierstokes/analyticalsolutionvectors.hh> #include <test/freeflow/navierstokes/errors.hh> @@ -143,7 +145,9 @@ int main(int argc, char** argv) auto assembler = std::make_shared<Assembler>(problem, gridGeometry, gridVariables); // the linear solver - using LinearSolver = Dumux::UzawaBiCGSTABBackend<LinearSolverTraits<GridGeometry>>; // if rho \neq 1, use UMFPack rather than BIGCStab + using LinearSolver = Dumux::UzawaBiCGSTABIstlSolver< + LinearSolverTraits<GridGeometry>, LinearAlgebraTraitsFromAssembler<Assembler> + >; // if rho \neq 1, use UMFPack rather than BIGCStab auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver diff --git a/test/freeflow/navierstokes/sincos/CMakeLists.txt b/test/freeflow/navierstokes/sincos/CMakeLists.txt index 8f0d7d3d5b..2aab188685 100644 --- a/test/freeflow/navierstokes/sincos/CMakeLists.txt +++ b/test/freeflow/navierstokes/sincos/CMakeLists.txt @@ -6,7 +6,7 @@ dumux_add_test(NAME test_ff_navierstokes_sincos LABELS freeflow TIMEOUT 3600 CMAKE_GUARD HAVE_UMFPACK - COMPILE_DEFINITIONS LINEARSOLVER=UMFPackBackend + COMPILE_DEFINITIONS LINEARSOLVER=UMFPackIstlSolver<SeqLinearSolverTraits,LinearAlgebraTraitsFromAssembler<Assembler>> COMMAND ./convergencetest.py CMD_ARGS test_ff_navierstokes_sincos params.input -Grid.UpperRight "6.28 6.28" @@ -21,7 +21,7 @@ dumux_add_test(NAME test_ff_navierstokes_sincos_instationary LABELS freeflow TIMEOUT 3600 CMAKE_GUARD HAVE_UMFPACK - COMPILE_DEFINITIONS LINEARSOLVER=UMFPackBackend + COMPILE_DEFINITIONS LINEARSOLVER=UMFPackIstlSolver<SeqLinearSolverTraits,LinearAlgebraTraitsFromAssembler<Assembler>> COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/test_ff_navierstokes_sincos_instationary-reference.vtu @@ -38,7 +38,7 @@ dumux_add_test(NAME test_ff_navierstokes_sincos_uzawapreconditioner_factory LABELS freeflow TIMEOUT 5000 CMAKE_GUARD "( HAVE_UMFPACK AND ( ( DUNE_ISTL_VERSION VERSION_GREATER 2.7 ) OR ( DUNE_ISTL_VERSION VERSION_EQUAL 2.7 ) ) )" - COMPILE_DEFINITIONS LINEARSOLVER=IstlSolverFactoryBackend<LinearSolverTraits<MassGridGeometry>> + COMPILE_DEFINITIONS LINEARSOLVER=IstlSolverFactoryBackend<LinearSolverTraits<MassGridGeometry>,LinearAlgebraTraitsFromAssembler<Assembler>> COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/test_ff_navierstokes_sincos_instationary-reference.vtu diff --git a/test/freeflow/navierstokes/sincos/main.cc b/test/freeflow/navierstokes/sincos/main.cc index 2b261b0786..54ede4c803 100644 --- a/test/freeflow/navierstokes/sincos/main.cc +++ b/test/freeflow/navierstokes/sincos/main.cc @@ -43,6 +43,8 @@ #include <dumux/linear/seqsolverbackend.hh> #include <dumux/linear/linearsolvertraits.hh> +#include <dumux/linear/linearalgebratraits.hh> +#include <dumux/linear/istlsolvers.hh> #include <dumux/linear/istlsolverfactorybackend.hh> #include <dumux/multidomain/fvassembler.hh> diff --git a/test/freeflow/shallowwater/dambreak/main.cc b/test/freeflow/shallowwater/dambreak/main.cc index f45b20701b..42d6e95ddb 100644 --- a/test/freeflow/shallowwater/dambreak/main.cc +++ b/test/freeflow/shallowwater/dambreak/main.cc @@ -39,7 +39,8 @@ #include <dumux/io/grid/gridmanager.hh> #include <dumux/linear/linearsolvertraits.hh> -#include <dumux/linear/istlsolverfactorybackend.hh> +#include <dumux/linear/linearalgebratraits.hh> +#include <dumux/linear/istlsolvers.hh> #include <dumux/nonlinear/newtonsolver.hh> @@ -123,7 +124,8 @@ int main(int argc, char** argv) auto assembler = std::make_shared<Assembler>(problem, gridGeometry, gridVariables, timeLoop, xOld); // the linear solver - using LinearSolver = IstlSolverFactoryBackend<LinearSolverTraits<GridGeometry>>; + using LinearSolver = ILUBiCGSTABIstlSolver<LinearSolverTraits<GridGeometry>, + LinearAlgebraTraitsFromAssembler<Assembler>>; auto linearSolver = std::make_shared<LinearSolver>(leafGridView, gridGeometry->dofMapper()); // the non-linear solver diff --git a/test/multidomain/boundary/darcydarcy/1p_1p/main.cc b/test/multidomain/boundary/darcydarcy/1p_1p/main.cc index 394e15fbef..7327de85e7 100644 --- a/test/multidomain/boundary/darcydarcy/1p_1p/main.cc +++ b/test/multidomain/boundary/darcydarcy/1p_1p/main.cc @@ -39,7 +39,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/io/vtkoutputmodule.hh> #include <dumux/io/grid/gridmanager_yasp.hh> @@ -197,7 +199,7 @@ int main(int argc, char** argv) auto timeLoop = std::make_shared<TimeLoop<Scalar>>(0.0, dt, tEnd); timeLoop->setMaxTimeStepSize(maxDt); - // the assembler with time loop for instationary problem + // the assembler with time loop for transient problem using Assembler = MultiDomainFVAssembler<Traits, CouplingManager, DiffMethod::numeric>; auto assembler = std::make_shared<Assembler>(std::make_tuple(problem0, problem1), std::make_tuple(fvGridGeometry0, fvGridGeometry1), @@ -205,7 +207,7 @@ int main(int argc, char** argv) couplingManager, timeLoop, oldSol); // the linear solver - using LinearSolver = ILU0BiCGSTABBackend; + using LinearSolver = AMGBiCGSTABIstlSolver<SeqLinearSolverTraits, LinearAlgebraTraitsFromAssembler<Assembler>>; auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver diff --git a/test/multidomain/boundary/darcydarcy/1p_1p/params.input b/test/multidomain/boundary/darcydarcy/1p_1p/params.input index b85ae540b3..0ceb46ea89 100644 --- a/test/multidomain/boundary/darcydarcy/1p_1p/params.input +++ b/test/multidomain/boundary/darcydarcy/1p_1p/params.input @@ -35,3 +35,6 @@ LensUpperRight = 0.8 0.8 Permeability = 1e-10 # [m^2] PermeabilityLens = 1e-12 # [m^2] + +[LinearSolver.Preconditioner] +AmgDefaultAggregationDimension = 2 diff --git a/test/multidomain/poromechanics/el1p/main.cc b/test/multidomain/poromechanics/el1p/main.cc index 316c2add0c..810a815ec2 100644 --- a/test/multidomain/poromechanics/el1p/main.cc +++ b/test/multidomain/poromechanics/el1p/main.cc @@ -32,7 +32,10 @@ #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/multidomain/newtonsolver.hh> #include <dumux/multidomain/fvassembler.hh> #include <dumux/multidomain/traits.hh> @@ -144,7 +147,8 @@ int main(int argc, char** argv) couplingManager); // the linear solver - using LinearSolver = ILU0BiCGSTABBackend; + using LinearSolver = ILUBiCGSTABIstlSolver<SeqLinearSolverTraits, + LinearAlgebraTraitsFromAssembler<Assembler>>; auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver diff --git a/test/porousmediumflow/1p/incompressible/CMakeLists.txt b/test/porousmediumflow/1p/incompressible/CMakeLists.txt index be69321cdb..d6aefdbace 100644 --- a/test/porousmediumflow/1p/incompressible/CMakeLists.txt +++ b/test/porousmediumflow/1p/incompressible/CMakeLists.txt @@ -98,6 +98,7 @@ dumux_add_test(NAME test_1p_incompressible_fcdiamond_numdiff_ug LABELS porousmediumflow 1p SOURCES main.cc CMAKE_GUARD dune-uggrid_FOUND + COMPILE_DEFINITIONS LINEARSOLVER=ILUBiCGSTABIstlSolver<LinearSolverTraits<GridGeometry>,LinearAlgebraTraitsFromAssembler<Assembler>> COMPILE_DEFINITIONS GRIDTYPE=Dune::UGGrid<2> COMPILE_DEFINITIONS TYPETAG=OnePIncompressibleFCDiamond NUMDIFFMETHOD=DiffMethod::numeric COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py @@ -111,7 +112,7 @@ dumux_add_test(NAME test_1p_incompressible_fcdiamond_numdiff_ug dumux_add_test(NAME test_1p_incompressible_pq1bubble_numdiff LABELS porousmediumflow 1p SOURCES main.cc - COMPILE_DEFINITIONS LINEARSOLVER=ILU0BiCGSTABBackend + COMPILE_DEFINITIONS LINEARSOLVER=ILUBiCGSTABIstlSolver<LinearSolverTraits<GridGeometry>,LinearAlgebraTraitsFromAssembler<Assembler>> COMPILE_DEFINITIONS TYPETAG=OnePIncompressiblePQ1Bubble NUMDIFFMETHOD=DiffMethod::numeric COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy @@ -126,7 +127,7 @@ dumux_add_test(NAME test_1p_incompressible_pq1bubble_numdiff_ug SOURCES main.cc CMAKE_GUARD dune-uggrid_FOUND COMPILE_DEFINITIONS GRIDTYPE=Dune::UGGrid<2> - COMPILE_DEFINITIONS LINEARSOLVER=ILU0BiCGSTABBackend + COMPILE_DEFINITIONS LINEARSOLVER=ILUBiCGSTABIstlSolver<LinearSolverTraits<GridGeometry>,LinearAlgebraTraitsFromAssembler<Assembler>> COMPILE_DEFINITIONS TYPETAG=OnePIncompressiblePQ1Bubble NUMDIFFMETHOD=DiffMethod::numeric COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzy diff --git a/test/porousmediumflow/1p/incompressible/main.cc b/test/porousmediumflow/1p/incompressible/main.cc index f235f78a72..63a1a67a52 100644 --- a/test/porousmediumflow/1p/incompressible/main.cc +++ b/test/porousmediumflow/1p/incompressible/main.cc @@ -25,7 +25,7 @@ #include <config.h> #ifndef LINEARSOLVER -#define LINEARSOLVER SSORCGBackend +#define LINEARSOLVER SSORCGIstlSolver<LinearSolverTraits<GridGeometry>,LinearAlgebraTraitsFromAssembler<Assembler>> #endif #include <ctime> @@ -36,6 +36,10 @@ #include <dune/common/timer.hh> #include <dune/grid/io/file/vtk.hh> +#include <dumux/linear/linearalgebratraits.hh> +#include <dumux/linear/linearsolvertraits.hh> +#include <dumux/linear/istlsolvers.hh> +#include <dumux/linear/pdesolver.hh> #include <dumux/linear/seqsolverbackend.hh> #include <dumux/common/properties.hh> @@ -162,8 +166,9 @@ int main(int argc, char** argv) // output result to vtk vtkWriter.write(1.0); - // output residual norm (test assembler interface) - std::cout << "Residual norm: " << assembler->residualNorm(x) << std::endl; + // output residual norm (test assembler/solver interface) + assembler->assembleResidual(x); + std::cout << "Residual norm: " << linearSolver->norm(assembler->residual()) << std::endl; timer.stop(); diff --git a/test/porousmediumflow/2p2c/injection/main.cc b/test/porousmediumflow/2p2c/injection/main.cc index 87a86d2fcb..3a5157a49b 100644 --- a/test/porousmediumflow/2p2c/injection/main.cc +++ b/test/porousmediumflow/2p2c/injection/main.cc @@ -33,7 +33,8 @@ #include <dumux/common/parameters.hh> #include <dumux/common/dumuxmessage.hh> -#include <dumux/linear/amgbackend.hh> +#include <dumux/linear/istlsolvers.hh> +#include <dumux/linear/linearalgebratraits.hh> #include <dumux/linear/linearsolvertraits.hh> #include <dumux/nonlinear/newtonsolver.hh> @@ -130,7 +131,8 @@ int main(int argc, char** argv) auto assembler = std::make_shared<Assembler>(problem, gridGeometry, gridVariables, timeLoop, xOld); // the linear solver - using LinearSolver = AMGBiCGSTABBackend<LinearSolverTraits<GridGeometry>>; + using LinearSolver = ILUBiCGSTABIstlSolver<LinearSolverTraits<GridGeometry>, + LinearAlgebraTraitsFromAssembler<Assembler>>; auto linearSolver = std::make_shared<LinearSolver>(leafGridView, gridGeometry->dofMapper()); // the non-linear solver diff --git a/test/porousmediumflow/2p2c/waterair/main.cc b/test/porousmediumflow/2p2c/waterair/main.cc index 28328b13fe..3b1590da88 100644 --- a/test/porousmediumflow/2p2c/waterair/main.cc +++ b/test/porousmediumflow/2p2c/waterair/main.cc @@ -33,8 +33,9 @@ #include <dumux/common/parameters.hh> #include <dumux/common/dumuxmessage.hh> -#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> #include <dumux/assembly/fvassembler.hh> @@ -113,7 +114,8 @@ int main(int argc, char** argv) auto assembler = std::make_shared<Assembler>(problem, gridGeometry, gridVariables, timeLoop, xOld); // the linear solver - using LinearSolver = AMGBiCGSTABBackend<LinearSolverTraits<GridGeometry>>; + using LinearSolver = AMGBiCGSTABIstlSolver<LinearSolverTraits<GridGeometry>, + LinearAlgebraTraitsFromAssembler<Assembler>>; auto linearSolver = std::make_shared<LinearSolver>(leafGridView, gridGeometry->dofMapper()); // the non-linear solver diff --git a/test/porousmediumflow/richards/lens/main.cc b/test/porousmediumflow/richards/lens/main.cc index 824db0db7b..22c88b273d 100644 --- a/test/porousmediumflow/richards/lens/main.cc +++ b/test/porousmediumflow/richards/lens/main.cc @@ -34,6 +34,8 @@ #include <dumux/common/dumuxmessage.hh> #include <dumux/common/initialize.hh> #include <dumux/linear/linearsolvertraits.hh> +#include <dumux/linear/linearalgebratraits.hh> + #include <dumux/linear/istlsolverfactorybackend.hh> #include <dumux/linear/linearsolvertraits.hh> @@ -143,7 +145,9 @@ int main(int argc, char** argv) auto assembler = std::make_shared<Assembler>(problem, gridGeometry, gridVariables, timeLoop, xOld); // the linear solver - using LinearSolver = IstlSolverFactoryBackend<LinearSolverTraits<GridGeometry>>; + using LinearSolver = IstlSolverFactoryBackend<LinearSolverTraits<GridGeometry>, + LinearAlgebraTraitsFromAssembler<Assembler>>; + auto linearSolver = std::make_shared<LinearSolver>(leafGridView, gridGeometry->dofMapper()); // the non-linear solver -- GitLab