-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #334 from mumax/bugfix/MFM_Nz
Allow Nz=2,3,4,5 for MFM images
- Loading branch information
Showing
2 changed files
with
34 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
Checks if MFM images can be saved for all thicknesses with and without PBC. | ||
There was once a bug (#93) where Nz=2,3,4,5 could not generate an MFM image. | ||
*/ | ||
|
||
Nx := 63 | ||
Ny := 64 | ||
c := 4e-9 | ||
|
||
Msat = 1 / mu0 | ||
Aex = 10e-12 | ||
|
||
for Nz := 1; Nz < 12; Nz++ { | ||
SetGridSize(Nx, Ny, Nz) | ||
SetCellSize(c, c, c) | ||
SetGeom(Zrange(-NZ*c/2, c/2).Intersect(Circle(Nx * c).Add(Xrange(-c*Nx/4, c*Nx/4)))) | ||
m = vortex(1, 1) | ||
SetPBC(0, 0, 0) | ||
|
||
SaveAs(m, sprintf("m_%d.ovf", Nz)) | ||
|
||
MFMLift = 40e-9 // forces the calculation of the MFM kernel. | ||
SnapshotAs(MFM, sprintf("MFM_%d.jpg", Nz)) | ||
SetPBC(2, 2, 0) | ||
MFMLift = 40e-9 // forces the calculation of the MFM kernel. | ||
SnapshotAs(MFM, sprintf("MFM_%d_PBC.jpg", Nz)) | ||
} |