diff --git a/PLAN.md b/PLAN.md index 0108948..03b9c1a 100644 --- a/PLAN.md +++ b/PLAN.md @@ -13,7 +13,7 @@ Every new agent session must read this file together with `PROGRESS.md` before p - If an item becomes obsolete, move it to `PROGRESS.md` with a short reason instead of silently deleting it. ## Current Objective -Execute the new Phase 1 rebaseline plan in `phases/1-linear-static-mitc4-rebaseline`. The old `phases/1-linear-static-mitc4` path is historical and superseded by the paper-based MITC4 formulation reset. +Continue the new Phase 1 rebaseline plan in `phases/1-linear-static-mitc4-rebaseline`, starting with P1R-01 reference onboarding. The old `phases/1-linear-static-mitc4` path is historical and superseded by the paper-based MITC4 formulation reset. ## Required Reading For New Agents 1. `AGENTS.md` @@ -36,7 +36,7 @@ Execute the new Phase 1 rebaseline plan in `phases/1-linear-static-mitc4-rebasel ## Active Phase Files - Active phase directory: `phases/1-linear-static-mitc4-rebaseline` - Execute with: `python scripts/execute.py 1-linear-static-mitc4-rebaseline` -- Step numbering is zero-based. `step0.md` starts with a rebaseline audit, and `step15.md` is the independent evaluator closeout. +- Step numbering is zero-based. `step0.md` is complete and recorded in `phases/1-linear-static-mitc4-rebaseline/step0-audit.md`; `step15.md` is the independent evaluator closeout. - Every step file contains a sprint contract with objective, required reading, scope, allowed files, explicit non-goals, tests to write first, reference artifacts, acceptance command, evaluator checklist, and handoff requirements. - Historical phase directory: `phases/1-linear-static-mitc4` - Historical phase status: blocked/superseded. Do not resume the old P1-15/P1-16 path unless the user explicitly requests recovery of that exact phase. @@ -85,7 +85,6 @@ All milestones are intended to become one or more self-contained sprint contract | ID | Status | Owner | Objective | Depends On | Acceptance Focus | |---|---|---|---|---|---| -| P1R-00 | pending | planner | Audit old Phase 1 implementation against the revised MITC4 formulation and map retain/rewrite/delete decisions. | none | Audit artifact or synchronized PLAN/PROGRESS | | P1R-01 | pending | reference generator | Onboard `quad_02` as stored S4 reference and choose normalized-input or parser-compatibility path. | P1R-00 | Original artifacts preserved; compatibility explicit | | P1R-02 | pending | core generator | Revalidate build/test harness, core aliases, DOF enum, and diagnostics. | P1R-00 | Validation command and core tests | | P1R-03 | pending | parser generator | Revalidate Phase 1 parser and immutable Domain subset. | P1R-01, P1R-02 | Supported keywords accepted; unsupported features rejected | diff --git a/PROGRESS.md b/PROGRESS.md index d3735c7..a8fd64a 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -13,10 +13,33 @@ Every new agent session must read this file together with `PLAN.md` before plann - Do not remove history unless the user explicitly asks for archival cleanup. ## Current Status -Phase 1 has a new rebaseline phase definition in `phases/1-linear-static-mitc4-rebaseline`. The old `phases/1-linear-static-mitc4` path is historical and superseded after the MITC4 formulation reset. P1-01 through P1-14 have an initial C++17 implementation, but it is no longer authoritative until reviewed against the revised paper-based `docs/MITC4_FORMULATION.md`. `quad_02` is now the stored S4 reference pair, but its `Part/Assembly/Instance` and `*Density` features remain a compatibility decision for rebaseline step 1. +Phase 1 has a new rebaseline phase definition in `phases/1-linear-static-mitc4-rebaseline`. Step 0 is complete and captured in `phases/1-linear-static-mitc4-rebaseline/step0-audit.md`. The old `phases/1-linear-static-mitc4` path is historical and superseded after the MITC4 formulation reset. P1-01 through P1-14 have an initial C++17 implementation, but it is no longer authoritative until each layer is revalidated against the revised paper-based `docs/MITC4_FORMULATION.md`. `quad_02` is now the stored S4 reference pair, but its `Part/Assembly/Instance` and `*Density` features remain a compatibility decision for rebaseline step 1. ## Completed Work +### 2026-05-04 - P1R-00 rebaseline audit completed +Author: Codex + +Changed files: +- `phases/1-linear-static-mitc4-rebaseline/step0-audit.md` +- `phases/1-linear-static-mitc4-rebaseline/index.json` +- `PLAN.md` +- `PROGRESS.md` + +Summary: +- Audited the existing C++ Phase 1 implementation against the revised paper-based `docs/MITC4_FORMULATION.md` without changing production solver behavior. +- Classified reusable scaffolding for revalidation: CMake/CTest validation, core aliases, DOF mapping, diagnostics, parser/domain skeleton, in-memory `U`/`RF` results, displacement CSV comparator, full-vector reaction recovery, and the linear static workflow. +- Identified MITC4 conflicts requiring rebuild: averaged-edge local basis, 2D projected Jacobian, direct Cartesian-like shear row construction, membrane/bending/shear pre-integration, midsurface-only `2 x 2` integration, and old `1.0e-6` drilling stabilization. +- Preserved the compatibility decision that `quad_02.inp` is an S4 reference artifact but still contains `Part/Assembly/Instance` and `*Density`, so Step 1 must choose a normalized-input or explicit parser-compatibility path. + +Verification: +- Inspected `include/fesa/fesa.hpp`, `tests/test_main.cpp`, current reference files, and active rebaseline phase contracts. +- `python scripts/validate_workspace.py` configured CMake, built `fesa_core` and `fesa_tests`, and ran CTest successfully. + +Follow-up: +- Continue with P1R-01 reference onboarding. +- Revalidate retained scaffolding in its assigned steps before treating it as Phase 1 evidence. + ### 2026-05-04 - Phase 1 rebaseline steps redefined Author: Codex @@ -425,9 +448,10 @@ Verification: ## Known Blockers - No reaction-force reference artifact exists yet under `references/`. - The current initial `quad_01.inp` reference contains `S4R`, `Part/Assembly/Instance`, `*Density`, and `NLGEOM=YES`, so it is not a Phase 1 parser acceptance case as-is. -- No Phase 1-compatible Abaqus `TYPE=S4` input with matching `*_displacements.csv` exists yet for stored-reference regression. +- `quad_02.inp` is a stored Abaqus `TYPE=S4` reference with matching displacement CSV, but it contains `Part/Assembly/Instance` and `*Density`; Step 1 must define a normalized-input or explicit parser-compatibility path before stored-reference regression. ## Current Risks - Implementation could start from the `quad_01` reference input without accounting for its unsupported Abaqus features. +- Implementation could treat the old MITC4 kernel as authoritative even though it conflicts with the revised formulation contract. - Reaction output may be wrong if full-space stiffness/load data is not preserved or reconstructed. - Large-model support may be weakened if any module narrows ids or sparse indices below int64. diff --git a/phases/1-linear-static-mitc4-rebaseline/index.json b/phases/1-linear-static-mitc4-rebaseline/index.json index 681c768..d2713ef 100644 --- a/phases/1-linear-static-mitc4-rebaseline/index.json +++ b/phases/1-linear-static-mitc4-rebaseline/index.json @@ -2,7 +2,7 @@ "project": "FESA", "phase": "1-linear-static-mitc4-rebaseline", "steps": [ - { "step": 0, "name": "rebaseline-audit", "status": "pending" }, + { "step": 0, "name": "rebaseline-audit", "status": "completed" }, { "step": 1, "name": "reference-onboarding", "status": "pending" }, { "step": 2, "name": "core-harness-guardrails", "status": "pending" }, { "step": 3, "name": "parser-domain-subset", "status": "pending" }, diff --git a/phases/1-linear-static-mitc4-rebaseline/step0-audit.md b/phases/1-linear-static-mitc4-rebaseline/step0-audit.md new file mode 100644 index 0000000..f652b00 --- /dev/null +++ b/phases/1-linear-static-mitc4-rebaseline/step0-audit.md @@ -0,0 +1,88 @@ +# Step 0 Audit: Phase 1 Rebaseline + +Date: 2026-05-04 +Author: Codex + +## Objective +Audit the existing Phase 1 C++ implementation against the paper-based `docs/MITC4_FORMULATION.md` reset before changing solver behavior. + +This step did not modify production C++ code. The existing implementation remains useful historical scaffolding, but it is not authoritative for the rebuilt MITC4 element until each layer is revalidated through the rebaseline steps. + +## Required Sources Read +- `AGENTS.md` +- `PLAN.md` +- `PROGRESS.md` +- `docs/README.md` +- `docs/HARNESS_ENGINEERING.md` +- `docs/PRD.md` +- `docs/ARCHITECTURE.md` +- `docs/ADR.md` +- `docs/NUMERICAL_CONVENTIONS.md` +- `docs/MITC4_FORMULATION.md` +- `phases/1-linear-static-mitc4-rebaseline/step0.md` + +## Code Areas Inspected +- `include/fesa/fesa.hpp` +- `tests/test_main.cpp` +- `CMakeLists.txt` +- `scripts/validate_workspace.py` +- `references/quad_01.inp` +- `references/quad_02.inp` + +## High-Level Finding +The existing implementation has a working single-header Phase 1 skeleton: parser, domain validation, DOF mapping, dense test solver, in-memory results, displacement CSV comparison, full-vector reaction recovery, and a basic linear static workflow. + +The existing MITC4 kernel is not compatible with the revised formulation contract. It uses a simplified midsurface local basis, 2D projected derivatives, separated membrane/bending/shear factors, direct shear row construction at tying points, 2 x 2 midsurface-only integration, and `drilling_stiffness_scale = 1.0e-6`. The revised contract requires degenerated-continuum geometry, director/local rotation handling, convected covariant strain rows, MITC transverse shear tying on tensor components, `2 x 2 x 2` Gauss integration, and drilling stabilization based on `1.0e-3 * min_positive_diagonal(K_local_without_drilling)`. + +## Retain With Revalidation +These areas should be kept as starting points, but each must be revalidated by the assigned rebaseline step before being treated as Phase 1 evidence. + +| Area | Current Evidence | Rebaseline Owner | +|---|---|---| +| CMake/CTest validation harness | CMake files and `scripts/validate_workspace.py` run a real C++ test executable. | P1R-02 | +| Core numeric and DOF aliases | `Real`, int64 ids/equations, and Abaqus DOF 1..6 mapping exist. | P1R-02 | +| Diagnostics model | Error/warning diagnostics and code-based checks exist. | P1R-02, P1R-04 | +| Parser subset skeleton | `*Node`, `*Element TYPE=S4`, `*Nset`, `*Elset`, `*Material`, `*Elastic`, `*Shell Section`, `*Boundary`, `*Cload`, `*Step`, `*Static`, and `*End Step` are represented. | P1R-03 | +| Unsupported feature rejection | Generic unsupported keyword rejection plus `S4R` and `NLGEOM=YES` checks exist. | P1R-01, P1R-03 | +| Domain validation | Missing element nodes, shell section/material links, load/boundary targets, no active elements, and no load warnings are present. | P1R-04 | +| DofManager foundation | Six-DOF full order, constrained/free partition, equation numbering, and full-vector reconstruction exist outside Node/Element. | P1R-05 | +| Result field structure | In-memory step/frame fields for `U` and `RF` exist. | P1R-06 | +| CSV displacement comparator | Required Abaqus displacement columns are parsed and compared by node id with abs/rel tolerance support. | P1R-06, P1R-14 | +| Linear static flow | Reduced free-DOF solve, full vector reconstruction, and `R_full = K_full * U_full - F_full` are implemented. | P1R-12, P1R-13 | + +## Rewrite Required +These areas conflict with `docs/MITC4_FORMULATION.md` and should be rebuilt under the matching contracts, not patched casually. + +| Area | Conflict | Rebaseline Owner | +|---|---|---| +| MITC4 local basis | Current `computeLocalBasis` uses averaged edge directions from the four coordinates. The revised contract requires element-center midsurface normal, nodal director axes `V1/V2/Vn`, deterministic fallback axes, and integration local bases. | P1R-07 | +| Geometry and Jacobian | Current code projects the element to local 2D `xy` and uses bilinear planar derivatives only. The revised contract requires degenerated-continuum geometry with through-thickness coordinate `zeta`, covariant bases `g_i`, and invalid basis/Jacobian diagnostics. | P1R-07, P1R-09 | +| Local rotation transform | Current transform rotates three translations and three rotations with one basis block. The revised contract requires mapping global rotations to local `[alpha, beta, gamma]`, where drilling `gamma` does not enter physical strain. | P1R-08, P1R-10 | +| Strain rows | Current B matrix is an 8-row engineering shell split, not the documented convected covariant strain vector `[eps_11, eps_22, eps_33, gamma_23, gamma_13, gamma_12]`. | P1R-08 | +| MITC shear tying | Current `addStandardShearRow` builds Cartesian-like `gamma_xz/gamma_yz` rows at midside derivatives, then interpolates them. The revised contract ties convected tensor components `eps_13` and `eps_23` from direct covariant rows at A/B/C/D. | P1R-08 | +| Material and integration | Current code uses pre-integrated membrane, bending, and shear factors at `2 x 2` midsurface points. The revised contract requires local plane-stress matrix with shear correction, material transform as needed, and `2 x 2 x 2` Gauss integration. | P1R-09 | +| Drilling stabilization | Current default is `1.0e-6` and the stiffness is assembled through a drilling row using `E * thickness * scale`. The revised contract requires `1.0e-3 * min_positive_diagonal(K_local_without_drilling)` added to local `gamma` diagonals before transformation. | P1R-10 | +| MITC4 tests | Existing element test only checks shape partition, stiffness symmetry, and one uniform translation. The revised contract requires director basis, rotation transform, tying-row finite difference, MITC interpolation, rigid-body, drilling, patch, and locking-sensitivity tests. | P1R-07 through P1R-11 | + +## Revalidate Before Reference Regression +These areas are promising but not sufficient for stored-reference credibility yet. + +| Area | Required Revalidation | +|---|---| +| `quad_02` reference path | `quad_02.inp` uses `TYPE=S4`, but also `Part/Assembly/Instance` and `*Density`. Step 1 must either add a normalized Phase 1-compatible derivative input or create an explicit parser compatibility plan. | +| Parser rejection policy | The parser must continue rejecting `S4R`, `Part/Assembly/Instance`, `*Density`, `*Include`, pressure loads, nonzero prescribed displacement, and `NLGEOM=YES` unless a later contract changes the subset. | +| Singular diagnostics | Existing diagnostics cover some conditions, but untouched free DOFs, rotational/drilling risks, invalid element geometry, non-positive thickness paths, and solver zero-pivot messages need stronger coverage. | +| Reaction output | Full-vector reaction recovery exists, but `RF` should remain verified by equilibrium tests until user-provided Abaqus reaction CSV artifacts are available. | +| Assembly and solver boundary | Current dense matrix and Gaussian solver are acceptable for deterministic tests, but the architecture requires a future sparse/MKL adapter boundary and int64 sparse path. | + +## Deferred Or Out Of Scope +- Abaqus `S4R`, reduced integration, and hourglass control. +- `Part/Assembly/Instance` support unless Step 1 or a later parser contract explicitly adds it. +- `*Density` as material support for Phase 1 static analysis. +- `NLGEOM=YES`, geometric nonlinearity, pressure loads, RBE2/RBE3, nonzero prescribed displacements, dynamics, heat transfer, composite sections, stress/strain/resultant outputs, and mesh quality diagnostics. +- Tuning drilling stiffness to match one reference case. + +## Step Handoff +Proceed to P1R-01 reference onboarding. + +P1R-01 must decide the `quad_02` compatibility path without silently expanding parser support. P1R-02 can proceed in parallel afterward for core harness guardrails, but production MITC4 work should wait until the reference and guardrail foundations are explicit.