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

Aex   = 2*13e-12
Msat  = 2*800e3 // about 2T

m  = uniform(1, .1, 0)

ext_rmsurfacecharge(0, 1, 1)
minimize()
tol := 1e-5
// without surface charges, ground state should be uniform.
expectv("m", m.Average(), vector(1, 0, 0), tol)
