@@ -18,6 +18,9 @@ cdef extern from "dipolar.h":
18
18
double * tensor_yy
19
19
double * tensor_yz
20
20
double * tensor_zz
21
+ double * hx
22
+ double * hy
23
+ double * hz
21
24
complex * Nxx
22
25
complex * Nxy
23
26
complex * Nxz
@@ -47,12 +50,12 @@ cdef class FFTDemag(object):
47
50
cdef fft_demag_plan * _c_plan
48
51
cdef int total_length
49
52
cdef np.float64_t[:] tensor_xx_p, tensor_xy_p, tensor_xz_p, tensor_yy_p, \
50
- tensor_yz_p, tensor_zz_p
53
+ tensor_yz_p, tensor_zz_p, hx_p, hy_p, hz_p
51
54
cdef np.complex128_t[:] Nxx_p, Nxy_p, Nxz_p, Nyy_p, Nyz_p, Nzz_p, Hx_p, \
52
55
Hy_p, Hz_p, Mx_p, My_p, Mz_p
53
56
cdef public np.ndarray tensor_xx, tensor_xy, tensor_xz, tensor_yy, \
54
57
tensor_yz, tensor_zz, Nxx, Nxy, Nxz, Nyy, Nyz, Nzz, \
55
- Mx, My, Mz, Hx, Hy, Hz
58
+ Mx, My, Mz, Hx, Hy, Hz, hx, hy, hz
56
59
# tensor_type could be 'dipolar', 'demag' or '2d_pbc'
57
60
def __cinit__ (self , dx , dy , dz , nx , ny , nz , tensor_type = ' dipolar' ):
58
61
self ._c_plan = create_plan()
@@ -103,6 +106,13 @@ cdef class FFTDemag(object):
103
106
self .Hz_p = < np.complex128_t[:self .total_length]> self ._c_plan.Hz
104
107
self .Hz = np.asarray(self .Hz_p)
105
108
109
+ self .hx_p = < np.float64_t[:self .total_length]> self ._c_plan.hx
110
+ self .hx = np.asarray(self .hx_p)
111
+ self .hy_p = < np.float64_t[:self .total_length]> self ._c_plan.hy
112
+ self .hy = np.asarray(self .hy_p)
113
+ self .hz_p = < np.float64_t[:self .total_length]> self ._c_plan.hz
114
+ self .hz = np.asarray(self .hz_p)
115
+
106
116
107
117
self .tensor_xy_p = < np.float64_t[:self .total_length]> self ._c_plan.tensor_xy
108
118
self .tensor_xy = np.asarray(self .tensor_xy_p)
0 commit comments