doubt about loading time of a geometry from an analytical function

137 views
Skip to first unread message

Arturo

unread,
Sep 4, 2019, 6:52:54 PM9/4/19
to mumax2
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

Mykola Dvornik

unread,
Sep 5, 2019, 2:30:24 AM9/5/19
to mum...@googlegroups.com
Typically, if one thinks that mx3 script is too slow for certain tasks, then our suggestion is to switch to the Go (computer language mumax3 is mainly written in). These days mumax3 binary accepts .go files and takes care of them similar to the .mx3 ones. For the example you might look into the test/ folder of mumax3 sources.

-Mykola

-Mykola 

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "mumax2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mumax2+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mumax2/54d0891e-ef90-4463-aea2-d05e1e5bff30%40googlegroups.com.

Arturo

unread,
Sep 5, 2019, 8:39:15 AM9/5/19
to mumax2
Thanks, another option would be to load a geometry from an ovf file, can this be done in mumax3?

Mykola Dvornik

unread,
Sep 5, 2019, 9:46:59 AM9/5/19
to mum...@googlegroups.com
Yes.

-Mykola

Sent from my iPhone

On 5 Sep 2019, at 14:39, Arturo <mari...@gmail.com> wrote:

Thanks, another option would be to load a geometry from an ovf file, can this be done in mumax3?

--
You received this message because you are subscribed to the Google Groups "mumax2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mumax2+un...@googlegroups.com.

Mario

unread,
Sep 5, 2019, 10:26:40 AM9/5/19
to mum...@googlegroups.com
which would be the commands?, 

geo = loadfile ("geometry.ovf")
Setgeom(geo)

I think the previous code does not work.

Eduardo Saavedra

unread,
May 22, 2022, 8:52:02 PM5/22/22
to mumax2
Hi, finally the code work?

geo = loadfile ("geometry.ovf")
Setgeom(geo)

Reply all
Reply to author
Forward
0 new messages