Skip to content

ymf 0.3.1: a stabilization block may state only shock capturing, and none (C42 round 6) - #32

Merged
cekees merged 4 commits into
proteustoolkit:mainfrom
cekees:main
Nov 18, 2026
Merged

cekees merged 4 commits into
proteustoolkit:mainfrom
cekees:main

Conversation

@cekees

@cekees cekees commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

One round from cekees/ymf, for a 0.3.1. ymf 0.3.0 required method in every stabilization: block, so a block that states only shock_capturing, which is how proteus's dam-break specs wrote RDLS before 0.3.0, stopped loading. This restores it.

cekees/ymf PR what
#17 C42 round 6, three commits: stabilization: none, method: none, and a block with only shock_capturing (read as method: none with that shock capturing; ymf picks no method for it); tau or lagged without a method is refused with a message that says so; proteus's pre-0.3 dambreak.ymf and two_phase_level_set.ymf load unchanged, resolve and round-trip an archive (new tests); docs/changes.md 0.3.1 entry and problem-specification.md (none, shock capturing alone, what missing() reports)

Nothing is defaulted: a reader that maps method to a solver must handle none (no subgrid error; shock capturing only if stated). Suite 1032 -> 1048 passed. CI is green on cekees#17 (10 checks: core on Python 3.10, 3.12, 3.13 and 3.14, the three one-extra legs, linux-aarch64, macOS arm64 and Intel). Nothing is tagged or uploaded by this PR; v0.3.1 is the next tag.

🤖 Generated with Claude Code

cekees and others added 4 commits November 18, 2026 09:44
ymf 0.3.0 required `method` in every stabilization block, so proteus's RDLS
block (`stabilization: {shock_capturing: {factor: 0.9, lag: false}}`, which ymf
0.2 read as a free map) no longer loaded and test/dispatch broke on every proteus
PR. A spec can now say:

  stabilization: none                           # no method, no shock capturing (MCorr, PresInc)
  stabilization: {method: none}                 # the same
  stabilization: {shock_capturing: {factor: 0.9}}  # shock capturing, no method

A block with shock_capturing and no method is exactly `method: none` plus that
shock capturing (resolve says so; it is not SUPG and not residual_shock_capturing,
and ymf picks no method). `none` reads only shock_capturing; tau and lagged belong
to a method and a block that states them without one is refused and says so.
Nothing is defaulted: resolve adds no key; under `none` an unstated
shock_capturing means none, and ymf.stabilization.missing("none") is [] while a
stated shock_capturing block still needs beta and reference (a reader that must not
guess still gets them listed).

Tests: tests/test_stabilization.py 29 -> 40 (resolve of none and of the shock-only
block, missing, the refusals, a spec through load/split_problem including an entry's
default). Suite before 1032 passed, 13 skipped; after 1043 passed, 13 skipped
(proteus-pro-261015, Python 3.14, sympy 1.14).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…p an archive

What it lets a spec rely on: a spec written against ymf 0.2 or main before 2026-11-17
keeps loading in every later release. The fixtures are proteus's own
test/dispatch/dambreak.ymf and two_phase_level_set.ymf from cekees/main b9d98f5d,
byte for byte (tests/fixtures/proteus_dispatch_0_2/, README with the git blobs), with
their old spellings (lag, sc_beta, sc_uref) and RDLS's shock-capturing-only block.

tests/test_stabilization_compat.py (5 tests): the spec passes the checks; every block
resolves to what it said (ASGS/SUPG with the aliases folded, RDLS = method none +
shock capturing {0.9, lagged false}, nothing added); missing() still lists what the old
spec leaves unstated (RDLS: beta and reference; VOF: tau and lagged; flow: tau, beta,
reference); an archive round trip keeps the input key and the blocks, and a changed
RDLS factor is another key; the old block and the same in ymf's new words resolve alike.

Suite before 1043 passed, 13 skipped; after 1048 passed, 13 skipped
(proteus-pro-261015, Python 3.14, sympy 1.14).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… missing() reports

docs/problem-specification.md: the word none, the three statements (`stabilization: none`,
`{method: none, shock_capturing}`, the block without method) and what each means, and
what ymf.stabilization.missing(block) returns for SUPG, for a partial shock-capturing
block and for none. docs/changes.md: the 0.3.1 entry (what broke in 0.3.0, what a spec
can now say, the old fixtures, suite 1032 -> 1048). Docs only; no code or tests changed:
suite stays 1048 passed, 13 skipped.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ymf 0.3.1: stabilization none, and shock capturing without a method (C42 round 6)
@cekees
cekees merged commit 6868e7c into proteustoolkit:main Nov 18, 2026
10 checks passed
cekees added a commit to cekees/proteus that referenced this pull request Nov 18, 2026
…ymf 0.3.1

ymf 0.3.1 (proteustoolkit/ymf#32) reads a stabilization block without a
method as method none, so test_stabilization_without_a_method_..._is_refused
failed on #315's linux-64 py3.13 leg (it expected 'method' in the refusal;
the cell now refuses 'none'). #316's d04b966 accepts either refusal;
test/dispatch passes 106 under ymf 0.3.0 and 0.3.1. Merged, not
cherry-picked, so #315 stays in the same main train as #316.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cekees added a commit to cekees/proteus that referenced this pull request Nov 18, 2026
…mf 0.3.1

ymf 0.3.1 (proteustoolkit/ymf#32) reads a stabilization block without a
method as method none, so test_stabilization_without_a_method_..._is_refused
failed on #315's linux-64 py3.13 leg (it expected 'method' in the refusal;
the cell now refuses 'none'). #316's d04b966 accepts either refusal;
test/dispatch passes 106 under ymf 0.3.0 and 0.3.1. Merged, not
cherry-picked, so #317 stays in the same main train as #316.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cekees added a commit to cekees/proteus that referenced this pull request Nov 18, 2026
…r ymf 0.3.1

ymf 0.3.1 (proteustoolkit/ymf#32) reads a stabilization block without a
method as method none, so test_stabilization_without_a_method_..._is_refused
failed on #315's linux-64 py3.13 leg (it expected 'method' in the refusal;
the cell now refuses 'none'). #316's d04b966 accepts either refusal;
test/dispatch passes 106 under ymf 0.3.0 and 0.3.1. Merged, not
cherry-picked, so #318 stays in the same main train as #316.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cekees added a commit to cekees/proteus that referenced this pull request Nov 18, 2026
…der ymf 0.3.1

ymf 0.3.1 (proteustoolkit/ymf#32) reads a stabilization block without a
method as method none, so test_stabilization_without_a_method_..._is_refused
failed on #315's linux-64 py3.13 leg (it expected 'method' in the refusal;
the cell now refuses 'none'). #316's d04b966 accepts either refusal;
test/dispatch passes 106 under ymf 0.3.0 and 0.3.1. Merged, not
cherry-picked, so #319 stays in the same main train as #316.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cekees added a commit to cekees/proteus that referenced this pull request Nov 18, 2026
…ymf 0.3.1

ymf 0.3.1 (proteustoolkit/ymf#32) reads a stabilization block without a
method as method none, so test_stabilization_without_a_method_..._is_refused
failed on #315's linux-64 py3.13 leg (it expected 'method' in the refusal;
the cell now refuses 'none'). #316's d04b966 accepts either refusal;
test/dispatch passes 106 under ymf 0.3.0 and 0.3.1. Merged, not
cherry-picked, so #320 stays in the same main train as #316.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cekees added a commit to cekees/proteus that referenced this pull request Nov 18, 2026
…f 0.3.1

ymf 0.3.1 (proteustoolkit/ymf#32) reads a stabilization block without a
method as method none, so test_stabilization_without_a_method_..._is_refused
failed on #315's linux-64 py3.13 leg (it expected 'method' in the refusal;
the cell now refuses 'none'). #316's d04b966 accepts either refusal;
test/dispatch passes 106 under ymf 0.3.0 and 0.3.1. Merged, not
cherry-picked, so #321 stays in the same main train as #316.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cekees added a commit to cekees/proteus that referenced this pull request Nov 18, 2026
…st holds under ymf 0.3.1

ymf 0.3.1 (proteustoolkit/ymf#32) reads a stabilization block without a
method as method none, so test_stabilization_without_a_method_..._is_refused
failed on #315's linux-64 py3.13 leg (it expected 'method' in the refusal;
the cell now refuses 'none'). #316's d04b966 accepts either refusal;
test/dispatch passes 106 under ymf 0.3.0 and 0.3.1. Merged, not
cherry-picked, so #322 stays in the same main train as #316.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant