File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 3
3
from .integrators import BaseIntegrator
4
4
from .integrators import euler_step , runge_kutta_step
5
5
from itertools import cycle
6
+ import scipy .interpolate as si
6
7
7
8
import fidimag .extensions .nebm_clib as nebm_clib
8
9
@@ -307,6 +308,19 @@ def run_for(self, n_steps):
307
308
self .eta = self .eta * self .dEta
308
309
resetCount = 0
309
310
311
+ # Taken from the string method class
312
+ def refine_path (self , distances ):
313
+ """
314
+ """
315
+ new_dist = np .linspace (distances [0 ], distances [- 1 ], distances .shape [0 ])
316
+ # Restructure the string by interpolating every spin component
317
+ # print(self.integrator.y[self.n_dofs_image:self.n_dofs_image + 10])
318
+ bandrs = self .band .reshape (self .n_images , self .n_dofs_image )
319
+ for i in range (self .n_dofs_image ):
320
+
321
+ cs = si .CubicSpline (distances , bandrs [:, i ])
322
+ bandrs [:, i ] = cs (new_dist )
323
+
310
324
def set_options (self ):
311
325
pass
312
326
You can’t perform that action at this time.
0 commit comments