save

130 views
Skip to first unread message

zhang Mr

unread,
Aug 3, 2023, 10:22:01 PM8/3/23
to mumax2
Why are there differences in the number of simulated nanowire arrays save (m) and save (geom)? The first image shows save (m), and the second image shows save (geom)
2.jpg1.jpg

samm...@hotmail.com

unread,
Aug 10, 2023, 4:21:10 AM8/10/23
to mumax2
Hi!
It would be helpful if you would post your code :)
Sam

Op vrijdag 4 augustus 2023 om 04:22:01 UTC+2 schreef mrzha...@gmail.com:

Jonathan Leliaert

unread,
Aug 10, 2023, 4:40:24 AM8/10/23
to mum...@googlegroups.com
Geom is not a vector quantity, whereas the magnetization is. mumax-view was developed for vector quantities only, and  therefore does not really know what to do with geom and renders is several times.

Best,
Jonathan

--
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/5ca63fce-89f4-4cf3-9077-a3cb360b3b56n%40googlegroups.com.

zhang Mr

unread,
Aug 12, 2023, 9:47:57 AM8/12/23
to mumax2
Ok, thank you very much!! So if you want to simulate nanowire arrays, can you only use transl() one by one? There is no other easy way. Thanks in advance!
1.png2.png

Josh Lauzier

unread,
Aug 12, 2023, 3:41:19 PM8/12/23
to mumax2
Hi,

If you want to make more than one copy in an array of wires, you can use the .repeat() method instead of .transl(). It would look something like:

SetGridsize(120,120,270)
SetCellsize(3e-9,3e-9,3e-9)

a:=cylinder(100e-9,800e-9)
b:=a.repeat(130e-9,130e-9,0)
setgeom(b)

m=uniform(1,0,0)
save(m)

You can also use transl() on combined shapes. For example on the shape you call e (which is a, b, and c added together), you could add another line saying "e.transl(0,-130e-9,0)" and  "e.transl(0,130e-9,0)", then add them to the shape respectively. When you add two shapes, the resulting object is also a shape and has the built in shape methods. For your use case, it sounds like repeat() is what you want.

Best,
Josh L.
Reply all
Reply to author
Forward
0 new messages