Hi,
I would like to create a geometry in mumax3 defining it through analytical function. In oommf generally for a complicated geometry it takes 5 minutes, but in mumax3 it takes more than one day, is there any efficient way to do this?
To create the geometry in mumax3 I use the following code:
setgridsize (300, 20, 300)
setcellsize (2e-9, 1e-9, 2e-9)
Nx: = 300
Ny: = 20
Nz: = 300
AA: = cell (1,1,1)
for i: = 0; i <Nx; i ++ {
for j: = 0; j <Ny; j ++ {
for k: = 0; k <Ny; k ++ {
r: = index2coord (i, j, k)
x: = r.X ()
y: = r.Y ()
z: = r.Z ()
fun: = something
if fun something {
AA = cell (i, j, k) .add (AA)
}
}}}
setgeom (AA)
Generally using for loop is not very efficient.
Thanks