Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/EdgeCarryShift #339

Merged
merged 5 commits into from
Oct 17, 2024
Merged

Bugfix/EdgeCarryShift #339

merged 5 commits into from
Oct 17, 2024

Conversation

JonathanMaes
Copy link
Contributor

While the newly added EdgeCarryShift (proposed in #316) worked as mathematically expected, the original implementation allowed nonphysical situations to arise where the zero magnetization (0,0,0) from edge cells outside the geometry was copied to cells which, after shifting, lay inside the geometry.

To address this, cells which would have been assigned the zero-vector, but are actually inside the geometry, are instead assigned the vector ShiftMagL, ShiftMagR, ShiftMagD or ShiftMagU (depending on the shift direction).

Observe an example of the updated EdgeCarryShift behavior below.
A slanted geometry with random initial magnetization is shifted 32 cells to the right. As EdgeCarryShift = true, the left edge values are applied to all the newly introduced cells. For the cells at the very bottom of the new geometry, those left edge cells were outside the geometry, so the vector ShiftMagL is applied (set to (-1,0,0) here). The pre-bugfix behavior was that these bottom cells would have magnetization (0,0,0) (grey).
m000001

I also implemented the geom.GetCell() method, which allows a sanity check in the updated test/edgeCarryShift.mx3 test script.

@JonathanMaes JonathanMaes merged commit 09be63f into 3.11 Oct 17, 2024
@JonathanMaes JonathanMaes deleted the bugfix/EdgeCarryShift branch October 17, 2024 12:21
MathieuMoalic added a commit to MathieuMoalic/amumax that referenced this pull request Oct 18, 2024
MathieuMoalic added a commit to MathieuMoalic/amumax that referenced this pull request Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants