Skip to content

Add tests for non-square cells#254

Merged
lrntct merged 1 commit into
ItziModel:mainfrom
lrntct:test_non_square
Jun 25, 2026
Merged

Add tests for non-square cells#254
lrntct merged 1 commit into
ItziModel:mainfrom
lrntct:test_non_square

Conversation

@lrntct

@lrntct lrntct commented Jun 25, 2026

Copy link
Copy Markdown
Contributor
  • Added regression test for solve_h: it sets known qe/qs values on a 5x5 stencil and checks the center-cell depth update matches ((qw - qe) / dx) + ((qn - qs) / dy). It also verifies the result would differ if dx and dy were mistakenly swapped.
  • Added a small helper that builds a 5x5 simulation with arbitrary dx/dy. The helper keeps the initial water volume constant across runs, so the comparisons isolate cell-shape effects.
  • Added test_rectangular_cells_preserve_axis_symmetry_and_bias_early_spreading. Checks top == bottom and left == right. Checks spreading is stronger along the axis with the smaller cell size.
  • Added test_swapping_dx_and_dy_transposes_the_early_time_solution. Compares (dx, dy) = (20, 10) against (10, 20) and asserts the early-time water-depth field is transposed when the cell sizes are swapped.
  • Resolves Add tests for non-square cells #122

@lrntct lrntct merged commit 3eb2c57 into ItziModel:main Jun 25, 2026
8 checks passed
@lrntct lrntct deleted the test_non_square branch June 25, 2026 21:26
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.

Add tests for non-square cells

1 participant