aboutsummaryrefslogtreecommitdiff
path: root/src/pughInterpGH.h
blob: e6eef76185725c781be1ab5d6597879eaaa21802 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
 /*@@
   @file      pughInterpGH.h
   @date      Sun Jul 04 1999
   @author    Thomas Radke
   @desc
              Definition of GH extensions of thorn PUGHInterp and
              declaration of function prototypes
   @enddesc
   @history
   @endhistory
@@*/


typedef struct
{
  int *send_count;             /* number of elements to be sent */
  int *send_displ;             /* offset of each element to be sent */
  int *recv_count;             /* number of elements to be received */
  int *recv_displ;             /* offset of each element to be received */

  CCTK_INT *num_points_to;     /* number of coordinate points to be sent */
  CCTK_INT *num_points_from;   /* number of coordinate points to be received */

  int *whichproc;              /* which processor does point i belong to */
  int *indices;                /* indices to sort from processor-sorted into
                                  point-sorted order */
} pughInterpGH;


/* prototypes of interpolation operators to be registered */
int PUGHInterp_InterpGV (cGH *GH,
                         int order,
                         const char *coord_system,
                         int num_points,
                         int num_in_array_indices,
                         int num_out_arrays,
                         void *interp_coord_arrays[],
                         int interp_coord_array_types[],
                         int in_array_indices[],
                         void *out_arrays[],
                         int out_array_types[]);

int PUGHInterp_InterpLocal (cGH *GH,
                            int order,
                            int num_points,
                            int num_dims,
                            int num_in_arrays,
                            int num_out_arrays,
                            int coord_dims[],
                            void *coord_arrays[],
                            int coord_array_types[],
                            void *interp_coord_arrays[],
                            int interp_coord_array_types[],
                            void *in_arrays[],
                            int in_array_types[],
                            void *out_arrays[],
                            int out_array_types[]);

/* prototypes of routines used internally */
int PUGHInterp_Interpolate (int order,
                            int num_points,
                            int num_dims,
                            int num_arrays,
                            int dims[ /* num_dims */ ],
                            CCTK_REAL coord[ /* num_dims * num_points */ ],
                            CCTK_REAL origin[ /* num_dims */ ],
                            CCTK_REAL delta[ /* num_dims */ ],
                            int in_types[ /* num_arrays */ ],
                            void *in_arrays[ /* num_arrays */ ],
                            int out_types[ /* num_arrays */ ],
                            void *out_arrays[ /* num_arrays */ ]);