aboutsummaryrefslogtreecommitdiff
path: root/src/pughInterpGH.h
blob: 543d1d5c0275ff3bad00406a299d3a8946a47948 (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
 /*@@
   @file      pughInterpGH.h
   @date      Sun Jul 04 1999
   @author    Thomas Radke
   @desc
              Definition of GH extensions structure for thorn PUGHInterp
              and declaration of function prototypes.
   @enddesc
   @version   $Header$
@@*/

#ifndef _PUGHINTERP_PUGHINTERP_H_
#define _PUGHINTERP_PUGHINTERP_H_ 1

#ifdef __cplusplus
extern "C"
{
#endif

typedef struct
{
  int *sendcnt;             /* number of elements to be sent */
  int *senddispl;           /* offset of each element to be sent */
  int *recvcnt;             /* number of elements to be received */
  int *recvdispl;           /* offset of each element to be received */

  CCTK_INT *N_points_to;    /* number of coordinate points to be sent */
  CCTK_INT *N_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 */
} pughInterpGH;             /* point-sorted order */


/* 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,
                         const void *const interp_coord_arrays[],
                         const int interp_coord_array_types[],
                         const int in_array_indices[],
                         void *const out_arrays[],
                         const int out_array_types[]);

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

#ifdef __cplusplus
} // extern "C"
#endif

#endif  /* _PUGHINTERP_PUGHINTERP_H_ */