diff options
author | Anton Khirnov <anton@khirnov.net> | 2018-08-07 16:22:37 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2018-08-07 16:22:37 +0200 |
commit | c0ff199014ea97969744df5a1fedc5c2bc70ae96 (patch) | |
tree | 4c0f5fadd4eb0168b6498c941502ec6b2020ad03 /ell_relax.c | |
parent | 00df82df70cb8720d4d81e9ad60268b6e5a4bcbe (diff) |
ell_relax: fill in boundary ghosts for fixval boundaries as well
Diffstat (limited to 'ell_relax.c')
-rw-r--r-- | ell_relax.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ell_relax.c b/ell_relax.c index e0eadd4..679f340 100644 --- a/ell_relax.c +++ b/ell_relax.c @@ -118,8 +118,12 @@ static void boundaries_apply_fixval(double *dst, ptrdiff_t dst_stride, size_t boundary_size, ptrdiff_t boundary_stride, int is_upper) { + if (!is_upper) + boundary_stride *= -1; + for (size_t i = 0; i < boundary_size; i++) { - *dst = *src; + for (int j = 0; j <= FD_STENCIL_MAX; j++) + dst[j * boundary_stride] = *src; dst += dst_stride; src++; } |