Skip to content

Remove non-operational hyperelasticity capability#1675

Open
sbryngelson wants to merge 3 commits into
masterfrom
agent/remove-hyperelasticity
Open

Remove non-operational hyperelasticity capability#1675
sbryngelson wants to merge 3 commits into
masterfrom
agent/remove-hyperelasticity

Conversation

@sbryngelson

Copy link
Copy Markdown
Member

Description

Remove the currently exposed hyperelastic reference-map capability while its implementation is repaired in a stacked restoration branch.

The audited implementation is not reachable through a normal case because hyper_model is absent from the parameter registry and generated namelist. It also contains a 3D-only kernel exposed to lower-dimensional cases, computes the wrong Cauchy–Green contraction for rotated finite deformations, and leaves derived state fluxes unassigned. Keeping the option visible therefore overstates the supported physics and permits undefined behavior.

This PR removes the user-facing parameters, reference-map state, constitutive module, Riemann-solver hooks, initialization/output paths, validator rules, and documentation claims. Shared hypoelastic infrastructure remains in place.

Related to #1674. A stacked restoration PR will add the corrected, constrained, and tested implementation back on top of this branch; after this PR merges, that restoration PR should be retargeted to master.

Type of change (delete unused ones)

  • Bug fix
  • Refactor
  • Documentation

Testing

  • ./mfc.sh precheck
  • ./mfc.sh build -t pre_process simulation post_process --no-mpi --debug -j 4
  • ./mfc.sh test --from 32A3A936 --to 32A3A936 --no-mpi --debug -j 1
  • Repository-wide search confirms no remaining hyperelastic parameter, state index, module, solver hook, or documentation claim outside build/test artifacts.

Checklist

  • I added or updated tests for new behavior (existing hypoelastic regression remains passing; no hyperelastic regression existed)
  • I updated documentation if user-facing behavior changed

See the developer guide for full coding standards.

GPU changes (expand if you modified src/simulation/)
  • GPU results match CPU results
  • Tested on NVIDIA GPU or AMD GPU

The PR removes an unvalidated GPU path; no GPU hardware was available for this audit.

AI code reviews

Reviews are not retriggered automatically. To request a review, comment on the PR:

  • @claude full review — Claude full review (also triggers on PR open/reopen/ready)
  • Or add label claude-full-review — Claude full review via label

AI-assistance disclosure

This removal and its supporting audit were prepared with AI assistance. The resulting diff was checked with MFC's precheck, a fresh CPU debug build, and a focused hypoelastic regression before publication.

@sbryngelson

Copy link
Copy Markdown
Member Author

The stacked add-back is now open as #1677. It is based on this removal branch so reviewers can inspect the capability being restored from a clean baseline. If this PR merges, #1677 should then be retargeted to master.

@sbryngelson
sbryngelson marked this pull request as ready for review July 25, 2026 23:07
Copilot AI review requested due to automatic review settings July 25, 2026 23:07

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 removes the currently exposed (but non-operational and internally inconsistent) hyperelastic reference-map capability from MFC, including its user-facing parameters, solver hooks, state indexing, and documentation claims, while leaving the shared hypoelastic infrastructure intact.

Changes:

  • Removes hyperelasticity (and related pre_stress/hyper_model) from the Python parameter registry, validators, and docs-generation tooling.
  • Deletes the hyperelastic constitutive module and removes all simulation/pre-/post-process code paths that allocated, initialized, evolved, or output reference-map state.
  • Updates documentation and doc-lint coverage lists to no longer advertise hyperelasticity support.

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated no comments.

Show a summary per file
File Description
toolchain/mfc/params/descriptions.py Removes hyperelastic/pre-stress parameter descriptions and narrows the elasticity category wording.
toolchain/mfc/params/definitions.py Unregisters hyperelasticity and pre_stress from the parameter definitions and visibility lists.
toolchain/mfc/params/ast_analyzer.py Drops hyperelasticity from message classification metadata.
toolchain/mfc/lint_docs.py Removes hyperelasticity doc-coverage checks from the linter’s physics coverage list.
toolchain/mfc/gen_case_constraints_docs.py Removes hyperelasticity from the major “Physics Models” constraints documentation grouping.
toolchain/mfc/case_validator.py Removes hyperelasticity-specific validation and related IGR prohibitions.
src/simulation/m_time_steppers.fpp Removes allocation/deallocation of hyperelastic reference-map primitive fields.
src/simulation/m_start_up.fpp Removes hyperelastic module initialization/finalization from simulation startup/shutdown.
src/simulation/m_sim_helpers.fpp Removes hyperelastic elastic-energy adjustment in enthalpy computation.
src/simulation/m_riemann_solver_hllc.fpp Removes hyperelastic energy/stress/reference-map flux handling from HLLC.
src/simulation/m_riemann_solver_hll.fpp Removes hyperelastic wave-speed branch and related reference-map state handling.
src/simulation/m_rhs.fpp Removes hyperelastic stress-update hook from the RHS pipeline.
src/simulation/m_hyperelastic.fpp Deletes the hyperelastic implementation module.
src/simulation/m_global_parameters.fpp Removes hyperelastic-related globals and GPU updates tied to the removed state.
src/pre_process/m_global_parameters.fpp Removes pre_stress initialization and updates shared-state comments.
src/pre_process/m_data_output.fpp Stops listing “Reference Map” indices in pre-process variable-range output.
src/pre_process/m_assign_variables.fpp Removes hyperelastic reference-map (including pre-stress) initialization logic.
src/post_process/m_start_up.fpp Removes post-process output of xi* fields.
src/post_process/m_global_parameters.fpp Updates shared-state comments after removal of reference-map indexing.
src/common/m_variables_conversion.fpp Removes conservative/primitive conversions for reference-map (xi) state.
src/common/m_global_parameters_common.fpp Removes reference-map indexing/state sizing (b_size, tensor_size, eqn_idx%xi) and hyperelastic flag handling.
src/common/m_derived_types.fpp Removes eqn_idx%xi from the central equation-index type.
src/common/m_boundary_primitives.fpp Removes hyperelastic boundary reflection logic for reference-map components.
docs/module_categories.json Removes m_hyperelastic from documentation module categorization.
docs/documentation/equations.md Removes the hyperelastic model section from the equations documentation.
docs/documentation/case.md Removes hyperelastic/pre-stress parameters from the case-parameter documentation.

@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 61.00%. Comparing base (aaecc47) to head (b042bb2).

Files with missing lines Patch % Lines
src/common/m_global_parameters_common.fpp 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1675      +/-   ##
==========================================
+ Coverage   60.49%   61.00%   +0.50%     
==========================================
  Files          84       83       -1     
  Lines       21189    20998     -191     
  Branches     3134     3103      -31     
==========================================
- Hits        12819    12809      -10     
+ Misses       6303     6140     -163     
+ Partials     2067     2049      -18     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants