Repository navigation
Remove the experimental learned-damage route - #15
Merged
Merged
Conversation
The learned-damage route is not part of the released solver scope, so it
is removed together with its configuration, documentation and tests. The
classical damage solve is now the only damage-subproblem route.
Removed:
- phast.learned_damage and the phast.training package
- examples/learned_damage and docs/user_guide/learned_damage.md
- tests for the learned-damage controller, step context and mesh-graph
adapter
- SolverConfig and SolverSettings fields damage_update, damage_predictor,
damage_checkpoint, damage_predictor_options, damage_residual_rtol,
damage_residual_atol, damage_bound_tolerance and damage_fallback, with
their validation, schema and REFERENCE.yaml entries
- StaggeredSolver.set_damage_predictor, clear_damage_predictor, the
per-step context builder, the route-report predictor fields and the
AIBridge class
- FEMOperators.compute_physics_loss, which had no remaining callers
- the learned-damage guidance in phast doctor
The modular-FEM tutorial is renamed to 03_modular_fem.md ("Modular
fracture problems") and keeps only its finite-element content. The
regenerated phast.schema.json also picks up the rational_at2 degradation
and stress_degradation entries that the checked-in file was missing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This removes the experimental learned-damage route. It is not part of the released solver scope, and the teaching material does not use it. After this change the classical phase-field damage solve is the only damage-subproblem route.
What was removed
phast.learned_damageand its package-level exports (DamageDecision,DamagePrediction,DamagePredictionRejected,DamagePredictor,DamageStepContext,DamageUpdateController,load_damage_predictor)phast.trainingpackageexamples/learned_damage/anddocs/user_guide/learned_damage.mdtests/test_learned_damage.py,tests/test_mesh_graph_net_adapter.pyandtests/test_damage_step_context_fem_helpers.py. The last file is removed in full because every test in it exercisedDamageStepContextmethods.damage_update,damage_predictor,damage_checkpoint,damage_predictor_options,damage_residual_rtol,damage_residual_atol,damage_bound_toleranceanddamage_fallback. These are removed fromSolverConfigandSolverSettings, together with:__post_init__checksconfigs/REFERENCE.yamlentriesStaggeredSolver:set_damage_predictorandclear_damage_predictorstep_solve_damageupdateandlast_routeroute-report fields and the predictor print blockAIBridgeclassFEMOperators.compute_physics_loss, which had no remaining callersphast doctorDocumentation
docs/tutorial/03_modular_fem_and_learned_damage.mdis renamed todocs/tutorial/03_modular_fem.md, retitled "Modular fracture problems", and keeps only its finite-element content.docs/index.mddocs/tutorial/index.mdREADME.mdDOCUMENTATION_STYLE.md.io_utilsno longer describe the generic hooks in terms of learned models.set_damage,get_H_nodal,compute_edge_indexand the storededge_indexdataset keep their names and behaviour.Schema
configs/phast.schema.jsonwas regenerated withpython -m phast schema --output configs/phast.schema.json. As well as dropping the removed fields, the regeneration adds therational_at2degradation option and thestress_degradationfield. Both already exist in the code but were missing from the checked-in schema.Tests
main(1c379fd):pytest -q testsgave 467 passed.learnedcase oftest_unsupported_choices_fail_before_executionmainstill passes.sphinx -W -b html docsbuilds without warnings: 54 pages, down from 55 because the learned-damage guide is gone. It also builds cleanly withPHAST_NB_EXECUTION_MODE=force, matching the docs workflow.python -m phast doctor--validate-onlyconfigurationssolver.damage_updateis now rejected as an unknown field, in both the legacy and the schema-v2 input paths.