Repository navigation
Conversation
… study Each analysed point is also solved on five copies of its panels jittered by -1, 0 or +1 ULP (seeds 1-5, the jitter the reference twins use), in parallel, from the same initial state, so a point's verdict depends only on what its content id hashes. A point valid on Classes A and B whose twins spread a reported quantity beyond the error threshold (1e-4) is Invalid (IllConditioned); beyond only the warning threshold (1e-8) it stays valid with a warning. Only values decide: twins that did not converge raise a TwinsNotValid warning, never a reason. The twins never steer the base solve. The conditioning study (studies/conditioning, docs/validation/ conditioning/) measures every point's spread over the series and branch-coverage cases and sets both thresholds in the gaps of the distribution. Its figures are on ironlab 0.16.
…lt-on The validity CLI of issue #11's design comment: - --conditioning on|off|study replaces --no-twins. study writes every twin's record in a `study` array (role twin, twin_of, seed), and with analyse -o or polar --distributions each record's twins' full records. A study's records always carry their numbers; `results` still follows --allow-invalid, which is orthogonal to every check. - A twin hashes its own panels and seed, so every twin record has an id of its own; it cites its point's predecessor. Base ids are unchanged. - Every record lists the classes of its reasons: out-of-domain (A), unconverged (B), ill-conditioned (C). - yfoil polar --halt-on CRITERION[=N],... halts a leg after N consecutive points of a class, one count per criterion. The default, xfoil, is XFOIL's NSEQEX rule exactly (narrower than Class B); none never halts. PolarConfig.max_consecutive_failures becomes halt_on, with a caller-supplied classifier; the polar records each halt. - Contradictory flags are usage errors; anomalous points to issue #12.
Work through --halt-on xfoil,ill-conditioned on a NACA 4412 at Re 3e6, which stops its downward leg at its first ill-conditioned point (-18 deg), with the console note and the polar's halts record, and show the study record of that point's unconverged twin, which keeps its numbers. Add classes to the contract example in solution validity and drop its values: null, which the output leaves out rather than writing null.
thclark
added a commit
that referenced
this pull request
Oct 27, 2026
Main's unified validity CLI (#34) solves every point with its five 1-ULP twins by default and passes the output options as one OutputOptions. The binding takes the same options with the same defaults (conditioning, spread_warning_threshold, spread_error_threshold, and halt_on for polar), so its records stay the CLI's byte for byte. The CLI's halt-on and threshold parsing move into the library (HaltRule::parse_list, Thresholds::from_options) so both use one copy, with the same messages. WebAssembly has no threads, so on wasm targets (the module and the wasm32-wasip1 CLI) a point's twins run one after another; they start from copies of the session and never steer the base, so the results are the same. The bindings page's speed figures are remeasured with and without the twins.
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.
Closes #11.
Builds the conditioning check into the solver and gives it the validity CLI designed in #11's design comment. Anomaly detection (Class D) follows the same pattern and is #12, to be done separately.
Twins in the solver
Invalid (IllConditioned), and its numbers are withheld.TwinsNotValidwarning, never a reason.studies/conditioning,docs/validation/conditioning/) sets both thresholds in the gaps of the spread distribution, measured over the series and branch-coverage cases. Over 635 measured points, 12 are withheld and 19 get a warning. Its figures are drawn with ironlab 0.16.The validity CLI
--conditioning on|off|studyon(default) runs the twins.offruns none, as XFOIL.studyalso writes every twin's record. Replaces--no-twins.--allow-invalidresults. This is what the issue'sREPORTbecame.--halt-on CRITERION[=N],...polaronly. Halts a leg after N consecutive points meeting a criterion:xfoil,out-of-domain,unconverged,ill-conditionedornone. Each criterion keeps its own count.--spread-warning-threshold,--spread-error-thresholdstudyarray, withrole: twin,twin_of,seedand an id of their own. Withanalyse -oorpolar --distributions, each record also carries its twins' full records: jittered geometry, surface and boundary layer.resultsis unchanged by a study.classeson every record:out-of-domain(A),unconverged(B),ill-conditioned(C).--halt-on xfoilis XFOIL's NSEQEX rule exactly, so default sweeps don't change. It is narrower thanunconverged, which also counts the inviscid Newtons and converged points that passed through a NaN.PolarConfig.max_consecutive_failuresbecomeshalt_on, with a classifier supplied by the caller, because the thresholds belong to the output layer.halts.--halt-on ill-conditionedwith--conditioning off.--halt-on anomalousis refused with a pointer to Add intelligent polar stepping algorithm #12.On NACA 4412 at Re 3e6,
--halt-on xfoil,ill-conditionedstops the downward leg at −18°, the point the conditioning study flags as ill-conditioned.Docs
CLAUDE.md, the analyse and polar command pages (new section Halting a leg), solution validity (new sections Classes on records and Halting a polar, plus the study), the data model (brought up to date), terminology and the XFOIL name mapping (NSEQEX →
HaltRule::XFOIL).Test plan
cargo test --release --workspace: 376 passed, 0 failed. New tests cover twin ids, study records, classes, halt rules and the CLI's usage errors.cargo fmt --checkandcargo clippy --workspace --all-targets --all-features -- -D warningsci/no-deviations.sh,ci/validity-write-only.sh,ci/ignore-drift.shscripts/docs.sh build --cleanandscripts/docs-check.py