Skip to content

Comments

Add inertial-physics regression tests for single-cell fall, directional streaming, walls, and τ relaxation#4

Merged
benjym merged 2 commits intopercolationfrom
copilot/add-test-cases-inertia-model
Feb 18, 2026
Merged

Add inertial-physics regression tests for single-cell fall, directional streaming, walls, and τ relaxation#4
benjym merged 2 commits intopercolationfrom
copilot/add-test-cases-inertia-model

Conversation

Copy link
Contributor

Copilot AI commented Feb 17, 2026

  • Review new PR comment and identify requested action
  • Inspect current branch status and recent commits
  • Run black/flake8 on files touched by recent inertia-test changes
  • Apply minimal formatting/lint fixes required by black/flake8
  • Re-run targeted lint and relevant tests
  • Run code review and security check, then reply to comment
Original prompt

write test cases for the inertia model (with inertia:true in a json file). set up a new initial condition with just one single cell with solid, everything else void, and check that it falls at the right rate, with the right velocity. also do directional tests with an initial velocity and no gravity. finally, we haven't implemented anything for interactions with walls or to test the relaxation rate tau, make up some tests for them that test against real physics.


💡 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.

Co-authored-by: benjym <3380296+benjym@users.noreply.github.com>
Copilot AI changed the title [WIP] Add test cases for inertia model implementation Add inertial-physics regression tests for single-cell fall, directional streaming, walls, and τ relaxation Feb 17, 2026
Copilot AI requested a review from benjym February 17, 2026 23:49
@benjym benjym marked this pull request as ready for review February 18, 2026 00:49
Copilot AI review requested due to automatic review settings February 18, 2026 00:49
@benjym
Copy link
Owner

benjym commented Feb 18, 2026

@copilot flake8/black this and resubmit

Copy link
Contributor Author

Copilot AI commented Feb 18, 2026

@copilot flake8/black this and resubmit

Ran black --check and flake8 on the updated test files, and both pass as-is. Re-ran targeted tests too (23 passed). The current commit remains valid: 991bbc5.

Copilot AI requested a review from benjym February 18, 2026 00:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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: true can 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.

@benjym benjym merged commit f8a56dd into percolation Feb 18, 2026
7 of 9 checks passed
@benjym benjym deleted the copilot/add-test-cases-inertia-model branch February 18, 2026 05:08
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