Skip to content

Moving simulation window for domain wall motion#161

Open
lamoreel wants to merge 18 commits into
devfrom
moving-window-uniform
Open

Moving simulation window for domain wall motion#161
lamoreel wants to merge 18 commits into
devfrom
moving-window-uniform

Conversation

@lamoreel

Copy link
Copy Markdown
Contributor

This pull request adds the possibility for a moving simulation window, albeit not very general. The functionality is implemented for

  • Magnets with no geometry
  • Magnets with no regions
  • Only domain wall motion is supported (1D)

The code base is kept general as to easily extend it to other cases (e.g. 2D skyrmion motion) in later PRs. The (ancient) implementation on the moving-window branch already contains some groundwork for a more general implementation, in the case we or the community would need this in the future.

@lamoreel lamoreel requested review from DiegoDeGusem and ilateur June 17, 2026 08:29
@lamoreel lamoreel self-assigned this Jun 17, 2026
@lamoreel lamoreel added the enhancement New feature or request label Jun 17, 2026
@lamoreel lamoreel force-pushed the moving-window-uniform branch from 78d0487 to 3e53820 Compare June 18, 2026 05:16

@ilateur ilateur left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the long review, but I hope it's useful and clear.

I have some general concerns as well:

  • Edge charge compensation seems fairly important to a moving window. I think it should be within the same update, although not within the same pull request.
  • I think there should be an example using the moving window, along with an explanation of the current restrictions (preferably on the website too).
  • Don't forget to add the Window class to the documentation, via docs/api.rst I believe.
  • world.center_domain_wall is now something you call once and it is then permanently enabled right? Should there be a way to disable this again? (It would also need something like ClearPostSteps() from mumax3 then.)

Comment thread mumaxplus/world.py
Comment thread mumaxplus/world.py
raise RuntimeError("The moving window functionality only works if exactly 1 magnet exists.")

magnet = list(self.magnets.values())[0]
if not np.any(magnet.geometry) or np.any(magnet.regions):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this if-statement is incorrect. "not any geometry" tests whether or not the geometry is completely empty (which should never be the case). I believe not np.all(magnet.geometry) would be the correct check.

Comment thread mumaxplus/world.py
Comment thread mumaxplus/window.py
Comment thread mumaxplus/window.py
Comment thread test/test_moving_window.py
Comment thread test/test_moving_window.py
Comment thread test/test_moving_window.py
Comment thread test/test_moving_window.py
Comment thread test/test_moving_window.py
@lamoreel

Copy link
Copy Markdown
Contributor Author

Edge charge compensation seems fairly important to a moving window. I think it should be within the same update, although not within the same pull request.

This PR is already in the making 😊 .

I think there should be an example using the moving window, along with an explanation of the current restrictions (preferably on the website too).

Yes.

Don't forget to add the Window class to the documentation, via docs/api.rst I believe.

It seems I keep forgetting this.

world.center_domain_wall is now something you call once and it is then permanently enabled right? Should there be a way to disable this again? (It would also need something like ClearPostSteps() from mumax3 then.)

Very fair. On it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants