Skip to content

Commit e983a1f

Browse files
Fixed memory leak in sph nebm
1 parent e155b79 commit e983a1f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

fidimag/common/nebm_spherical.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import print_function
2-
from __future__ import division
31
import numpy as np
42
import fidimag.extensions.nebm_clib as nebm_clib
53
from .chain_method_tools import spherical2cartesian, cartesian2spherical, compute_norm
@@ -13,7 +11,7 @@
1311

1412

1513
class NEBM_Spherical(ChainMethodBase):
16-
"""
14+
r"""
1715
1816
ARGUMENTS -----------------------------------------------------------------
1917
@@ -244,7 +242,7 @@ def compute_effective_field_and_energy(self, y):
244242
# Only update the extreme images
245243
for i in range(1, len(y) - 1):
246244

247-
self.sim.set_m(spherical2cartesian(y[i]))
245+
self.sim.spin[:] = spherical2cartesian(y[i])
248246
# elif self.coordinates == 'Cartesian':
249247
# self.sim.set_m(self.band[i])
250248

0 commit comments

Comments
 (0)