Streamer fluid modeling - An overview of ARCoS  1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
interpol2.h
Go to the documentation of this file.
1 
4 #ifndef _INTERPOL2_H_
5 
6 /* We will certainly never use a 16th order scheme,
7  * but in case we do, remember to change it here
8  */
9 #define MAX_ORDER 16
10 
11 #define MAX_INTERPOL_METHODS 9
12 
13 typedef struct interpol_t interpol_t;
15 
16 struct interpol_t
17 {
18  double *coeffs;
19  double *stencil;
20 
21  /* The separation between stencil points. */
22  double Lr, Lz;
23 
24  /* The interpolation method to use. */
26 
27  /* Origin of the interpolation polynomial, which is thus written in
28  powers of (r - r0) and (z - z0). */
29  double r0, z0;
30 };
31 
33 {
34  double *matrix;
35 
36  /* p is the order of the polynomial plus one.
37  * q is the number of stencil points in one direction (the total
38  * number is, of course, q^2. */
39  int p, q;
40 
41  /* Location of the origin with respect to the stencil in units of L. */
42  int ir0, iz0;
43 
44  int masses;
45 
46  void (*set_coeffs) (interpol_t *this);
47  double (*apply) (interpol_t *this, double r, double z);
48 };
49 
61 
63 
64 #define _INTERPOL2_H_
65 #endif