Add inertial-physics regression tests for single-cell fall, directional streaming, walls, and τ relaxation#4
Conversation
Co-authored-by: benjym <3380296+benjym@users.noreply.github.com>
|
@copilot flake8/black this and resubmit |
Ran |
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive regression tests for the inertial physics model in the HGD simulation code. The tests verify that the inertia: true configuration is correctly loaded, that particles move in expected directions with given velocities, that wall boundaries properly block particle movement, that tau relaxation follows exponential decay physics, and that gravity-driven particle fall accumulates velocity at the correct rate.
Changes:
- Added JSON config loading test to verify
inertia: truecan be parsed and applied - Added parameterized directional streaming tests for zero-gravity transport with initial velocities
- Added wall interaction test to ensure particles respect boundary masks
- Added multi-step tau relaxation test verifying exponential velocity decay
- Added single-particle fall test checking gravity-driven velocity accumulation
- Added
<stdexcept>include to core.cpp for exception handling
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/test_stream_lbm_zero_eq.py | Added 4 new tests: JSON config loading, parameterized directional streaming without gravity, wall interaction behavior, and multi-step tau relaxation with exponential decay |
| test/test_move_particles_core.py | Added single-particle gravity fall test verifying position and velocity changes over multiple time steps |
| HGD/motion/core.cpp | Added <stdexcept> include required for std::invalid_argument exception used in space_criterion parsing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.