aboutsummaryrefslogtreecommitdiff
path: root/residual_calc.h
diff options
context:
space:
mode:
Diffstat (limited to 'residual_calc.h')
-rw-r--r--residual_calc.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/residual_calc.h b/residual_calc.h
index 1498bc9..01ad602 100644
--- a/residual_calc.h
+++ b/residual_calc.h
@@ -68,6 +68,14 @@ int mg2di_residual_calc_init(ResidualCalcContext *ctx);
/**
* Calculate the residual.
*
+ * @param diff_coeffs Array containing all PDE coefficients.
+ * @param diff_coeffs_stride Distance between adjacent lines for a given PDE
+ * coefficient.
+ * @param diff_coeffs_offset Distance between blocks containing different PDE
+ * coefficients. I.e. diff_coeffs[i * diff_coeffs_offset + j * diff_coeffs_stride + k]
+ * is the value of the i-th PDE coefficient (MG2D_DIFF_COEFF_*) at the
+ * (j, k)th gridpoint.
+ *
* @param reflect Flags indicating if dst should be extended by reflection.
* If the 'MG2D_BOUNDARY_x'th bit is set in reflect, then dst should be
* reflected reflect_dist points beyond its bounds in the corresponding
@@ -79,8 +87,8 @@ int mg2di_residual_calc(ResidualCalcContext *ctx, size_t size[2],
double *dst, ptrdiff_t dst_stride,
const double *u, ptrdiff_t u_stride,
const double *rhs, ptrdiff_t rhs_stride,
- const double * const diff_coeffs[MG2D_DIFF_COEFF_NB],
- ptrdiff_t diff_coeffs_stride,
+ const double *diff_coeffs, ptrdiff_t diff_coeffs_stride,
+ ptrdiff_t diff_coeffs_offset,
double u_mult, double res_mult,
int reflect, size_t reflect_dist);