Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 4, 2025

The steadystate solver is not compatible with multiple sediment fractions, but this constraint was not enforced, allowing invalid configurations to run.

Changes

  • Added validation in check_configuration() to detect and reject steadystate solvers (steadystate, steadystatepieter) when grain_size contains multiple fractions
  • Validation triggers after input parsing with clear error message directing users to either use single fraction or switch solvers (e.g., trunk, pieter)
# Now raises ValueError at initialization:
config = {
    'solver': 'steadystate',
    'grain_size': [225e-6, 300e-6],  # Multiple fractions
    ...
}
# Error: The steadystate solver is not compatible with multiple sediment fractions.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…ractions

Co-authored-by: Sierd <14054272+Sierd@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor sweep functions and remove unused code Add validation to prevent steadystate solver with multiple sediment fractions Nov 4, 2025
Copilot AI requested a review from Sierd November 4, 2025 13:47
@Sierd Sierd marked this pull request as ready for review November 4, 2025 13:53
@Sierd Sierd merged commit 9ccc733 into Sierd-patch-1 Nov 4, 2025
@Sierd Sierd deleted the copilot/sub-pr-251 branch November 4, 2025 13:53
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