Skip to content

Commit

Permalink
update examples for 3.9c
Browse files Browse the repository at this point in the history
  • Loading branch information
barnex committed Jun 18, 2015
1 parent c0e3bf1 commit 5317860
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/api-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

{{.Include "head.html"}}

<h1> mumax 3.8 API </h1>
<h1> mumax 3.9c API </h1>

This is a complete overview of all available functions for writing an input script.

Expand Down
39 changes: 37 additions & 2 deletions doc/template.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{.Include "head.html"}}

<h1>mumax 3.8 examples</h1>
<h1>mumax 3.9c examples</h1>

<p>These are example input scripts, the full API can be found <a href="http://mumax.github.io/api.html">here</a>.</p>

Expand Down Expand Up @@ -77,6 +77,41 @@ <h1>mumax 3.8 examples</h1>

This example saves and prints the remanent magnetization state so we can verify it against known values.




<hr/><h2>Hysteresis</h2>


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

Msat = 800e3
Aex = 13e-12

m = uniform(-1, .1, 0)

MinimizerStop = 1e-6

Bmin := 0.0
Bmax := 30e-3
Bstep := 1e-3

for B:=Bmin; B<=Bmax; B+=Bstep{
B_ext = vector(B, 0, 0)
minimize()
tablesave()
save(m)
}

`}}

{{.Output}}




<hr/><h2>Geometry</h2>

mumax3 has powerful API to programatically define geometries. A number of primitive shapes are defined, like ellipses, rectangles, etc. They can be transformed (rotated, translated) and combined using boolean logic (add, sub, inverse). All positions are specified in meters and the origin lies in the center of the simulation box. See the full <a href="http://mumax.github.io/api.html">API</a>.
Expand Down Expand Up @@ -233,7 +268,7 @@ <h1>mumax 3.8 examples</h1>
angle := i*pi/180
setgeom(cheese.rotz(angle))
m = uniform(cos(angle), sin(angle), 0)
relax()
minimize()
save(m)
}

Expand Down

0 comments on commit 5317860

Please sign in to comment.