Skip to content

Commit

Permalink
add (failing) test for DMI energy conservation with varying D
Browse files Browse the repository at this point in the history
  • Loading branch information
barnex committed Sep 21, 2016
1 parent ca78681 commit 41b9c64
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions test/dmienergy-vardmi.mx3
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
Test energy dissipation in presence of DMI with variable D.
This failed before commit 4ee9bfa710758113b357d62edd26d4494048d07e (fix region dependent dind)
*/

N := 64
setgridsize(N, N, 1)
c := 1.15e-9 / 2
d := 1.15e-9
setcellsize(c, c, d)
//maxerr = 1e-5

defregion(0, xrange(0, inf))
defregion(1, xrange(-inf, 0))
defregion(2, yrange(-inf, 0))

Aex = 20e-12
Ku1 = 5.9e5
Msat = 6e5
AnisU = vector(0, 0, 1)

ext_enableunsafe()

Dind.setRegion(0, 4e-3)
Dind.setRegion(1, 2e-3)
Dind.setRegion(2, -3e-3)

m = uniform(1, 1, 1)
alpha = 0.001

tableAdd(E_total)
tableAutosave(1e-12)

E0 := E_total.Get()
print("E0", E0, "J")

run(10e-12)
E1 := E_total.Get()
print("E1", E1, "J")

run(10e-12)
E2 := E_total.Get()
print("E2", E2, "J")

expect("delta1", E1-E0, -5.4119e-20, 0.01e-20)
expect("delta2", E2-E0, -6.8447e-20, 0.01e-20)

0 comments on commit 41b9c64

Please sign in to comment.