summaryrefslogtreecommitdiff
path: root/src/maximal_slicing_axi.h
blob: b15420c726d9f73294b3bc8236e4d3f12e307782 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#define SQR(x) ((x) * (x))
#define SGN(x) ((x) >= 0.0 ? 1.0 : -1.0)

#define SCALE_FACTOR scale_factor

/* a set of basis functions */
typedef struct BasisSet {
    /* evaluate the idx-th basis function at the specified point*/
    double (*eval)      (double coord, int idx);
    /* evaluate the first derivative of the idx-th basis function at the specified point*/
    double (*eval_diff1)(double coord, int idx);
    /* evaluate the second derivative of the idx-th basis function at the specified point*/
    double (*eval_diff2)(double coord, int idx);
    /**
     * 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);
} BasisSet;

extern const BasisSet msa_cheb_basis;
extern const BasisSet msa_full_basis;
extern const BasisSet msa_tb_even_basis;
extern const BasisSet msa_sb_even_basis;

extern double scale_factor;