From 2926c4ea6f9e34b8962a08dff372252537473bda Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 28 Aug 2016 10:07:20 +0200 Subject: basis: disentangle the API from the global solver API --- internal.h | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'internal.h') diff --git a/internal.h b/internal.h index ae9932a..78b3741 100644 --- a/internal.h +++ b/internal.h @@ -22,6 +22,7 @@ #include "brill_data.h" +#include "basis.h" #include "qfunc.h" #define MAX(x, y) ((x) > (y) ? (x) : (y)) @@ -37,23 +38,9 @@ */ #define EPS 1E-08 -/* a set of basis functions */ -typedef struct BasisSet { - /* evaluate the idx-th basis function at the specified point*/ - double (*eval) (double coord, int idx, double sf); - /* evaluate the first derivative of the idx-th basis function at the specified point*/ - double (*eval_diff1)(double coord, int idx, double sf); - /* evaluate the second derivative of the idx-th basis function at the specified point*/ - double (*eval_diff2)(double coord, int idx, double sf); - /** - * Get the idx-th collocation point for the specified order. - * idx runs from 0 to order - 1 (inclusive) - */ - double (*colloc_point)(int order, int idx, double sf); -} BasisSet; typedef struct BDPriv { - const BasisSet *basis[2]; + BasisSetContext *basis[2]; QFuncContext *qfunc; int nb_colloc_points[2]; @@ -66,7 +53,6 @@ typedef struct BDPriv { #define NB_COEFFS(s) (s->nb_coeffs[0] * s->nb_coeffs[1]) #define NB_COLLOC_POINTS(s) (s->nb_colloc_points[0] * s->nb_colloc_points[1]) -extern const BasisSet bdi_sb_even_basis; int bdi_solve(BDContext *bd); -- cgit v1.2.3