summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-03-15 14:40:25 +0100
committerAnton Khirnov <anton@khirnov.net>2019-03-15 14:40:25 +0100
commit000cd33af416b4d7ee42e54df64de2d1db4d1bf9 (patch)
treea12583f5bc306f6ff0ea303b59101bdaaad1e51b
parentece77d1f9f36d111e6282c4cf09be6cfc4897ea1 (diff)
Add the exact_size parameter.
-rw-r--r--param.ccl6
-rw-r--r--src/maximal_slicing_axi_mg.c7
2 files changed, 11 insertions, 2 deletions
diff --git a/param.ccl b/param.ccl
index d3a4dd0..80f2c55 100644
--- a/param.ccl
+++ b/param.ccl
@@ -38,6 +38,12 @@ CCTK_INT nb_relax_post "number of relaxation steps after coarse-grid correction"
} 2
RESTRICTED:
+CCTK_INT exact_size "" STEERABLE=always
+{
+ 0: :: ""
+} 5
+
+RESTRICTED:
CCTK_REAL tol_residual "maximum absolute value of the residual" STEERABLE=always
{
0: :: ""
diff --git a/src/maximal_slicing_axi_mg.c b/src/maximal_slicing_axi_mg.c
index 65b4beb..e7cbd52 100644
--- a/src/maximal_slicing_axi_mg.c
+++ b/src/maximal_slicing_axi_mg.c
@@ -67,6 +67,7 @@ typedef struct MSMGContext {
int fd_stencil;
int maxiter;
+ int max_exact_size;
int nb_cycles;
int nb_relax_post;
int nb_relax_pre;
@@ -223,6 +224,7 @@ static CoordPatch *get_coord_patch(MSMGContext *ms, int level)
cp->solver->nb_relax_post = ms->nb_relax_post;
cp->solver->nb_relax_pre = ms->nb_relax_pre;
cp->solver->cfl_factor = ms->cfl_factor;
+ cp->solver->max_exact_size = ms->max_exact_size;
cp->solver->opaque = ms;
cp->solver->log_callback = log_callback;
@@ -291,7 +293,7 @@ static void print_stats(MSMGContext *ms)
ms->log_level = orig_log_level;
}
-static int context_init(cGH *gh, int fd_stencil, int maxiter, int nb_cycles,
+static int context_init(cGH *gh, int fd_stencil, int maxiter, int exact_size, int nb_cycles,
int nb_relax_pre, int nb_relax_post, double tol_residual,
double cfl_factor,
const char *loglevel_str,
@@ -307,6 +309,7 @@ static int context_init(cGH *gh, int fd_stencil, int maxiter, int nb_cycles,
ms->gh = gh;
ms->fd_stencil = fd_stencil;
ms->maxiter = maxiter;
+ ms->max_exact_size = exact_size;
ms->nb_cycles = nb_cycles;
ms->nb_relax_pre = nb_relax_pre;
ms->nb_relax_post = nb_relax_post;
@@ -835,7 +838,7 @@ void msa_mg_init(CCTK_ARGUMENTS)
DECLARE_CCTK_PARAMETERS;
int ret;
- ret = context_init(cctkGH, fd_stencil, maxiter, nb_cycles,
+ ret = context_init(cctkGH, fd_stencil, maxiter, exact_size, nb_cycles,
nb_relax_pre, nb_relax_post, tol_residual,
cfl_factor,
loglevel, &ms);