diff options
author | Anton Khirnov <anton@khirnov.net> | 2019-03-23 19:34:48 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2019-03-25 08:27:15 +0100 |
commit | e1d1bdc0d20cc379f2cf31fca84f6179eba0cb36 (patch) | |
tree | 93380722784295565802ad37b118b8bb007c446d /mg2d.c | |
parent | 71ad1d672f3724426184e799252b87c1d54cb115 (diff) |
mg2d: use appropriate full-weighted restriction for 3rd order FDs
Diffstat (limited to 'mg2d.c')
-rw-r--r-- | mg2d.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -376,9 +376,12 @@ static int mg_levels_init(MG2DContext *ctx) else op_interp = GRID_TRANSFER_LAGRANGE_3; - if (cur->solver->domain_size[0] == 2 * (cur->child->solver->domain_size[0] - 1) + 1) - op_restrict = GRID_TRANSFER_FW_1; - else + if (cur->solver->domain_size[0] == 2 * (cur->child->solver->domain_size[0] - 1) + 1) { + if (ctx->fd_stencil == 1) + op_restrict = GRID_TRANSFER_FW_1; + else + op_restrict = GRID_TRANSFER_FW_3; + } else op_restrict = op_interp; cur->transfer_restrict = mg2di_gt_alloc(op_restrict); |