Skip to content

feat: hybrid steady-state evaluation and analysis package split (v3.2.0) - #56

Merged
pillowbeast merged 8 commits into
mainfrom
feat/alternative-steady-state
Aug 6, 2026
Merged

feat: hybrid steady-state evaluation and analysis package split (v3.2.0)#56
pillowbeast merged 8 commits into
mainfrom
feat/alternative-steady-state

Conversation

@pillowbeast

Copy link
Copy Markdown
Collaborator

Summary

  • Rewrite steady-state evaluation as a hybrid of independent critical-cut (tensile ease) and tip-contact / touchdown (ERR) PST configurations, with orientation winners chosen separately.
  • Split CriteriaEvaluator into focused modules: steady_state.py, coupled_criterion.py, and envelopes.py; keep evaluate_SteadyState as a thin facade (breaking I/O change).
  • Add Jamieson & Johnson (1990) slab tensile strength (tensile_strength_method="jamieson_johnson", now the default).
  • Improve analyzer rasterization with denser sampling near segment boundaries; refine coupled-criterion search (damping, max iterations, reuse of min-force / x-coords).
  • Bump version to 3.2.0.

Breaking changes

  • CriteriaEvaluator.evaluate_SteadyState inputs/outputs differ from the previous flat result shape. Tensile and ERR now live under nested blocks (SteadyStateResult.tensile / .err).

- Implemented a new tensile strength calculation method based on Jamieson & Johnson (1990) in `layer.py`.
- Updated the `Layer` class to include the new method in the `tensile_strength_method` options, with "jamieson_johnson" as the default.
- Adjusted existing tests to accommodate the new tensile strength method and maintain consistency across different methods.
Track the experimental PST steady-state package plus dev/alt_steady_state artifacts and comparison notes so φ/tensile-law study results stay recoverable on this branch
Re-ignore dev/ and todo/ and remove those paths from the index so only the tagged snapshot keeps the frozen results.
…figurations.

- integrated new steady state evaluation method.
- disessembled criteria_evaluator to split envelopes from CC and SS logic
- modified analyzer rasterize_logic to use denser window around boundary segments
- modified CC logic: damping in place, passing max iterations, passing min_force_results and removing redundant rasterize calls by passing x_coords into find_crack_length
- added tests for new rasterize function
- removed numpy warnings by casting to floats from arrays when returning.
Copilot AI lite review requested due to automatic review settings August 6, 2026 10:33
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@pillowbeast, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 15 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5c52c937-2007-4258-84cf-dd60a1bbd411

📥 Commits

Reviewing files that changed from the base of the PR and between 31854b7 and 792145b.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (20)
  • CITATION.cff
  • README.md
  • demo/demo.ipynb
  • pyproject.toml
  • src/weac/__init__.py
  • src/weac/analysis/__init__.py
  • src/weac/analysis/analyzer.py
  • src/weac/analysis/coupled_criterion.py
  • src/weac/analysis/criteria_evaluator.py
  • src/weac/analysis/envelopes.py
  • src/weac/analysis/plotter.py
  • src/weac/analysis/steady_state.py
  • src/weac/components/layer.py
  • tests/analysis/test_analyzer.py
  • tests/analysis/test_criteria_evaluator.py
  • tests/analysis/test_pst_critical_cut_touchdown.py
  • tests/analysis/test_slab_tensile_comparisons.py
  • tests/analysis/test_steady_state_ease.py
  • tests/components/test_layer.py
  • tests/test_regression_simulation.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 introduces a hybrid steady-state evaluation workflow (separating tensile critical-cut and ERR tip-contact legs) and restructures the analysis package by splitting previously monolithic evaluation logic into focused modules, while bumping the project version to 3.2.0 and updating tests accordingly.

Changes:

  • Rewrites steady-state evaluation into an independent dual-leg hybrid result with structured tensile and err blocks, plus new unit tests for orientation selection and PST tip-touch behavior.
  • Splits CriteriaEvaluator internals into steady_state.py, coupled_criterion.py, and envelopes.py, and updates rasterization to support boundary-refined grids.
  • Adds Jamieson–Johnson (1990) slab tensile strength and makes it the default tensile strength method.

Reviewed changes

Copilot reviewed 19 out of 21 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
uv.lock Bumps editable weac version to 3.2.0 in lockfile.
tests/test_regression_simulation.py Updates regression expectations to new structured steady-state result.
tests/components/test_layer.py Adds unit tests for Jamieson–Johnson tensile strength + default method change.
tests/analysis/test_steady_state_ease.py New unit tests for hybrid ease/orientation selection helpers.
tests/analysis/test_slab_tensile_comparisons.py Refactors A/B comparisons to use hybrid steady-state tensile/ERR outputs.
tests/analysis/test_pst_critical_cut_touchdown.py New unit tests for “tip already touching at tensile root” handling.
tests/analysis/test_criteria_evaluator.py Updates evaluator tests for structured SS results and coupled-criterion optimizations.
tests/analysis/test_analyzer.py Adds tests for boundary-refined rasterization and local segment grid behavior.
src/weac/components/layer.py Adds Jamieson–Johnson tensile strength method and makes it the default.
src/weac/analysis/steady_state.py New hybrid steady-state implementation (critical-cut + tip-contact legs).
src/weac/analysis/plotter.py Ensures envelope root functions return Python scalars for SciPy root-finders.
src/weac/analysis/envelopes.py New standalone envelope evaluation module (stress + fracture toughness).
src/weac/analysis/criteria_evaluator.py Converts evaluator into a facade delegating to split modules.
src/weac/analysis/coupled_criterion.py New coupled-criterion engine module with reuse/optimization changes.
src/weac/analysis/analyzer.py Adds boundary-refined rasterization via local_segment_grid and scalar-safe integrands.
src/weac/analysis/init.py Updates analysis package exports to reflect module split and new result types.
src/weac/init.py Bumps __version__ to 3.2.0.
README.md Updates release notes for v3.2.0 and documents breaking steady-state API change.
pyproject.toml Bumps package version and bumpversion current_version to 3.2.0.
CITATION.cff Updates citation version to 3.2.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CITATION.cff Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

PR Quality Assessment — v3.2.0 hybrid steady-state

Reviewed added/modified analysis code (steady_state.py, coupled_criterion.py, criteria_evaluator.py facade, analyzer.py raster changes) and associated tests.

Outcome: 4 actionable findings (1 High, 3 Medium). No security vulnerabilities identified.

Top findings

  • High — Regression: evaluate_coupled_criterion now reuses iteration-1 stress-envelope distances for iterations > 1 instead of recomputing each loop (behavior on main). Returned max_dist_stress / min_dist_stress can be stale at convergence.
  • Medium — Bug: NaN ease metrics pass _numeric() and silently bias orientation selection toward downslope.
  • Medium — Bug: Tip-contact invalidation uses exact w_tip >= crack_h while segment masking uses 1e-9 mm tolerance — FEM noise can flip no_crack outcomes.
  • Medium — Regression: Coupled _calculate_maximal_stresses switched from uniform num=4000 to RASTER_NUM=800 boundary-refined grid, changing stress metrics vs pre-refactor.

287/289 tests pass locally; 2 comparison tests skipped due to missing reference weac==2.6.4 environment (infra, not PR logic).

No prior automation threads to reconcile.

Open in Web View Automation 

Sent by Cursor Automation: Check PR

Comment thread src/weac/analysis/coupled_criterion.py
Comment thread src/weac/analysis/steady_state.py Outdated
Comment thread src/weac/analysis/steady_state.py Outdated
Comment thread src/weac/analysis/coupled_criterion.py
@pillowbeast
pillowbeast merged commit 3567c35 into main Aug 6, 2026
4 checks passed
@pillowbeast
pillowbeast deleted the feat/alternative-steady-state branch August 6, 2026 11:09
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