forked from pressel/pycles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGrid.pxd
54 lines (38 loc) · 1014 Bytes
/
Grid.pxd
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
cimport ParallelMPI
cdef extern from "grid.h":
struct DimStruct:
int dims
int [3] n
int [3] ng
int [3] nl
int [3] nlg
int [3] indx_lo_g
int [3] indx_lo
int npd
int npl
int npg
int gw
int [3] nbuffer
int [3] ghosted_stride
double [3] dx
double [3] dxi
cdef class Grid:
cdef:
DimStruct dims
double [:] x
double [:] x_half
double [:] y
double [:] y_half
double [:] z
double [:] z_half
double [:] xl
double [:] xl_half
double [:] yl
double [:] yl_half
double [:] zl
double [:] zl_half
void compute_global_dims(self)
void compute_local_dims(self,ParallelMPI.ParallelMPI Parallel)
void compute_coordinates(self)
cpdef extract_local(self, double [:] global_array, int dim)
cpdef extract_local_ghosted(self, double [:] global_array, int dim)