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 33from .integrators import BaseIntegrator
44from .integrators import euler_step , runge_kutta_step
55from itertools import cycle
6+ import scipy .interpolate as si
67
78import fidimag .extensions .nebm_clib as nebm_clib
89
@@ -307,6 +308,19 @@ def run_for(self, n_steps):
307308 self .eta = self .eta * self .dEta
308309 resetCount = 0
309310
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+
310324 def set_options (self ):
311325 pass
312326
You can’t perform that action at this time.
0 commit comments