diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-03-13 16:16:08 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-03-13 16:18:19 +0100 |
commit | 11272e93ce2e5a39e7cd197e111fa3aa86f7f15e (patch) | |
tree | 200d3e31cd6e0b6364123ac944a84878bb639ebf /src/maximal_slicing_axi.h | |
parent | 3d9b62a6b6fbdde922cb73c262e20db4ac0d84ad (diff) |
Split the basis sets definitions into a separate file.
Diffstat (limited to 'src/maximal_slicing_axi.h')
-rw-r--r-- | src/maximal_slicing_axi.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/maximal_slicing_axi.h b/src/maximal_slicing_axi.h new file mode 100644 index 0000000..b15420c --- /dev/null +++ b/src/maximal_slicing_axi.h @@ -0,0 +1,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; |