aboutsummaryrefslogtreecommitdiff
path: root/src/pughInterpGH.h
blob: e25b4f6d32b49a6caf935a6f7d059af566acd04b (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
72
73
74
75
76
77
78
79
80
81
 /*@@
   @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 */


/* prototype of PUGHInterp's routine which overloads CCTK_InterpGridArrays() */
int PUGHInterp_InterpGridArrays (const cGH *GH,
                                 int N_dims,
                                 int param_table_handle,
                                 int local_interp_handle,
                                 int coord_system_handle,
                                 int N_interp_points,
                                   int interp_coords_type,
                                   const void *const interp_coords[],
                                 int N_input_arrays,
                                   const CCTK_INT input_array_indices[],
                                 int N_output_arrays,
                                   const CCTK_INT output_array_types[],
                                   void *const output_arrays[]);

/* 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_ */