/*
	Frozen spins in half the geometry
*/

// geometry
	setgridsize(128, 32, 1)
	setcellsize(500e-9/128, 125e-9/32, 3e-9)

// material
	Msat = 800e3
	Aex = 13e-12
	defregion(1, xrange(0, inf))
	frozenspins.setRegion(1, 1)
	m  = uniform(1, .1, 0)

// relax
	relax()
	TOL := 1e-4
	print(m.average())
	expectv("m", m.average(), vector(0.98098075, 0.11742571, 0), TOL)

// reversal
	alpha = 0.02
	B_ext = vector(-24.6E-3, 4.3E-3, 0)
	run(1e-9)
	expectv("m", m.average(), vector(0.14497971, 0.248994603, 0.002248812), TOL)
