diff options
author | Anton Khirnov <anton@khirnov.net> | 2019-07-25 10:57:54 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2019-07-25 10:57:54 +0200 |
commit | 9368ff05753ddbf5c00f6c12e2f4bcd9ce034867 (patch) | |
tree | 1f14f7ac3b75336df12146ef6df0e75f9f4a2d54 | |
parent | 43c18a92f8430a26f56b790baea2fdc1607dd02b (diff) |
Set the initial guess on refined levels.
-rw-r--r-- | src/qms.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -914,6 +914,16 @@ void qms_mg_solve(CCTK_ARGUMENTS) } } } + + { + /* use the solution from the coarser level as the initial guess */ + CoordPatch *cp_coarse = get_coord_patch(ms, reflevel - 1); + + ret = mg2d_init_guess(cp->solver, cp_coarse->solver->u, cp_coarse->solver->u_stride, + cp_coarse->solver->local_start, cp_coarse->solver->local_size, cp_coarse->solver->step); + if (ret < 0) + CCTK_WARN(0, "Error setting the initial guess"); + } } fprintf(stderr, "%d qms solve: time %g\n", reflevel, time); |