diff --git a/test/freeflow/navierstokes/sincos/CMakeLists.txt b/test/freeflow/navierstokes/sincos/CMakeLists.txt index b11ea227015f096e71078e60e353dfd0e9282422..2be99bb669d38aa9bb91975c06a3ace4fcc1a14f 100644 --- a/test/freeflow/navierstokes/sincos/CMakeLists.txt +++ b/test/freeflow/navierstokes/sincos/CMakeLists.txt @@ -6,6 +6,7 @@ dumux_add_test(NAME test_ff_navierstokes_sincos LABELS freeflow TIMEOUT 1000 CMAKE_GUARD HAVE_UMFPACK + COMPILE_DEFINITIONS LINEARSOLVER=UMFPackBackend COMMAND ./convergencetest.py CMD_ARGS test_ff_navierstokes_sincos params.input -Grid.UpperRight "6.28 6.28" @@ -18,6 +19,7 @@ dumux_add_test(NAME test_ff_navierstokes_sincos_instationary TARGET test_ff_navierstokes_sincos LABELS freeflow CMAKE_GUARD HAVE_UMFPACK + COMPILE_DEFINITIONS LINEARSOLVER=UMFPackBackend 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 @@ -28,3 +30,20 @@ dumux_add_test(NAME test_ff_navierstokes_sincos_instationary -Problem.Name test_ff_navierstokes_sincos_instationary -Problem.IsStationary false -Component.LiquidKinematicViscosity 0.1") + +dumux_add_test(NAME test_ff_navierstokes_sincos_uzawapreconditioner_factory + SOURCES main.cc + LABELS freeflow + TIMEOUT 5000 + CMAKE_GUARD "( HAVE_UMFPACK AND DUNE_ISTL_VERSION GREATER_EQUAL 2.7 )" + COMPILE_DEFINITIONS LINEARSOLVER=IstlSolverFactoryBackend<LinearSolverTraits<GridGeometry>> + 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 + ${CMAKE_CURRENT_BINARY_DIR}/test_ff_navierstokes_sincos_uzawapreconditioner-00017.vtu + --command "${CMAKE_CURRENT_BINARY_DIR}/test_ff_navierstokes_sincos_uzawapreconditioner_factory params.input + -Grid.UpperRight '1 1' + -Grid.Cells '50 50' + -Problem.Name test_ff_navierstokes_sincos_uzawapreconditioner + -Problem.IsStationary false + -Component.LiquidKinematicViscosity 0.1") diff --git a/test/freeflow/navierstokes/sincos/main.cc b/test/freeflow/navierstokes/sincos/main.cc index 507ff765ca274320d2dcdab3e33761ca222aa6aa..12f0bc9facbf1da6b6931c34b5be5ae7f1202acf 100644 --- a/test/freeflow/navierstokes/sincos/main.cc +++ b/test/freeflow/navierstokes/sincos/main.cc @@ -41,11 +41,16 @@ #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> #include <dumux/common/valgrind.hh> -#include <dumux/io/grid/gridmanager.hh> +#include <dumux/io/grid/gridmanager_yasp.hh> #include <dumux/io/staggeredvtkoutputmodule.hh> #include <dumux/linear/seqsolverbackend.hh> #include <dumux/nonlinear/newtonsolver.hh> +#include <dune/common/version.hh> +#if DUNE_VERSION_NEWER_REV(DUNE_ISTL,2,7,1) +#include <dumux/linear/istlsolverfactorybackend.hh> +#endif + #include "problem.hh" /*! @@ -252,7 +257,7 @@ int main(int argc, char** argv) try : std::make_shared<Assembler>(problem, gridGeometry, gridVariables, timeLoop, xOld); // the linear solver - using LinearSolver = Dumux::UMFPackBackend; + using LinearSolver = LINEARSOLVER; auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver diff --git a/test/freeflow/navierstokes/sincos/params.input b/test/freeflow/navierstokes/sincos/params.input index 80f5d2becadc5c3abb0bff3c8bf8cf310fb9afd0..0da3caf350b99c444f236021777946ddeb951f23 100644 --- a/test/freeflow/navierstokes/sincos/params.input +++ b/test/freeflow/navierstokes/sincos/params.input @@ -4,7 +4,8 @@ TEnd = 1.0 # [s] [Grid] LowerLeft = 0 0 -UpperRight = 1 1 +UpperRight = 6.28 6.28 +Cells = 20 20 [Problem] Name = test_ff_sincos @@ -34,3 +35,13 @@ AddProcessRank = false [Flux] UpwindWeight = 0.5 + +[LinearSolver] +Type = restartedflexiblegmressolver +Verbosity = 1 +GMResRestart = 50 + +[LinearSolver.Preconditioner] +Type = uzawa +Verbosity = 1 +Iterations = 5