Skip to content

Fix incorrect particle coordinate scaling in fake_amr_ds (use *= inst…#5381

Open
yaochengchen wants to merge 1 commit intoyt-project:mainfrom
yaochengchen:fix_bug_in_testing
Open

Fix incorrect particle coordinate scaling in fake_amr_ds (use *= inst…#5381
yaochengchen wants to merge 1 commit intoyt-project:mainfrom
yaochengchen:fix_bug_in_testing

Conversation

@yaochengchen
Copy link

PR Summary

Fix incorrect particle coordinate scaling in fake_amr_ds.
Particle positions were mistakenly scaled using division instead of multiplication, which could place particles outside their grid bounds. This change restores correct linear mapping to [left_edge, right_edge) and adds a regression test.

PR Checklist

  • New features are documented, with docstrings and narrative docs
  • [ yes] Adds a test for any bugs fixed. Adds tests for new features.

@cphyc cphyc added bug tests: running tests Issues with the test setup labels Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug tests: running tests Issues with the test setup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments