Skip to content

Commit 18f3c45

Browse files
author
davidcorteso
committed
Commented about the convention of *degree per nanosecond* in the micromagnetic code
1 parent 607aad3 commit 18f3c45

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fidimag/micro/llg.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,10 @@ def compute_dmdt(self, dt):
372372
def relax(self, dt=1e-11, stopping_dmdt=0.01, max_steps=1000,
373373
save_m_steps=100, save_vtk_steps=100):
374374

375-
ONE_DEGREE_PER_NS = 17453292.52
375+
# OOMMF convention is to check if the spins have moved by
376+
# ~1 degree in a nanosecond in order to stop a simulation,
377+
# so we set this scale for dm/dt
378+
ONE_DEGREE_PER_NS = (2 * np.pi / 360) / 1e-9
376379

377380
for i in range(0, max_steps + 1):
378381

0 commit comments

Comments
 (0)