diff options
Diffstat (limited to 'mg2d.c')
-rw-r--r-- | mg2d.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -396,16 +396,17 @@ static int mg_levels_init(MG2DContext *ctx) enum GridTransferOperator op_interp; enum GridTransferOperator op_restrict; - if (ctx->fd_stencil == 1) - op_interp = GRID_TRANSFER_LAGRANGE_1; - else - op_interp = GRID_TRANSFER_LAGRANGE_3; + switch (ctx->fd_stencil) { + case 1: op_interp = GRID_TRANSFER_LAGRANGE_3; break; + case 2: op_interp = GRID_TRANSFER_LAGRANGE_5; break; + default: return -ENOSYS; + } 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 = GRID_TRANSFER_FW_5; } else op_restrict = op_interp; |