Skip to content

Commit

Permalink
doc: hysteresis example
Browse files Browse the repository at this point in the history
  • Loading branch information
barnex committed Jun 19, 2015
1 parent 5317860 commit b3bf913
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions doc/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,36 @@ <h1>mumax 3.9c examples</h1>

{{.Example `
SetGridsize(128, 32, 1)
SetCellsize(500e-9/128, 125e-9/32, 3e-9)
SetCellsize(4e-9, 4e-9, 30e-9)

Msat = 800e3
Aex = 13e-12

m = uniform(-1, .1, 0)
m = vortex(1, 1)
minimize() // high-energy states best minimized by relax()


Bmax := 100.0e-3
Bstep := 1.0e-3
MinimizerStop = 1e-6
TableAdd(B_ext)

for B:=0.0; B<=Bmax; B+=Bstep{
B_ext = vector(B, 0, 0)
minimize() // small changes best minimized by minimize()
tablesave()
}

Bmin := 0.0
Bmax := 30e-3
Bstep := 1e-3
for B:=Bmax; B>=-Bmax; B-=Bstep{
B_ext = vector(B, 0, 0)
minimize() // small changes best minimized by minimize()
tablesave()
}

for B:=Bmin; B<=Bmax; B+=Bstep{
for B:=-Bmax; B<=Bmax; B+=Bstep{
B_ext = vector(B, 0, 0)
minimize()
minimize() // small changes best minimized by minimize()
tablesave()
save(m)
}

`}}
Expand Down

0 comments on commit b3bf913

Please sign in to comment.