1
1
import numpy as np
2
2
cimport numpy as np
3
- np.import_array()
4
-
5
-
6
3
7
4
cdef extern from " micro_clib.h" :
8
5
void compute_exch_field_micro(double * m, double * field,
@@ -27,43 +24,44 @@ cdef extern from "micro_clib.h":
27
24
int nx, int ny, int nz, int * ngbs)
28
25
29
26
30
-
31
- def compute_exchange_field_micro (double[:] m ,
32
- double[:] field ,
33
- double[:] energy ,
34
- double[:] Ms_inv ,
27
+ def compute_exchange_field_micro (double [:] m ,
28
+ double [:] field ,
29
+ double [:] energy ,
30
+ double [:] Ms_inv ,
35
31
A , dx , dy , dz , n ,
36
- int ngbs[:, :]):
32
+ int [:, :] ngbs ):
33
+
37
34
compute_exch_field_micro(& m[0 ], & field[0 ], & energy[0 ], & Ms_inv[0 ], A,
38
35
dx, dy, dz, n, & ngbs[0 , 0 ])
39
36
40
37
41
- def compute_exchange_field_micro_rkky (double[:] m ,
42
- double[:] field ,
43
- double[:] energy ,
44
- double[:] Ms_inv ,
38
+ def compute_exchange_field_micro_rkky (double [:] m ,
39
+ double [:] field ,
40
+ double [:] energy ,
41
+ double [:] Ms_inv ,
45
42
sigma , nx , ny , nz , z_bottom , z_top ):
43
+
46
44
compute_exch_field_rkky_micro(& m[0 ], & field[0 ], & energy[0 ], & Ms_inv[0 ], sigma,
47
45
nx, ny, nz, z_bottom, z_top)
48
46
49
47
50
-
51
- def compute_dmi_field (double[:] m ,
52
- double[:] field ,
53
- double[:] energy ,
54
- double[:] Ms_inv ,
55
- double[:] D ,
56
- double[:] dmi_vector ,
48
+ def compute_dmi_field (double [:] m ,
49
+ double [:] field ,
50
+ double [:] energy ,
51
+ double [:] Ms_inv ,
52
+ double [:] D ,
53
+ double [:] dmi_vector ,
57
54
n_dmi_ngbs ,
58
55
dx , dy , dz ,
56
+ n ,
57
+ int [:, :] ngbs
59
58
):
60
59
61
60
dmi_field(& m[0 ], & field[0 ], & energy[0 ], & Ms_inv[0 ],
62
61
& D[0 ], & dmi_vector[0 ], n_dmi_ngbs,
63
62
dx, dy, dz, n, & ngbs[0 , 0 ])
64
63
65
64
66
-
67
65
def compute_anisotropy_micro (double [:] m ,
68
66
double [:] field ,
69
67
double [:] energy ,
@@ -75,13 +73,9 @@ def compute_anisotropy_micro(double [:] m,
75
73
compute_uniaxial_anis(& m[0 ], & field[0 ], & energy[0 ], & Ms_inv[0 ],
76
74
& Ku[0 ], & axis[0 ], nx, ny, nz)
77
75
78
- def compute_skyrmion_number (double[:] m ,
79
- double[:] charge ,
80
- nx , ny , nz ,
81
- int[:, :] ngbs ):
82
-
83
76
def compute_skyrmion_number (double [:] m ,
84
77
double [:] charge ,
85
78
nx , ny , nz ,
86
79
int [:, :] ngbs ):
87
- return skyrmion_number(& m[0 ], & charge[0 ], nx, ny, nz, & ngbs[0 , 0 ])
80
+
81
+ return skyrmion_number(& m[0 ], & charge[0 ], nx, ny, nz, & ngbs[0 , 0 ])
0 commit comments