From 30215029d4d3d88d8fd32a44edea8699212cf91d Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 19 Jul 2021 12:58:57 -0300 Subject: [PATCH 1/3] EVOLUTION: Be explicit about the method with error control. Do not show the parameters controlling the integration errors if the method do not control this error. Signed-off-by: Grzegorz Kowal --- sources/evolution.F90 | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/sources/evolution.F90 b/sources/evolution.F90 index 06d51d3..8e40c97 100644 --- a/sources/evolution.F90 +++ b/sources/evolution.F90 @@ -60,6 +60,7 @@ module evolution ! evolution parameters ! + logical , save :: error_control = .false. character(len=255), save :: name_int = "" integer , save :: stages = 2 integer , save :: registers = 1 @@ -216,11 +217,12 @@ module evolution case ("ssprk(m,2)", "SSPRK(m,2)") + error_control = .true. evolve => evolve_ssprk2_m registers = 3 stages = max(2, min(9, stages)) cfl = (stages - 1) * cfl - write(name_int, "('2nd order SSPRK(',i0,',2)')") stages + write(name_int, "('2nd order SSPRK(',i0,',2)') with error control") stages case ("rk3", "RK3") @@ -244,6 +246,7 @@ module evolution case ("rk3.m", "ssprk(m,3)", "SSPRK(m,3)") + error_control = .true. evolve => evolve_ssprk3_m registers = 3 n = 2 @@ -253,7 +256,7 @@ module evolution n = n - 1 stages = max(4, n**2) cfl = (n - 1) * n * cfl - write(name_int, "('Optimal 3rd order SSPRK(',i0,',3)')") stages + write(name_int, "('Optimal 3rd order SSPRK(',i0,',3) with error control')") stages case ("rk4.10", "RK4.10", "ssprk(10,4)", "SSPRK(10,4)") @@ -406,12 +409,14 @@ module evolution if (magnetized) then call print_parameter(verbose, "GLM alpha coefficient", glm_alpha) end if - call print_parameter(verbose, "absolute tolerance", atol) - call print_parameter(verbose, "relative tolerance", rtol) - call print_parameter(verbose, "maximum rejections", mrej) - call print_parameter(verbose, "factor" , fac) - call print_parameter(verbose, "minimum factor" , facmin) - call print_parameter(verbose, "maximum factor" , facmax) + if (error_control) then + call print_parameter(verbose, "absolute tolerance", atol) + call print_parameter(verbose, "relative tolerance", rtol) + call print_parameter(verbose, "maximum rejections", mrej) + call print_parameter(verbose, "factor" , fac) + call print_parameter(verbose, "minimum factor" , facmin) + call print_parameter(verbose, "maximum factor" , facmax) + end if end if From d8bd7eb8003ec81752f3900124e0dcd9f8c43087 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 19 Jul 2021 13:02:14 -0300 Subject: [PATCH 2/3] EVOLUTION: Fix formatting. Signed-off-by: Grzegorz Kowal --- sources/evolution.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/evolution.F90 b/sources/evolution.F90 index 8e40c97..72b1b6b 100644 --- a/sources/evolution.F90 +++ b/sources/evolution.F90 @@ -256,7 +256,7 @@ module evolution n = n - 1 stages = max(4, n**2) cfl = (n - 1) * n * cfl - write(name_int, "('Optimal 3rd order SSPRK(',i0,',3) with error control')") stages + write(name_int, "('Optimal 3rd order SSPRK(',i0,',3) with error control") stages case ("rk4.10", "RK4.10", "ssprk(10,4)", "SSPRK(10,4)") From 8ec801228c690087642996006a652a9490460afb Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 19 Jul 2021 13:03:40 -0300 Subject: [PATCH 3/3] EVOLUTION: Fix formatting once again. Signed-off-by: Grzegorz Kowal --- sources/evolution.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/evolution.F90 b/sources/evolution.F90 index 72b1b6b..118acdc 100644 --- a/sources/evolution.F90 +++ b/sources/evolution.F90 @@ -222,7 +222,7 @@ module evolution registers = 3 stages = max(2, min(9, stages)) cfl = (stages - 1) * cfl - write(name_int, "('2nd order SSPRK(',i0,',2)') with error control") stages + write(name_int, "('Optimal 2nd order SSPRK(',i0,',2) with error control')") stages case ("rk3", "RK3") @@ -256,7 +256,7 @@ module evolution n = n - 1 stages = max(4, n**2) cfl = (n - 1) * n * cfl - write(name_int, "('Optimal 3rd order SSPRK(',i0,',3) with error control") stages + write(name_int, "('Optimal 3rd order SSPRK(',i0,',3) with error control')") stages case ("rk4.10", "RK4.10", "ssprk(10,4)", "SSPRK(10,4)")