From 40e686b7688345a903f4afb97362de7d57cbb3c7 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 29 Jan 2019 15:38:17 +0100 Subject: mg2d: account for effect of the ~u term on the relaxation factor The maximum allowed time step in the presence of a -K * u term goes like 2 (dx ** 2) / (4 + K (dx ** 2)) --- ell_grid_solve.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ell_grid_solve.h') diff --git a/ell_grid_solve.h b/ell_grid_solve.h index a12e9c3..4ee6cb4 100644 --- a/ell_grid_solve.h +++ b/ell_grid_solve.h @@ -64,11 +64,25 @@ enum EGSType { typedef struct EGSInternal EGSInternal; typedef struct EGSRelaxContext { + /** + * The "time step" for relaxation is calculated as + * Δt = r_m * r_f * step[0] * step[1] + * + * Where + * - r_m is relax_multiplier if specified, 1.0 otherwise + * - r_f is relax_factor if specified, a default fd_stencil-dependent value + * otherwise + */ /** * The time stepping factor in relaxation. */ double relax_factor; + /** + * Multiplier for the time stepping factor. + */ + double relax_multiplier; + int64_t count_correct; int64_t time_correct; } EGSRelaxContext; -- cgit v1.2.3