From 121a0add4a95c52c41b03723fb321e2f84902276 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 11 Jan 2023 17:13:40 +0100 Subject: {nl,ps}solve: eliminate const warnings --- pssolve.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'pssolve.h') diff --git a/pssolve.h b/pssolve.h index 15ee313..b9ba17c 100644 --- a/pssolve.h +++ b/pssolve.h @@ -136,6 +136,10 @@ typedef struct PSSolveContext { uint64_t construct_matrix_time; } PSSolveContext; +typedef struct PSEqCoeffs { + const double * const (*func_coeffs)[PSSOLVE_DIFF_ORDER_NB]; +} PSEqCoeffs; + /** * Allocate a new solver. * @@ -168,9 +172,9 @@ void tdi_pssolve_context_free(PSSolveContext **ctx); * * @param ctx the solver context * @param eq_coeffs the equation coefficients at the collocation points. - * eq_coeffs[i][j][k] is the array of coefficients for the k-th - * derivative (as per enum PSSolveDiffOrder) of the j-th - * unknown function in the i-th equation. + * eq_coeffs[i].func_coeffs[j][k] is the array of coefficients + * for the k-th derivative (as per enum PSSolveDiffOrder) of + * the j-th unknown function in the i-th equation. * @param rhs the right-hand side of the equation at the collocation points. * @param coeffs the spectral coefficients of the solution will be written here. * @@ -178,7 +182,7 @@ void tdi_pssolve_context_free(PSSolveContext **ctx); * coeffs are undefined on failure. */ int tdi_pssolve_solve(PSSolveContext *ctx, - const double *(**eq_coeffs)[PSSOLVE_DIFF_ORDER_NB], + const PSEqCoeffs *eq_coeffs, const double *rhs, double *coeffs); int tdi_pssolve_diff_order(enum PSSolveDiffOrder order, unsigned int dir); -- cgit v1.2.3