From 67c119e0cab3b371888340d165e3d7bcf74a478d Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 3 Jan 2019 19:35:20 +0100 Subject: Use half the coarsest grid size as the outer bound for the spectral solver. This is only used for the history initialization. --- src/maximal_slicing_axi_mg.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/maximal_slicing_axi_mg.c b/src/maximal_slicing_axi_mg.c index 93130d7..899ef35 100644 --- a/src/maximal_slicing_axi_mg.c +++ b/src/maximal_slicing_axi_mg.c @@ -123,7 +123,7 @@ typedef struct MSMGContext { int64_t time_fine_export; } MSMGContext; -int msa_context_init(cGH *gh, MaximalSlicingContext **ctx, int basis_order0, int basis_order1, double scale_factor, double filter_power); +int msa_context_init(cGH *gh, MaximalSlicingContext **ctx, int basis_order0, int basis_order1, double outer_bound, double filter_power); void msa_context_free(MaximalSlicingContext **ctx); void msa_lapse_solve(MaximalSlicingContext *ctx); void msa_lapse_eval(MaximalSlicingContext *ctx, double *dst); @@ -513,8 +513,11 @@ static void solution_to_grid(CoordPatch *cp, double *dst) static void solve_ps(MSMGContext *ctx, double *dst) { - if (!ctx->ps_solver) - msa_context_init(ctx->gh, &ctx->ps_solver, 60, 60, 8.0, 64.0); + if (!ctx->ps_solver) { + const double *a_x = CCTK_VarDataPtr(ctx->gh, 0, "grid::x"); + const double outer_bound = a_x[CCTK_GFINDEX3D(ctx->gh, ctx->gh->cctk_lsh[0] - 1, 0, 0)]; + msa_context_init(ctx->gh, &ctx->ps_solver, 80, 80, outer_bound, 64.0); + } msa_lapse_solve(ctx->ps_solver); msa_lapse_eval(ctx->ps_solver, dst); -- cgit v1.2.3