diff options
author | Anton Khirnov <anton@khirnov.net> | 2019-04-09 09:45:16 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-01-26 20:21:39 +0100 |
commit | c2740d169b81ae4f113bad26a5462c0d3947cc48 (patch) | |
tree | 801929156a0a1472780071b514f76dfe6c32fa28 /transfer.c | |
parent | 62c92eea4ec4859fff5002931e2d7d562b3deb5d (diff) |
egs: add higher-order finite difference operatorsfd8
Diffstat (limited to 'transfer.c')
-rw-r--r-- | transfer.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -129,9 +129,10 @@ static int transfer_factors_lagrange(GridTransferContext *ctx, unsigned int dim) for (ptrdiff_t idx_dst = 0; idx_dst < ctx->dst.size[dim]; idx_dst++) { const ptrdiff_t idx_src = (ptrdiff_t)(scale * (idx_dst + ctx->dst.start[dim])) - ctx->src.start[dim] - (priv->stencil / 2 - 1); const double coord_dst = (idx_dst + ctx->dst.start[dim]) * step_dst; - double *fact = priv->fact[dim] + priv->stencil * idx_dst; + //idx_src = MAX(MIN(idx_src, ctx->src.size[dim] - priv->stencil - 1), 0); + for (int i = 0; i < priv->stencil; i++) coord_src[i] = (idx_src + ctx->src.start[dim] + i) * step_src; |