Files
FESADev/docs/hex8-structural-analysis/verification.md
T

138 lines
8.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Hex8 original comparison evidence
This page records T8's comparison-only Python implementation and its observed
results. It does not replace the feature PRD, numerical controls or completion
checklist. The comparator reads official rounded Float64 quantities; it does not
recompute the internal high+low solver acceptance gates from those observables.
## Entry point and identities
`uv run --with h5py --with pytest python scripts/verification/compare_hex8.py`
requires `--case`, the actual scratch `--input`, official `--results`, and
`--report`. `--references` defaults to `reference/hexa`. The optional
`--execution-record` consumes a closed native CLI record; it never executes its
command. A supplied record must have native exit0, unchanged original/copy byte
identities, and the exact input and result hashes. Without that record the report
explicitly certifies file comparison only, not successful solver execution.
For example, after a real original run has naturally completed:
```powershell
uv run --with h5py --with pytest python scripts/verification/compare_hex8.py `
--case hexa_linearstatic --input <scratch>/hexa_linearstatic.inp `
--results <scratch>/hexa_linearstatic_results.h5 `
--execution-record <scratch>/native.json --report <evidence>/comparison.json
```
The report path may not overwrite an input, reference, execution record or result.
Authoritative repository originals remain protected even with alternate copied
references; existing symlink/junction and hardlink aliases are also checked.
Exit0 means the declared comparison passes; exit1 means a numerical family fails;
exit2 means an identity/schema/finite/precondition error or missing modal reference.
The tool is not a solver launcher, result generator, reference repair or release
readiness check.
The fixed source inventory is the [reference-model](reference-model.md) inventory:
442 nodes, 300 C3D8 elements and 13 frozen original files. Input and CSV raw SHA256
must match the documented Windows working-tree bytes. The HDF5 metadata must
identify the actual lexically normalized absolute scratch path and that file's FNV1a64 content
identity; a different path with identical bytes is not silently accepted.
Complete CSV identities are checked before any physical values are converted.
Complete required Solid model/frame/physical schemas, UTF-8 attributes and explicit
LE F64/U64/U8 widths are then checked. Result arrays join the source node or
source element/point labels through their internal ID maps; CSV row order is not
an identity. Physical values, including nonprojected RF rows and unused exported
CSV derived quantities, must be finite before tolerance evaluation.
Static reference increment10 maps to the completed load-factor1 frame, independent
of its HDF5 storage frame index. RF validates all442 source rows before projecting
the actual51 constrained scalar components. It never compares free RF with free
residual. Stress compares all300×8×6 unaveraged global Cauchy components. Fixed
IntPt1–8 conventions are checked without nearest-coordinate remapping. Point
coordinates are auxiliary: CSV coordinate errors use the approved
`16*float32-eps*sum(abs(Na*Xa_axis))` source-resolution budget; the scalar stress
policy is unchanged.
Dynamic comparisons require exactly101 accepted frames. Integer increment0–100
is matched first, source decimal time must equal n/10, and each stored time must
be binary64 `n*0.1`. Each frame's1326 U scalars form a separate blocking family.
There is no interpolation, nearest-time matching, scale sharing between frames,
rotation family or acceleration/energy reference claim.
## Common numerical policy
Every static case has independent U-global, constrained RF-global and S-global
blocking families. Every dynamic frame has its own U-global blocking family.
For each family, only reference values define S=max(abs(reference)) and B=.01S.
Rows with abs(reference)<=B require absolute error<=B; other rows require relative
error<=.05. All-row RMS/S must also be<=.01. Boundaries are inclusive, and S=0
requires every actual value to be exactly0. No absolute floor, denominator clamp,
row deletion or cancellation of signed errors is applied. Reports preserve each
scalar identity/value/error/branch/pass and family scale/band/max-absolute-error,
absolute/relative RMS, source SHA and policy.
The independent typed modal comparison behavior requires explicit source step,
mode1–10, eigenvalue or frequency quantity, and matching `1/time^2` or `1/time`
units. Each mode is a singleton using the same RMS1% policy. This is not an
assumption about the absent original Value file's eventual CSV layout. Actual
modal original comparison remains **NOT RUN** until a genuine reference is
provided and its semantics and hashes are confirmed.
## Current observations
The initial seven behavior assertions failed before implementation (pytest native
exit1). The first expanded suite passed63/63 with native exit0. Those tests include
original-sized independently declared HDF5 schema fixtures and reference values;
they are comparator behavior fixtures, not actual FESA source validation evidence.
The affected Hex8 plus legacy HHT comparator suite passed119/119 (native exit0,
62.51s) before independent review fixes. Those bounded fixes were reproduced by
safe behavior RED tests and the five targeted regressions then passed5/5. Final affected checks after all three independent findings were corrected passed
124/124 with native exit0 (81.41s), with raw stdout and JUnit retained under
`.harness/hex8-evidence/t8/final-affected/`. The preliminary whole `uv ... pytest -q` attempt and the separate exact
configured `uv run --with h5py --with pytest python -B -m pytest -v -rs`
(`docs/operations.md:87`, adding h5py) both stopped during collection with native
exit2 and five legacy operational import errors (`msvc_harness` and removed `scripts.hooks`). It is not a whole-suite PASS;
no tests were excluded and no retired orchestration was restored.
Actual official linear-static and nonlinear-static results passed source,
model, schema, point, finite and frame prechecks and failed all three numerical
families. Their closed CLI evidence records both have native exit0 and matching
original/copy/result hashes; their comparator commands have native exit1.
These are genuine comparison failures under the unchanged policy, not reader
precheck failures or solver native execution failures. Frequency official readback
passes its prechecks; its comparator exits2 with `not-run`, not PASS.
| Case / blocking quantity | Scalars | Failing rows | S | Maximum absolute error | RMS/S |
| --- | ---: | ---: | ---: | ---: | ---: |
| linear static U | 1326 | 79 | .00186131289 | .00007588175038730229 | .016739519723527385 |
| linear static RF | 51 | 34 | 513497.094 | 78630.61640144575 | .06818892528188494 |
| linear static S | 14400 | 7783 | 3430145 | 982855.3871926877 | .04270903417463437 |
| nonlinear static U | 1326 | 79 | .00186110672 | .00007586510202476195 | .016737790679783753 |
| nonlinear static RF | 51 | 34 | 513445.594 | 78623.61011241788 | .0681899286018377 |
| nonlinear static S | 14400 | 7782 | 3429817.75 | 982753.151651503 | .04270850513087158 |
Official result SHA256 values are
`3ef92c35ea83ddb4d11437ff87ef15eca7dac179d378eda19570abae579b09d0` (linear),
`0095ebf2d360a8bd8a71212af0dd500ed611a56540a173a39d9c8d88d8e05bbf` (nonlinear),
and `0ec4d2b09250bab17a8532228cd34a312518c04023076f971e929b387031c6b3` (frequency).
Scratch input paths are
`C:/git/FESADev/.harness/hex8-evidence/t8-original-cli/<case>/<case>.inp`.
Each exact command, closed native exit and full row report is retained under
`C:/git/FESADev/.dryforge/worktrees/hex8-t8-reference/.harness/hex8-evidence/t8/official-comparisons/<case>/`.
The command records identify the actual scratch input, original reference directory,
HDF5 and closed native CLI record consumed. Comparator implementation review and
remaining naturally completed dynamic originals are tracked separately.
| Actual original | Current comparison state |
| --- | --- |
| `hexa_linearstatic` | Full precheck PASS; U/RF/S numerical FAIL (comparator native1) |
| `hexa_nonlinearstatic` | Full precheck PASS; U/RF/S numerical FAIL (comparator native1) |
| `hexa_dynlinear` | NOT RUN by comparator; root-owned actual CLI run pending |
| `hexa_dynnonlinear` | NOT RUN by comparator; root-owned actual CLI run pending |
| `hexa_freq` | Official HDF5 precheck PASS; modal Value absent, actual comparison NOT RUN (native2) |
Full MSVC build/CTest, original CLI orchestration, independent numerical/physics
investigation of the reference conflict and whole-feature completion are root-owned
and are not inferred from this Python implementation or its fixture tests.