Skip to content

Fix defects found porting the proteus-sandbox decks - #322

Merged
cekees merged 15 commits into
devfrom
fix/sandbox-port-bugs
Nov 18, 2026
Merged

cekees merged 15 commits into
devfrom
fix/sandbox-port-bugs

Conversation

@cekees

@cekees cekees commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

These defects turned up when the old proteus-sandbox decks were smoke-run against main (cekees/proteus-sandbox, branch proteus-2.0.x-update; its PROTEUS_HANDOFF.md has the details). Fixing them brings that suite to 220 running cases out of 504 that can be run. The full list of changes is in the commit message; the main ones are:

  • Step retries: restoreSystemStepState now re-applies the step the system controller cut to. Before this, restoring FLCBDF's state also restored its old step, so every retry repeated the step that had failed.
  • Debugger stops: about 30 pdb.set_trace() calls in library code are gone. They stopped every batch run that reached one with bdb.BdbQuit. A nan now makes the solve fail, so the step is retried.
  • Compiled-code fixes:
    • In ctransportCoefficients, 7 wrappers passed an array element where they needed the space dimension.
    • The type of capillaryDiffusionScaling in cTwophaseDarcyCoefficients was wrong.
    • cnumericalFlux used .dim where it needed .ndim.
    • The cfemIntegrals.accumulateExteriorElementPressureIntegrals wrapper had gone missing and is restored.
  • Stokes/NS subgrid error: the kernel is now chosen from how the diffusion tensor is stored. The *_sd kernels read the full tensor layout as diagonal, which gave zero viscosity and a nan residual.
  • Smaller fixes in Transport, NumericalSolution, SplitOperator, Norms, ShockCapturing, the level-set coefficient classes, EdgeMesh, FemTools, KSP_petsc4py and parun (which now gives a clear message for old .sso files).

Testing

  • test/test_sandbox_port_fixes.py: 18 tests pass.
  • I ran the full suite with test/run_like_ci.sh --inplace --workers 4, in three parts because the container restarted once and the disk filled once.
    • Pass on their own: test_step_retry.py (29/29), MeshAdaptPUMI/test_reconstructParallel.py (8/8) and the two-rank test_{simplex,cube,hdiv}_dofmap.py / test_rank_interface_* tests. Each failed under the 4-worker run and passes when run alone. In the dofmap failures, the JSON output from the two ranks got mixed together.
    • Fail on main (b9d98f5) too: dispatch/test_dispatch.py (a strictyaml schema error with ymf@main), mesh_tests/test_gmsh_ymf.py (2), mesh_tests/test_importers.py (2) and mesh_tests/test_subdomain_view_restart.py (1).
    • Not checked: dispatch/test_dispatch_run.py (2) has not been compared with main; that run did not finish in the time it was given.

Generated by Claude Code

Second commit (18d6b38)

The cases that still stopped with a Python error or crashed in compiled code. Two wrappers wrote past their arrays (the exterior Lesaint-Raviart flux looped over every element boundary; the rank-2 L2 projection took a sparse layout's entry count for nd), found with valgrind; TwophaseNavierStokes_ST_LS_SO now raises, naming needEBQ, where it handed the kernel None; plus eleven smaller fixes listed in the commit message (SO_base without dt_system_fixed, ConservationHistoryLS/MC, LevelSetConservation, JLeverett visPerm/debug, readPoly comments, four pdb stops in the NS shock capturing, ...). Nine more tests in test/test_sandbox_port_fixes.py (27 pass).

Tests touching the changed modules (31 files, run_like_ci.sh --workers 4): 514 passed, 4 failed. The four are test_importers.py::test_gmsh_meshes_a_domain_within_its_size and test_gmsh_ymf.py::test_pro_msh_writes_the_ymf_mesh (2 each), which fail on main too. The full suite has not been rerun after this commit.

With both commits, 260 of the 502 runnable sandbox cases run (209 complete, 51 still stepping at 60 s), up from 220.


Generated by Claude Code

cekees and others added 8 commits November 17, 2026 20:29
…ound 5 words)

Org ymf main (5ad375b, round 5) requires `method` in a stabilization block and names its keys `lagged`, `beta`,
`reference`, `tau`. The dispatcher read the raw block, so it silently dropped those words, and the RDLS fixture
(shock capturing without a method) no longer loaded.

- Dispatch._stabilization resolves the sub-problem's block (or the entry's default) with ymf and folds the older
  spellings (`lag`, `sc_beta`, `sc_uref`) as ymf does; `lagged` -> subgridError.lag, shock_capturing
  `factor`/`lagged`/`beta`/`reference` -> shockCapturingFactor, shockCapturing.lag, sc_beta, sc_uref; `tau`
  metric/element_size -> useMetrics 1/0; an explicit `shock_capturing: none` -> factor 0. A block ymf refuses is a
  DispatchError naming the sub-problem.
- dambreak.ymf states ymf's words (as dambreak_formulation.ymf does); RDLS says `method: SUPG`.

Measured (macOS arm64, ymf 5ad375b): test/dispatch on b9d98f5: 4+ errors at fixture load, after: 85 passed (83 +
2 new: ymf words and the older spellings dispatch to the same cells and reach the numerics; a block without a method is
refused); the bitwise runs of test_dispatch_run.py (all cases, serial and 2 ranks) unchanged. test_pro_cli,
test_adr_problem, test_domain_ymf: 178 passed, 19 skipped, 1 failed (test_iproteus_is_a_shim_over_runtime,
environment: not touched).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… not made

Both realizers refused a file domain ("builds a box domain"). A file domain with bounds now realizes as the decks
realize a stored mesh (genMesh = False, polyfile = the prefix of <prefix>.node/.ele):

- tank_sides: a region named by the mesh's tags (`tags: [bottom, right, left]` -> `flags`) claims the sides whose
  Tank2D flag (y- 1, x+ 2, y+ 3, x- 4) it lists; position regions work as before.
- _tank / shallow_water: read the file, refuse a missing one, a format other than tetgen, a non-box realization
  (levels > 1, h, cells); the run record says `mesh: stored <prefix>`.
- stored_element_size: a mesh that is already made has no h (ymf refuses one); its element size, which TwoPhaseFlow
  reads for tolerances (nl_atol_res = c he^2) and for the regularization width, is the mesh's longest edge (what
  Proteus's mesh.h is).
- shallow_water_boundary: tags must cover every boundary tag of the mesh (one treatment on the whole boundary).

Measured, each against the app it replaces, on 1 and 2 ranks (partition pinned), every dataset of the archive
bitwise equal (field moves > 0.1):
- damBreakLevelSet.py genMesh=False he=<longest edge of meshDambreak / 3.22> (the stored 109-node mesh of
  test/TwoPhaseFlow) vs dambreak_short_stored.ymf: 0 of the deck's datasets differ, 1 and 2 ranks. Before: refused.
- dam3Bumps.py (final_time 0.5, he 2) vs dam3bumps_stored.ymf reading the deck's own dam3bumps.node/.ele: 0 differ,
  1 and 2 ranks. Before: refused.
test/dispatch: 92 passed (85 + 4 deck comparisons + 3 data-only tests: sides from tags, genMesh off and polyfile,
refusals). ymf finding for the handoff: split_problem on a file domain without bounds raises KeyError: 0 (the domain
dict is parsed as notation); bounds are required here.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ymf round 5 states the dispersive model by hyperbolic relaxation (`dispersion: {closure, closes, auxiliaries}`);
Dispatch already mapped it to GN_SW2DCV but nothing realized the family. Now:

- DispatchTable: SHALLOW_WATER_MODELS has GN_SW2DCV (sw_model 1, GN_sw_p/GN_sw_n); REALIZERS maps
  dispersive_shallow_water to the shallow-water realizer; SHALLOW_WATER_AUXILIARIES names the three auxiliaries by
  role (relaxed_depth -> h_times_eta, relaxed_divergence -> h_times_w, relaxed_bed_flux -> h_times_beta).
- DispatchRun.shallow_water: the auxiliaries' initial values come from the spec's `dispersion.auxiliaries[].initial`
  (the roles' defaults h^2, 0, 0, an expression of the depth's initial value, evaluated by sympy at each point);
  boundary data are the whole-boundary wall or open treatment the walls already had (no Dirichlet data: the decks'
  reflecting case). Refused: an auxiliary initial that reads anything but the depth, x, y, t.
- test/dispatch gets ymf's dispersive fixtures (dispersive, dispersive_numerics, circular_dam_dispersive; `linear_solver:
  petsc` dropped as in proteus_numerics: the n module's solve is not the spec's to choose) and a two-second variant.

Measured, circular_damBreak.py -C "sw_model=1 final_time=2.0 dt_output=0.4" (structured, 50 x 50 nodes) against
circular_dam_dispersive_short.ymf (mesh.cells 49): every dataset of the archive bitwise equal (field moves > 0.1), on
1 and 2 ranks (partition pinned). Before: refused ("nothing realizes family dispersive_shallow_water yet").
test/dispatch: 95 passed (92 + the two ranks + 1 test of the auxiliary's initial value: h^2, 0, h x, and a symbol it
may not read refused).
Not covered: santos_step.py (waits on `atan` in ymf's notation) and conical_island.py (a state imposed on part of the
boundary).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…: 40})

ymf round 5 states cells per axis (`mesh: {cells: {x: 80, y: 40}}`, `ymf.discretizations.cells_per_axis`). The
SWFlow realizer read `int(cells)` and tied nny to nnx, so only square-cell-count boxes compared; ymfrun crashed on
a map.

- DispatchRun.shallow_water: nnx, nny = cells_x + 1, cells_y + 1 (he = L_x / (nnx - 1), as the decks).
- ymfrun: `one_count` (the ADR box takes one count for every axis; a map of unequal counts is refused by name, equal
  ones are that count) and `cells_along_x` (a row of the convergence table).
- test/dispatch: dam3bumps_structured.ymf (the deck's refinement 4: 81 x 41 nodes) via dam3bumps_nomesh.ymf.

Measured: dam3Bumps.py -C "structured=True final_time=0.5 dt_output=0.1 dam_x_location=16.05" (nnx 81, nny 41, 3321
nodes) against dam3bumps_structured.ymf (cells {x: 80, y: 40}): every dataset of the archive bitwise equal, 1 and 2
ranks (partition pinned). Before: int() of a map raised TypeError. circular_dam_structured and the other dispatch
runs unchanged. test/dispatch + test_pro_cli + test_adr_problem + test_domain_ymf: 276 passed, 19 skipped, 1 failed
(test_iproteus_is_a_shim_over_runtime: environment, fails on b9d98f5 too).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The two-phase realizer built Tank2D only ("builds 2-D boxes so far"). A 3-D box now realizes as the decks build it:

- _box accepts 3-D (a stored mesh stays 2-D: Tank2D's flags); tank_sides finds each of the six faces' region from
  quarter-point samples of the face (Tank3D flags z- 1, x- 2, y+ 3, x+ 4, y- 5, z+ 6 for mesh tags), one BC_RANS setter
  per face as in 2-D.
- _tank: PiecewiseLinearComplexDomain + Tank3D, TetGen's options from ADRProblem.mesh_constraint (the deck's
  "VApq1.35q12feena%e", volume h^3/6), PLC written on rank 0 like the deck.
- test/dispatch/dambreak3d_short.ymf: damBreakLevelSet3D.py as a spec (corner column, gravity -z, top atmosphere, five
  free-slip faces, iterative solves); phi0 written as the deck computes it.

Measured against damBreakLevelSet3D.py -C "final_time=0.03 dt_output=0.01 he=0.4" (278 nodes, 996 tetrahedra; five
models RANS2P, VOF, NCLS, RDLS, MCorr): every dataset of the archive bitwise equal, 1 and 2 ranks (partition pinned),
field moves > 0.1. Before: refused ("2-D boxes so far"). Two data-only tests: a face's setter and region; a face in no
region refused by side.
test/dispatch: 100 passed (95 + 2 deck runs + 2 data-only + the cells test).
Not covered: 3-D shallow water (SWFlow is 2-D), 3-D stored meshes, a finer 3-D mesh than he = 0.4 (only run this size).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ges:`

ymf has `model.gauges` (C22); the realizers dropped it. Now each gauge is built as a deck builds its own
(Gauges.PointGauges, LineGauges, LineIntegralGauges: fields, points padded to three coordinates, `sample_rate`,
`file`) and attached to the model that solves its fields: `Parameters.auxiliaryVariables` before initializeAll for
two-phase, the n module's `auxiliaryVariables` for SWFlow. A field is an unknown (a vector samples every component)
or a component; fields are bound to the model's variables by position when the model is attached (CLSVOF's
coefficients are named `clsvof`, its level model `phi`, which is what Gauges reads). The run record lists the files.
Refused by name: the boundary_integral kind (forces and moments are the flow kernels' sums: needs the gauge reading
them, C22/C0), a field no sub-problem solves, one gauge across two sub-problems (one file, one model).

Measured against damBreak.py (final_time 0.03, he 0.08; CLSVOF + RANS3PF + the projection models), which attaches
LineGauges on phi (height1.csv: 4 lines, height2.csv: 2 lines) to CLSVOF and PointGauges on p (pressure.csv: 3
points) to Pres, vs dambreak_short_projection_gauges.ymf: the three csv files are equal as text, and every dataset of
the archive bitwise equal, on 1 and 2 ranks (partition pinned). Before: the gauges were dropped silently (no file).
SWFlow: a point gauge on h (circular_dam_gauges.ymf) writes its file, the dam's depth 1.8 m at its centre at t = 0 and
a row per step; no SWFlow deck has gauges to compare with, so this is a smoke test, not an equality.
test/dispatch: 105 passed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Retiring the SWE app was in the plan, but the decks are the oracle the spec runs are compared with (bitwise, 1 and 2
ranks, in test/dispatch), and the other SWFlow decks need ymf words the spec does not have yet (a state on part of the
boundary, wave generation, atan, hot start). So nothing is removed: the README says what a spec equals today
(circular_damBreak sw_model 0 and 1; dam3Bumps structured with cells per axis, unstructured, stored, open) and that the
rest keep running as decks. The TwoPhaseFlow app and SimTools are untouched on the coordinator's word (awvv-upgrade
edits TwoPhaseFlowProblem.py; SimTools is NumericalSolution's output processing, which dispatch does not replace).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Found by smoke-running the old proteus-sandbox decks (cekees/proteus-sandbox,
branch proteus-2.0.x-update; its PROTEUS_HANDOFF.md has the details).

Time stepping and retries
- NumericalSolution.restoreSystemStepState: re-apply the step the system
  controller cut to after restoring the time integrators' state. FLCBDF's
  state carries its step, so every retry repeated the step that had failed.
- SO_base: default maxFailures, so Sequential_MinFLCBDFModelStep and the
  adaptive controllers do not fail with AttributeError when no model uses
  their kind of step controller.
- NumericalSolution: the levels of a model are those of its mesh hierarchy
  (with useOneMesh, the first model's), not its own n.nLevels; nDTout=None
  gives one output interval instead of a TypeError.
- OuterTheta.updateTimeHistory: self.self.

Debugger stops
- Remove the pdb.set_trace() calls that library code made on a nan or an
  unexpected state (FLCBDF, SubsurfaceTransportCoefficients,
  TransportCoefficients, richards, m_comp_co2, StepControl, TimeIntegration):
  every batch run that reached one ended with bdb.BdbQuit. A nan now fails
  the solve and the step is retried; an invalid state raises with a message.
  Stops behind `if self.debug` / plot options are kept.

Coefficients, stabilization, kernels
- StokesASGS_velocity, StokesStabilization_1, NavierStokesASGS_velocity_pressure:
  pick the kernel by the layout of the diffusion tensor; Stokes and
  NavierStokes get Transport's full layout, which the *_sd kernels read with
  a diagonal stride (zero viscosity, nan residual).
- Transport: the stabilized coefficients (X_sge) a strong residual reads
  are aliased to X when no subgrid error object set them up (shock
  capturing alone, Advection_ASGS on a model with diffusion).
- Transport: element boundary weighted test functions for diffusion use
  the same (ck,ci) key as the interior ones; cross-diffusion failed.
- ctransportCoefficients: seven wrappers passed dH[dH.ndim-1] (an element)
  for the space dimension dH.shape[dH.ndim-1] (the generic level set,
  redistancing, eikonal and HJ Burgers coefficients).
- cTwophaseDarcyCoefficients: capillaryDiffusionScaling is a double.
- SubsurfaceTransportCoefficients.TwophaseDarcy_incompressible_split_saturation:
  pass the density laws and psiw the kernel takes.
- ConservativeHeadRichardsMualemVanGenuchtenBlockHetV2withUpwind: pass
  nQuadraturePoints_elementBoundary.
- cfemIntegrals: restore the accumulateExteriorElementPressureIntegrals
  wrapper (AuxiliaryVariables calls it; lost in the move to Cython).
- Norms.scalarHeavisideDomainIntegral: its kernel takes the counts first.
- HamiltonJacobi_SC and the other HJ shock capturing: pass the flag as a C
  char code, as SubgridError does.
- ThreephaseNavierStokes_ST_LS_SO: inverted defaultFluidProfile test.
- LevelSetNormalCoefficients: eps*I through the sparse layout (IndexError),
  and the exterior boundary wrote to an undefined cebq.
- LevelSetCurvatureCoefficients, LevelSetConservation: without nd, take the
  dimension from Transport (initializeSparseDiffusion hook).
- RedistanceLevelSetSandF: do not pass keywords RedistanceLevelSet dropped.
- EdgeMesh.meshType (1D post-processing).
- cnumericalFlux: f.dim/v.dim for f.ndim/v.ndim (AttributeError).
- NavierStokesASGS_velocity_pressure_opt.calculateSubgridError wrote to an
  undefined cq (NameError); it is q there.
- LevelSetCurvatureCoefficients.evaluate: raise when the level set model has
  no element boundary gradients, instead of passing None to the kernel
  (SIGSEGV).
- LevelSetConservation: log the mass conservation figures only when the
  other models' coefficients keep m_pre.
- AuxiliaryVariables.ConservationHistoryLS/MC.attachModel return self.
- FemTools: the old-signature flux BC fallback called a None advective getter.

Solvers and driver
- KSP_petsc4py: Jacobi/GaussSeidel/LU/StarILU/StarBILU as preconditioner
  could never run (undefined L, rtol_r, connectionList; no PC python
  interface); raise a ValueError naming the alternatives.
- multilevelLinearSolverChooser: say "use KSP_petsc4py" when given the
  petsc4py module, as old decks' `PETSc` now is.
- parun: reject a non-.py single argument (old .sso files) with a message.

Tests: test/test_sandbox_port_fixes.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsNEVP5iqW8j2B7hKt9ibb
@cekees
cekees changed the base branch from main to dev November 18, 2026 03:50
The second round from smoke-running the proteus-sandbox decks: the cases that
still stopped with a Python error or crashed in compiled code.

Native crashes
- cnumericalFlux.calculateExteriorLesaintRaviartNumericalFlux: loop over the
  exterior element boundaries, not every element boundary. The kernel wrote
  past the flux arrays in every Hamilton-Jacobi DG run with an exterior
  boundary (heap corruption, found with valgrind).
- ctransportCoefficients.L2projectEvaluate, rank 2: average a sparse-layout
  tensor ([element, point, entries]) entry by entry; l2project2Tensor read it
  as [element, point, nd, nd] with the entry count for nd (heap corruption).
- TwophaseNavierStokes_ST_LS_SO.evaluate: raise, asking for needEBQ, when it is
  evaluated on element boundaries where the level set model keeps no values;
  the kernel was handed None (SIGSEGV).

Python errors
- TwophaseNavierStokes_LS_SO.evaluate: the kernels are module functions, not
  methods.
- SplitOperator.SO_base (Sequential_FixedStep, Sequential_NonUniformFixedStep):
  without dt_system_fixed, one system step per output interval, as before
  the fixed step became an so option (None + float).
- AuxiliaryVariables.ConservationHistoryLS/MC: write the entries the mass
  history gained since the last call; the coefficients start the history in
  attachModels, after calculate_init.
- LevelSetConservation: log m_last only when the coefficients keep it, as for
  m_pre; count no VOF boundary flux when the VOF coefficients compute none
  (CLevelSetCoefficients).
- ConservativeHeadRichardsJLeverett/JLeverettAni: visPerm for the sparse
  layouts; debug defaults to False (it made a debugger stop on a nan input
  unconditional).
- ConservativeHeadRichardsMualemVanGenuchtenBlockHetV2withUpwind: name needEBQ
  when upwinding without element boundary quadrature.
- VolumeAveragedNavierStokesFullDevStress: the element boundary porosity takes
  its shape from ebq_global['x'] (ebq_global holds no ('u',0) now).
- Domain.readPoly (2d and 3d): a '#' anywhere on a line starts a comment, as in
  triangle and tetgen.
- ShockCapturing.NavierStokes_SC/_opt: remove four unguarded pdb stops on a
  nan residual (the self.debug ones stay).

Tests: nine more in test/test_sandbox_port_fixes.py; its parun test runs the
repository's scripts/parun.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsNEVP5iqW8j2B7hKt9ibb

cekees commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

The CI failures on 569aa58 (linux-64 py3.13, linux-aarch64 py3.12, macos-15 py3.12, and coverage after them) are all in test/dispatch: 38 errors and 8 failures in test_dispatch.py, all strictyaml.exceptions.YAMLValidationError: while parsing a mapping when the dambreak spec is composed, and the 2 test_dispatch_run.py::test_the_spec_runs_the_deck_bitwise[damBreakLevelSet-*] cases. Every other test passed (4539 on linux-64).

They are not from this PR: the workflow installs ymf from proteustoolkit/ymf@main, which was pushed at 2026-11-17 19:25 UTC, after the last green dev run (16:57 UTC). With the current ymf@main, dev itself (7610f8d0) fails the same way locally, e.g. test_dispatch.py::test_a_sharp_heaviside_is_refused with the same YAMLValidationError. The fix belongs in ymf (or in pinning it), not here. The test_dispatch_run pair was not checked against dev separately.

🤖 Generated with Claude Code


Generated by Claude Code

… fixtures fail ymf 0.3.0

The CI failures on #322 (38 errors + 8 failures in test_dispatch.py, 2 in
test_dispatch_run.py, coverage after them) are main's dispatch fixtures
against ymf 0.3.0 (proteustoolkit/ymf#31, on ymf main 2026-11-17): a
stabilization block now needs a method, so RDLS's shock-capturing-only block
no longer loads. #316 (f9c3d4d) updates the fixtures and is green on all 12
legs with ymf 0.3.0. Merged, not cherry-picked, so the commits keep their
hashes and drop out once #316 lands on main; this lets #322 ride the same
main train (cekees, 2026-11-18).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cekees

cekees commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

Coordinator: merged c5-s4p3 (#316, f9c3d4d) into this branch as 1352848, so #322 can ride the 2026-11-18 main train with #316. Run git pull --no-rebase before pushing again here.

On the dispatch failures: they are main's test/dispatch fixtures against ymf 0.3.0 (proteustoolkit/ymf#31), as the comment above says. The specific break is that ymf 0.3.0 requires method in any stabilization: block. RDLS's block in two_phase_level_set.ymf / dambreak.ymf states only shock_capturing, so it no longer loads. ymf 0.3.0 does still accept proteus's lag, sc_beta and sc_uref as aliases. #316 updates the fixtures (and writes method: SUPG for RDLS) and is green on all 12 legs with ymf 0.3.0, so the fix for proteus is #316, not a pin.

What remains a ymf question: a shock-capturing-only block (or an explicit method: none, listed as a later item in ymf round 5's handoff) cannot be stated without naming a method. That's a backward-incompatible change for any spec written against ymf 0.2/main before 11-17.

A dry run of the main train with all 15 main-bound PRs (#303 #306 #308 #309 #310 #312 #313 #315 #316 #317 #318 #319 #320 #321 #322) on main b9d98f5 merges cleanly: 137 files, +10016 -1391.

Two more found reconstructing the sandbox's missing Stokes/level-set decks.

- evaluate passed c[('m',ci)] to the kernels unconditionally; steady=True
  leaves the mass terms out (KeyError). Scratch arrays are passed then.
- When the level set model has no values at the flow model's points (another
  quadrature, mass lumping, which adds nodal points, or no element boundary
  values), the kernel was handed None or a shorter array (SIGSEGV). It now
  raises, naming the causes.

Tests: two more in test/test_sandbox_port_fixes.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsNEVP5iqW8j2B7hKt9ibb

cekees commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

CI on 4abd902 (linux-64 py3.12): 4620 passed, 1 failed. The failure is test/dispatch/test_dispatch.py::test_stabilization_without_a_method_or_with_a_key_the_method_does_not_read_is_refused, the test that came with #316 (merged here as 1352848). The other dispatch failures are gone.

It is not from this PR's commits (none touch the dispatch code). The workflow installs ymf from proteustoolkit/ymf@main, which this run resolved to 6868e7ce. That merge (09:29 UTC today) brings ymf 0.3.1 ("Stabilization: method none, and a block that states only shock_capturing", 085ea38): a stabilization: block without method now loads as method: none, where 0.3.0 refused it. The test asserts the refusal (DispatchError matching "method"), so it fails. With the earlier ymf@main (5ad375b8, 0.3.0) it passes on this branch and on #316's head (f9c3d4d5), run locally.

So #316's test needs to follow ymf 0.3.1. That belongs with #316 (or the train), not with this PR, so I have left it alone.

🤖 Generated with Claude Code


Generated by Claude Code

claude and others added 4 commits November 18, 2026 10:17
From unblocking the sandbox's moving-cylinder deck (threep_cylinder_md_2d_so).

- environment-openmpi-dev.yml: libode/pyode 0.16.6 (conda-forge), the Open
  Dynamics Engine and its Python bindings (`import ode`), for decks whose
  rigid-body motion predates pychrono.
- cfemIntegrals: restore three wrappers lost in the move to Cython, whose
  callers in FemTools, Transport and TransportCoefficients remained:
  parametricMaps_getJacobianValuesTrace_movingDomain (the 2d moving-domain
  kernel was still in femIntegrals.c, undeclared; 1d/3d use the fixed-domain
  ones, as before), copyLeftElementBoundaryInfo_movingDomain (likewise) and
  update_df_movingDomain (the update_f kernels with dm, as before).

Other cfemIntegrals names Python still calls with no wrapper (not on a path
the sandbox reaches): setInflowFlux, updateExteriorElementBoundaryStressFlux,
calculateVelocityVolumeAverage2D/3D, calculateVelocityQuadrature_MixedForm2
(and _Jacobian), writeDOF, writeDOF_ZEROS.

Tests: two more in test/test_sandbox_port_fixes.py (31).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsNEVP5iqW8j2B7hKt9ibb
The Open Dynamics Engine and its bindings (`import ode`) for the rigid-body
decks; libode has no MPI dependency, so the same 0.16.6 pins apply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsNEVP5iqW8j2B7hKt9ibb
… and 0.3.1

ymf 0.3.1 reads a `stabilization:` block without `method` as `method: none`, so Dispatch no longer gets ymf's "say the
method" error: the VOF cell offers SUPG only, and the refusal is "no Proteus module covers vof (... stabilization none)
... the cell has SUPG". The test now accepts either refusal for a block without a method (0.3.0: method; 0.3.1: the cell
has SUPG) and keeps the other half, a key the method does not read (`{method: SUPG, no_such_key}`), which both refuse the
same way. No other dispatch test depended on the 0.3.0 wording.

Measured, test/dispatch, macOS arm64: ymf 0.3.0 (5ad375b): 106 passed; ymf 0.3.1 (org main 6868e7c): 106 passed. Before
the change, ymf 0.3.1: 105 passed, 1 failed (this test).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…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>
@cekees

cekees commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

Coordinator: merged #316's fix (d04b966: the dispatch test now holds under ymf 0.3.1) into this branch as 2f94a76. Please git pull --no-rebase before pushing again here.

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.

2 participants