Inquiry Regarding Output Differences in B_demag and B_eff Between Versions 3.10 and 3.11

37 views
Skip to first unread message

yanlong lee

unread,
Dec 22, 2025, 5:00:22 AM12/22/25
to mumax2

Dear mumax Authors,

I hope this message finds you well.

I have encountered a situation regarding the output differences between versions 3.10 and 3.11. In the older version 3.10, I was able to use output items such as B_demag and B_eff to observe the field distribution throughout the entire modeling space, where even the non-sample regions showed non-zero outputs. However, in the newer version 3.11, these output items in the non-sample vacuum regions return values of 0 0 0.

I understand that B_demag represents the demagnetizing field, which is a physical quantity describing the sample itself rather than the entire space, so it is correct that the values in the non-sample regions are zero, and this aligns better with physical theory. However, the previous outputs were extremely useful in visualizing the stray field distribution outside the sample region.

Could you please advise on how to output these values in the new version for visualizing the field distribution outside the sample region? Are there any changes to the definition of B_demag or other related fields in the newer version that would affect this?

Thank you very much for your time and assistance.

Best regards,
yanlonglee
GXU CHINA

Jonathan Maes

unread,
Jan 6, 2026, 9:46:10 AM (5 days ago) Jan 6
to mumax2
Dear yanlonglee,

This was indeed changed in 3.11 to fix a bug where, when the simulation contains cells with Msat=0, running relax() would converge very slowly.
The reason for this was that B_demag acted on these spins, so 3.11 solved this by setting B_demag to zero at cells with Msat=0.
For more information, see this pull request on GitHub.

I will have a look whether this can be partially reverted by setting the torque to zero, rather than B_demag.

Best regards,
Jonathan
Op maandag 22 december 2025 om 11:00:22 UTC+1 schreef yanlo...@gmail.com:
Reply all
Reply to author
Forward
0 new messages