summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-01-03 19:35:20 +0100
committerAnton Khirnov <anton@khirnov.net>2019-01-03 19:35:20 +0100
commit67c119e0cab3b371888340d165e3d7bcf74a478d (patch)
treec1358b827744db18f7e0bc8f5bdace3076422e22
parent30816fb1931f8ea3a70215daf77636eb425cc91a (diff)
Use half the coarsest grid size as the outer bound for the spectral solver.
This is only used for the history initialization.
-rw-r--r--src/maximal_slicing_axi_mg.c9
1 files 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);