blob: d8a69e6eca38389f5da30b77bd609374b4b41a30 (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#ifndef QMS_QMS_H
#define QMS_QMS_H
#include "common.h"
#if HAVE_OPENCL
#include <cl.h>
#endif
#include <inttypes.h>
#include "cctk.h"
#include "qms_solve.h"
/* precomputed values for a given refined grid */
typedef struct CoordPatch {
CCTK_REAL origin[3];
CCTK_INT delta[3];
CCTK_INT size[3];
// basis values on the grid
double *basis_val_r;
double *basis_val_z;
double *transform_z;
double *transform_matrix;
double *transform_matrix1;
double *transform_tmp;
double *one;
double *w_scale;
int y_idx;
} CoordPatch;
typedef struct QMSContext {
QMSSolver *solver;
cGH *gh;
struct {
double time;
double *coeffs;
} solution_cache[8];
int nb_solutions;
double *coeffs_eval;
uint64_t grid_expand_count;
uint64_t grid_expand_time;
CoordPatch *patches;
int nb_patches;
} QMSContext;
int qms_maximal_solve(QMSContext *ms);
#endif /* QMS_QMS_H */
|