Skip to content

main train 2026-11-13: C17/C14 round 6, C44 phases 1b and 2 (P1), RELEASE.md, drop the macOS Intel legs - #1361

Merged
cekees merged 24 commits into
proteustoolkit:mainfrom
cekees:train/main-2026-11-13
Nov 14, 2026
Merged

cekees merged 24 commits into
proteustoolkit:mainfrom
cekees:train/main-2026-11-13

Conversation

@cekees

@cekees cekees commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Each change below was reviewed, and passed CI, as its own pull request on cekees/proteus. This branch merges them onto main at c9cc8f6 with one merge commit per pull request, in the order listed.

Merge with "Create a merge commit", not squash or rebase, so the commits keep their hashes and the fork's pull requests close themselves.

pull request title commits
cekees#276 C17/C14 round 6: wall-limit marker file, measured state-cost estimate, PBS end from stime 4
cekees#277 C44 phase 2 (P1): two-sided IFEM basis on tetrahedra, immersed boundary in 3D 4
cekees#282 RELEASE.md: describe the current release procedure (main) 1
cekees#278 C44 phase 1b: curved cuts by a P2 level set (cutquadric.h) and the P2 embedded solid in 3D ADR (planar and curved) 9
cekees#283 CI: drop the macOS Intel legs (main) 1

#278 is stacked on #277 (it merges #277's commits in), so its row counts only its own commits. #283 is based on the fork's main because the fork's dev already contains it, so it was merged onto the train branch by hand, with a merge commit of the same form. The 1.9.x line gets the same Intel change and RELEASE.md in #1360.

Diff against main: 20 files changed, 4689 insertions(+), 248 deletions(-).

🤖 Generated with Claude Code

cekees and others added 24 commits November 13, 2026 13:04
…e used walltime

`qstat -f`'s resources_used.walltime is refreshed only every so often: on Carpenter it read 00:00:05 at 14-22 s
into the job, so Resource_List.walltime - resources_used.walltime put the deadline 12-17 s after the real end
(part B of the 1,536-rank test: 230 s "left" of a 240 s job started 8.4 s earlier, i.e. ~252 s).
pbs_deadline now uses the job's start (stime, PBS Pro; start_time, Torque) + Resource_List.walltime, both from the
same qstat -f. An unreadable or implausible start (future, over a year old) falls back to the old difference.

Measured: test/test_wall_limit.py, mocked qstat output with stime and 5 s "used" at 19 s into the job: the new
deadline is start + 24 h exactly, the old rule 14.0 s later (asserted); padded and plain day numbers, the Torque
field and four bad start values covered. 27 passed. No scheduler needed; a live PBS check is the Carpenter re-test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ript to test

Under aprun (Cray PALS) the exit status of a stopped run is 143, not 75: the ranks exit 75 at slightly different
times, PALS takes the first non-zero exit as a failure and SIGTERMs the rest (part A: 102 ranks exited 75, the rest
"died from signal 15", rank 0 among them; part B 61 and 1,475). A script cannot chain on $? == 75 there.

The stop now also writes `<so.name>.checkpoint` in the working directory (t, frame, ranks, exit_status, written),
by rank 0 after every rank has closed its archive, written whole and renamed into place, with a barrier after the
write so that no rank exits (and the launcher kills nothing) before the file exists. Exit 75 is unchanged where the
launcher passes it through. A run under --wall-limit removes a leftover marker when it starts, so a finished leg
leaves none; a run with no limit neither writes nor touches one; a run with no archive writes none.

Measured (local, damBreakLevelSet deck, 1 and 2 ranks, WALLSTEPS=3): exit 75, one marker with ranks=1/2,
exit_status=75, frame = the last archived frame, t > 0, no temporary file left; the next leg (-H, --wall-limit 99:00:00)
exits 0 and leaves no marker; a finished run with the limit leaves none. test/test_timed_checkpoint.py -k "wall_limit
or marker": 7 passed; test/test_wall_limit.py: 28 passed. The real PALS exit status is not testable here.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… write uses median frames and the hot start's read

Until a solver-state write has been timed (the default writes it at the stop only) the state's cost was the
model's longest frame time x state bytes / dof bytes. On Carpenter at 1,536 ranks that gave 97.2 s (part A) and
395.4 s (part B) against ~5 s measured (18-77x): one 1.57 s frame among 0.10-0.12 s ones set it, and part A stopped
after 3 steps with 53 s left. The estimate is now, in order:
 1. a state write timed in this run (as before);
 2. in a continued leg (`-H`), twice the time the hot start took to read that model's state (the same bytes, the
    same files, measured, not estimated);
 3. in the first leg of a chain, the median frame time (the lower of two) x state/dof bytes, so that one stalled
    frame does not set it.
The frame term of the checkpoint cost is still the longest frame. The log line prints the cost to 3 significant
figures (it read 0.0 s for ms-scale writes).

Measured (local, damBreakLevelSet, 1 rank, WALLSTEPS clock, WALLCOST=measured): continued leg: estimated
checkpoint 9.1 ms against 6.9 ms written (frames 3.2 ms + states 3.7 ms: 1.3x); first leg: 0.136 s against 7.8 ms
written, dominated by the first frame's cold write (the longest-frame term; at scale a frame is 0.1-0.4 s and the
state ~5 s, so the median-based figure is then the larger term). Unit tests with the Torino shape (frames 0.11 s
x 4 and one 1.57 s stall, state/dof 20): 5.9 s with the old rule's 33 s for the state alone. The 1,536-rank value
is not measured here; the Carpenter re-test should compare the `Wall limit:` cost with the written ~5 s.
test/test_wall_limit.py 32 passed, test/test_timed_checkpoint.py 16 passed (1 and 2 ranks).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…stimate; PBS/aprun chaining example

docs/source/tools/checkpoints.rst: <name>.checkpoint (fields, who writes it, when it is removed), why $? can be 143
under aprun/PALS and how srun differs, the PBS end time (stime + walltime), the new state-cost estimate, the status
table row, and a PBS example that chains on the marker (afterany). parun --help names the marker.
Doc and help text only; nothing measured here (the live PALS exit status and PBS stime are the Carpenter re-test).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… tetrahedra, closed form (C44 phase 2)

Simplex<3, 4, ..., useIfemBasis> asserted nSpace == 2 and computed 2D coefficients; ADR never reached it
(3D immersed boundaries refused). Now the P1 tetrahedron basis is the closed form of the C44 plan, 2.1:
v^a = lambda_i - c_i psi^+, v^b = lambda_i + c_i psi^-, c_i = (ma - mb) grad(lambda_i).grad(phi) / D,
D = mb grad(psi^-).grad(phi) + ma grad(psi^+).grad(phi); the unit flux-jump lift is l^a = -cJ psi^+,
l^b = cJ psi^-, cJ = |grad phi| / D. Same formula for the 1-3, 3-1 and 2-2 splits and for cuts through a
vertex or an edge. D ~ 0 (an obtuse dihedral angle at a particular contrast) throws
equivalent_polynomials::ifem_singular_error with s and the critical contrast (decision C4); no fallback.
Basis gradients and the lift gain a z component (the lift storage is now 4 doubles per side, also in 2D).
2D results are unchanged (test/IFEM, test_equivalent_polynomials: 81 passed).

New oracle hook proteus.cutclip.ifem_basis_{2,3}d evaluates the real Simplex at reference points.
test/ADR3D/test_ifem_p1_3d.py (9 tests): kernel = independent pointwise 8x8 solve = closed form to 1e-9
relative on 300 random tets (all three splits, random node orders and orientations, contrasts 1e-3..1e3)
and 200 random triangles (the existing 2D construction), partition of unity / continuity on the cut / zero
flux jump <= 1e-8, the 32 coefficients of IFEM_3D.ipynb cell 5 to 1e-13, lift = pointwise solve with
jf = 1, vertex/edge cuts, the obtuse-tet guard (throws at ma/mb = 1 - 1/s, silent at 1.5x and on non-obtuse
tets to contrast 1e6), |v_i| <= 1 on slivers (contrast 1e+-6, cut 1e-8).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…mp lift), 3D (C44 phase 2)

ADR.h/ADR.py take immersedBoundary alone in 3D for P1: the kernels read the z gradients of the two-sided
basis and of the flux-jump lift, the lift's solution-jump correction (j_h flux jump) has a 3D normal, the
per-element flux-jump amplitude in ADR.py uses the area centroid of the triangle/quadrilateral cut, and a
singular basis is reported with the local element number and centroid. Still refused in 3D: P2 immersed,
SCIFEM, PG, embedded + immersed (message names the feature and the phase).

Measured (conda-dev-mpich, structured tets nnx = 3, 5, 9, 17; plane n.x = 0.45 not aligned with the mesh,
mua = 1, mub = 10, u and mu du/dn continuous): L2 3.50e-2, 8.62e-3, 2.56e-3, (8.78e-4): rates 2.02, 1.76, 1.54.
The P1 IFE space is nonconforming across faces of cut elements and there are no 3D SCIFEM face terms yet,
so the rate degrades; mub = 1000 does not converge (3.4e-2, 8.5e-3, 1.2e-2, 1.4e-2). The 2D code behaves
the same without SCIFEM (test/IFEM test=13.0, generic-slope plane: 5.8e-4, 3.4e-4, 1.2e-4). The plan's
patch-test claim (a solution in the IFE space is reproduced exactly across any plane) does not hold without
face terms; it does with mua = mub (1.5e-14). Sphere r = 0.3, mub = 10: 1.63e-2, 6.89e-3, 2.41e-3, 6.13e-4
(rate 1.98 on the finest pair). Prescribed flux jump 2.0 (Dirac load + unit lift): 8.58e-3 against 8.62e-3 on
nnx = 5; constant solution jump 0.7: identical to 1e-14. Two ranks equal serial (rtol 1e-8), flux jump on.
Tests: 73 in test/ADR3D, 81 in test/IFEM + test_equivalent_polynomials + ADR_SGS (local mac, CI is the oracle).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…4 phase 1b, A1)

New proteus/cutquadric.h (C44-owned; cutclip.h stays the planar oracle and is not edited), its test binding
proteus/cutquadric.cpp (one setup.py entry) and test/ADR3D/test_cutquadric.py.

* p2ToMonomial: ten proteus P2 nodal values -> monomial coefficients in cutclip's monomial order, in closed form in
  proteus's mid-edge order (0,1)(1,2)(2,3)(0,2)(1,3)(0,3); the July order is not carried over.
* classify: Bernstein sign test (sufficient), exact range test (4 vertices, edge/face/interior critical points), label
  uncut_positive / uncut_negative / simple / edge_cut_twice / sub_nodal and the count of edges cut twice.

Measured (conda-dev-mpich, macOS arm64, 15 tests pass in 0.9 s):
* U0: nodal -> monomial -> value agrees with FemTools.QuadraticOnSimplexWithNodalBasis(3) and RefUtils.p2refNodes at
  random points to 1e-13; 1000 random quadratics sampled at the nodes are recovered to 4.4e-15.
* U1: incentre ball r = 0.15 has all ten nodal values negative, Bernstein range -0.69 .. +0.31, label sub_nodal;
  a ball poking through a face is sub_nodal too; (x - 1/2)^2 - 0.01 has three edges cut twice with all vertices
  positive; (x - 1/2)^2 + 0.001 is uncut positive although its Bernstein minimum is negative (the sign test is only
  sufficient). Exact range against a 25^3 sampling of 320 random quadrics: encloses every sample, within 0.1 of the
  sample extremes; Bernstein bounds enclose the range.
* All five labels occur among 4000 random quadrics (edge_cut_twice 2258, simple 421, sub_nodal 5, uncut 1316).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… 1b, A2)

volumeMoments(u, degree, Options): every monomial moment (cutclip order, degree <= 7) of the part of the reference tet
where a P2 level set is positive, from one sweep. Ported from the July cutquad.cpp tet_quad_u: critical values of the
level set split the outer (z, y) range, Gauss-Legendre with the cubic smoothstep map on each segment, the inner x
integrated exactly; the interval list is built once per outer point and all antiderivatives are accumulated (35
monomials at degree 4 for the cost of one geometry pass).

Two fixes carried by the port:
* leading-coefficient deflation (deflate_tol 1e-10 of the largest) before every root solve;
* planar fast path: a quadratic part below planar_tol (1e-12) of the largest coefficient goes to cutclip (exact).
Whether cutquad.cpp itself has the planar 2-2 defect of the July Python (1e-5..1e-7) was untested: it does not. Its
real_roots already drops coefficients below 1e-13 and quad_roots treats |a| <= 1e-12 scale as linear; forced slicing
here with deflate_tol = 0 gives the same numbers as with 1e-10 (the deflation only matters between 1e-13 and 1e-10).

Measured (conda-dev-mpich, macOS arm64; 44 tests pass in 0.9 s):
* Parity with July cutquad.cpp rebuilt locally 2026-11-13: equal to 1e-15 at equal order on 7 quadrics x 6 monomials
  (golden values pinned at order 64, tolerance 1e-13). Some random quadrics converge slowly in order (an edge_cut_twice
  case: 5e-9 at order 16, 5e-12 at 32, ~1e-13 at 64): the method's endpoint behaviour, identical in July.
* U2 closed forms, all monomials to degree 4: octant of a ball r = 0.4: 1.7e-7, 9.1e-10, 2.6e-15, 1.4e-17 at orders 6,
  8, 12, 16; ball r = 0.15 at the incentre (label sub_nodal): 4.9e-10 at 8, 6.2e-17 at 16; complement likewise.
* U3 linear u embedded as P2 against cutclip, 60 random planes (all of 1-3, 2-2, 3-1), degree 4: fast path equal;
  forced slicing 8.6e-16 at order 24. The planar 2-2 case (phi = .31 -.62 .45 -.27) is 3.9e-9 at order 8, 4e-17 at 16,
  1.4e-16 at 24.
* U4 u = plane + kappa q, kappa 1e-1 .. 0: default (order 16) against order-40 slicing <= 6e-16 at every kappa, so the
  fast-path threshold costs nothing; distance from the planar answer 2.3e-3, 2.2e-8, 2.2e-13, 2.2e-14, 8.7e-18 at
  kappa 1e-1, 1e-6, 1e-11, 1e-12, 1e-13 (= 2.2 kappa).
* U5 generic cut (sphere R = 2.5), degree 4, against order 48: 8.7e-5, 9.1e-7, 5.1e-9, 1.1e-12, 5.3e-16, 3.1e-17 at
  orders 4, 6, 8, 12, 16, 24 (monotone, no stagnation).
* U8 I(u) + I(-u) = full tet <= 1e-13 over 150 random quadrics (all labels).
* Cost: 0.05 ms per generic cut element at degree 4, order 16 (35 moments).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…1b, A3)

* triMoments: the same one-sweep slicing in 2D (inner s exact, outer t by Gauss with the smoothstep map), all s^p t^q
  moments of {u > 0} on the reference triangle, with the same deflation and a planar fast path to cutclip::clipTri.
* faceNodal: the six P2 values of face k from the element's ten (vertices in increasing order, mid-edge nodes
  (0,1)(1,2)(0,2)); they are the only values the two neighbours of a face share.
* classifyTri: Bernstein test plus exact range (3 vertices, 3 edge critical points, interior) -> uncut_positive /
  uncut_negative / cut.
* faceMoments: the 3D monomials x^p y^q z^r over F cap {u > 0}, by polynomial substitution of the face map into the 2D
  moments; measure ds dt (cross-product normals documented for the divergence identity of A4).

Measured (conda-dev-mpich, macOS arm64; 62 tests pass in 1.5 s):
* Quarter disc r = 0.4, moments to degree 5 against closed forms: 2.4e-7, 6.7e-10, 9.8e-15, 4.3e-18, 2.8e-17 at orders
  6, 8, 12, 16, 24. Disc r = 0.15 at the centroid (all six nodal values negative): 1.4e-17 at order 16 and 24; its
  complement likewise.
* I(u) + I(-u) = full triangle: 3.3e-16 over 80 random quadratics. Linear u embedded as P2 against cutclip, 60 random
  lines, degree 4: forced slicing 4.4e-16, fast path equal. Nearly planar (kappa 1e-1 .. 0) default against order-40
  slicing <= 1e-12.
* faceMoments: linear u against cutclip.tri_moments on all four faces (20 planes each), degree 4: <= 1e-13. A ball
  centred outside the tet that pokes through face x = 0 with no node inside it: the face moments equal the disc moments
  to 1e-13 and the other three faces are exactly zero; classify_face flags exactly that face.
* A face seen from the neighbour's vertex numbering (all 6 vertex permutations of 300 random faces): identical label and
  range to 1e-13.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…faces of P1 tetrahedra (C44 phase 2)

The 3D form of the 2D cut-face loop (residual and Jacobian). A face is cut when its three vertex values of
phi_f carry both signs (decided from the face alone, so both elements and both ranks agree). The two branch
weights on the face come from the existing 2D moment-fit Heaviside on the reference triangle
(cutFaceWeights: barycentric coordinates of side 0's quadrature points in the face, fit degree 3, exact for the
degree <= 2 integrands of P1), the second element's points are paired by position as in 2D, normals and traces
carry z, and xB_ref_faces had a zero z for tetrahedra (now the third barycentric coordinate). SCIFEM is no
longer refused for P1 immersed boundaries in 3D; P2, PG and embedded + immersed still are.

Measured (nnx = 3, 5, 9, 17, immersedSCIFEM_switch 1, penalty 10, two overlap layers):
plane mub = 10 L2 3.67e-2, 9.04e-3, 2.34e-3, 6.18e-4 (rates 2.02, 1.95, 1.92); without SCIFEM 3.50e-2, 8.62e-3,
2.56e-3, 8.78e-4 (rate 1.54 at the finest pair).
plane mub = 1000 L2 3.38e-2, 8.79e-3, 2.63e-3, 1.17e-3 (1.94, 1.74, 1.17); without SCIFEM it did not converge
(3.4e-2, 8.5e-3, 1.2e-2, 1.4e-2). Penalty 0, 100, 1000 give 3.8e-3, 1.4e-3, 1.3e-3 at nnx = 17: the plateau
is not the penalty. It is not exact for a piecewise-linear solution either (1.9e-4, 4.3e-4, 3.4e-4); a likely
cause is the exterior faces the plane cuts where it leaves the cube (no consistency term there, as in 2D), not
checked.
sphere r = 0.3 (interface does not touch the boundary) mub = 10: 1.62e-2, 8.48e-3, 2.59e-3, 6.79e-4 (rate 1.93
on the finest pair); mub = 1000: 8.20e-3, 8.75e-3, 2.65e-3, 6.88e-4 (1.94).
Two ranks equal serial (rtol 1e-8, flux jump on). ifem_pwl now has g.n = 0 (the earlier one had a flux jump of
(mub - mua) g.n and was not in the IFE space): the equal-coefficient exactness test is unchanged.
Tests: 76 in test/ADR3D, 81 in test/IFEM + test_equivalent_polynomials + ADR_SGS (2D SCIFEM pins unchanged).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nce identity (C44 phase 1b, A4)

surfaceRule: a point rule on Gamma cap K with positive weights and the discrete normal grad u / |grad u| (into {u > 0})
at every point, from the same slicing as the volume sweep. With the inner coordinate along an axis, Gamma is a graph over
the two outer coordinates, dS = |grad u| / |du/dx| dy dz; the axis is chosen by the largest mean |du/dx_i| over the ten P2
nodes (a surface with du/dx == 0 has no roots on that axis). surfaceMoments gives S[a] = int x^a dS (Dirac fit) and
Sn[i][a] = int x^a n_i dS (three normal-weighted Dirac fits). With a Jacobian J the weight is w |det J| |J^-T n| and the
normal J^-T grad u / |J^-T grad u|, in reference monomials. Exactly planar data: cutclip triangles + a collapsed Gauss rule.

The port of the July sweep is not enough for the surface weight (1/|du/dx| ~ 1/sqrt(disc) at the silhouette), and the
test against the divergence identity found why. The slicing is restructured, which also improves A2/A3:
* each of the three terms of the inner indicator integral (smaller root, larger root, the facet end x = 1-y-z) is
  integrated over its own maximal runs of validity, not over the segments of all critical values together;
* a root run is integrated in a variable that makes sqrt(disc) analytic: y = m + R sin(phi) (silhouettes real, elliptic),
  m +- R cosh(psi) in pieces (hyperbolic), m + R sinh(psi) (complex silhouettes near the real axis, near a turning
  point), y1 + s tau^2 (one silhouette or far second one). The surface weight is then |grad u|/sqrt(|al|) dphi with no
  division of two small numbers. A run truncated just short of a silhouette by a kink was singular just outside its end.
* new outer critical values: where the curves cross (silhouette x* = 0, root at both ends, silhouette on the facet);
* double-exponential nodes at the turning points of the silhouette curve, where the outer integrand is logarithmic
  (cubic smoothstep gives n^-4 there; tanh-sinh cannot be used at the inverse-square-root ends: sqrt(ulp) ~ 1e-8 lost).

Measured (conda-dev-mpich, macOS arm64; 75 tests pass in 1.6 s):
* U6 octant of a sphere r = 0.4 (area, int x^a dS, int x^a n_i dS, degree 4, against Gamma functions): 1.1e-8, 6.3e-11,
  3.4e-15 at orders 6, 8, 12, then 6e-15 to order 32 (150, 263, 599 points); closed sphere r = 0.15 inside the tet
  (label sub_nodal): 2.4e-10 at 8, 8.9e-16 at 16 (3264 points). All weights positive. Cylinder along x (du/dx == 0):
  the axis-0 rule is empty, the automatic axis equals axes 1 and 2 to 1e-12. Every inner axis gives the closed sphere
  forms to 1e-12. Physical scaling: sphere under a random affine map, area 4 pi r^2, int n dS = 0, int xi_k n_j dS =
  -V Jinv[k,j] to 1e-12.
* Planar data (1-3, 2-2, 3-1; 30 planes) against cutclip.surface_moments: 1e-13 with and without the fast path.
* U7 divergence identity int_Gamma q n_i = sum_faces int_F+ q nu_i - int_K+ d_i q, all monomials to degree 3: octant 6.8e-15,
  closed sphere 4.6e-16, cap through a face 2.4e-17, generic cut 1.9e-16, edge cut twice 9.2e-15. Random quadrics, 120 of
  them (seeds 1 and 5, 5 labels): median 3e-15 at order 24..32; 93% below 1e-12 at order 32 and 100% below 1e-10
  (worst 9e-11); by order 48 all converge. Two random quadrics that stalled at n^-3 before the restructuring (2e-10 at
  order 48) are pinned as regressions (1.5e-15 at order 24).
* A2/A3 re-measured after the restructuring: octant ball volume 5e-9, 7e-12, 7e-17 at orders 6, 8, 12 (was 1.7e-7, 9e-10,
  2.6e-15); generic cut 1.7e-13 at order 12, 1e-16 at 16; planar 2-2 forced slicing 4e-9 at 8, 7e-17 at 12.
* Cost, generic cut, degree 3: surface rule 0.02 ms at order 16 (256 points), 0.04 ms at 24; volume moments 0.04 ms.
* Known limit: rare near-coincident critical values (three events within 1e-7) leave one axis at ~1e-8 at order 32;
  the automatic axis avoids most of them; other axes agree to 1e-6 (tested).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…4 phase 1b, A5)

QuadricFit(u, k, options, axis, J): the degree-k equivalent polynomials of a curved cut, solved from the moments of A2/A4
by the monomial Gram matrix on the reference tet (exact entries a! b! c! / (a+b+c+3)!, Cholesky with one step of
iterative refinement), in cutclip's monomial order:
  H     int_K H q   = int_{K cap {u>0}} q          (ImH = 1 - H)
  D     int_K D q   = int_Gamma q dS / |J|
  Dn_i  int_K Dn_i q = int_Gamma q n_i dS / |J|     (three normal-weighted Dirac fits)
The surface moments are divided by |det J| because the element kernel multiplies every weight by |J|; the normal is the
physical J^-T grad u / |J^-T grad u|. A flux term int_Gamma (a grad v.n) w dS becomes sum_q |J| w_q sum_I Dn_I(x_q)
(a d_I v w)(x_q): exact for polynomial integrands of degree <= k, with no normal evaluated off the surface. Accessors
set_quad(q), H(), ImH(), D(), Dn(I) match GeneralizedFunctions_mix, plus Dn; nothing in equivalent_polynomials.h is
edited (the Gram matrix is built here, not taken from _set_Ainv: the monomial order and reference coordinates of the
generated matrices differ, as the design note warned).

Measured (conda-dev-mpich, macOS arm64; 83 tests pass in 1.8 s):
* U9: sum_q w_q f(x_q) q(x_q) equals the volume / surface / normal-weighted moment for every monomial of degree <= k,
  k = 1..4, on 14 cut elements per k (octant of a ball, ball inside the tet, cap through a face, generic cut, two
  planes, random quadrics): <= 1e-11 relative; 2.4e-15 (k = 3) and 6.1e-15 (k = 4) on the four named cases.
  cond(G) = 1.1e2, 1.3e4, 1.9e6, 2.9e8 for k = 1..4.
* Closed forms: the octant of a ball (r = 0.4), degree-3 fit: H, D, Dn_i reproduce the exact moments to 1e-12 for
  degree <= 3 and miss by > 1e-7 at degree 4, as a degree-3 fit must.
* Planar data reproduces today's fits: H, ImH and D of a degree-3 fit of a linear level set against
  equivalent_polynomials.Simplex(nSpace=3, nP=3) at 27 points, four cut topologies: 4.0e-12.
* Physical scaling, sphere r = 0.15 under a random affine map J: |J| sum w D = 4 pi r^2 and |J| sum w H = 4/3 pi r^3 to
  1e-11 relative, |J| sum w Dn = 0, |J| sum w Dn_j xi_k = -V Jinv[k,j] to 1e-11.
* Cost on a generic cut at order 16: 0.06 ms (k = 3), 0.08 ms (k = 4) for all of H, D, Dn_1..3.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Removes the macOS Intel (macos-15-intel) leg from sdist.yml, with its exclude
rule and comments, as decided on 2026-10-28 for after the 1.9.1 release (tag
1.9.1 is published). Apple Silicon stays; linux-64 (both Python versions) and
linux-aarch64 are unchanged. No other workflow references the leg.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Rewrites RELEASE.md for the one-repository layout and the patch-release flow used
for 1.9.1: a release is a tag on the line branch, never a move of main; release
candidate (PEP 440 rcN) then a one-commit final version PR; trains with merge
commits; the Zenodo hook check and publishing the GitHub release once, directly;
verification, then clean-up, feedstock, Spack, HPC modules; the documentation
build from the tag (traps included); the LFS note is kept.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… 1b, B1)

The embedded solid (Nitsche terms and ghost penalty) now runs on P2 tetrahedra in 3D, with the
cut placed by the vertex values (planar), as in 2D p = 2.
- requireSupportedDimension (kernel and ADR.py): P2 embedded is no longer refused; Robin stays refused.
- nP_fit: fit degree 4 only for 2D P2 with >= 16 points; 3D P2 keeps degree 3 (decision P9), which the
  degree-7 tetrahedron rule integrates exactly against the degree-4 Nitsche integrands.
- kernel factory: cADR<CompKernel<3,4,10,10>, 3, 31, 4, 10, 10, 16> (qOrder 7: 31 tetrahedron points,
  16 face points; the tetrahedron rule has some negative weights).
- adr3d_case.py also reports the H1 seminorm of the error.

Measured (mac, conda-dev-mpich, structured tets nnx = 3, 5, 9, plane n.x = 0.37, ghost penalty on, qOrder 7):
  L2   2.028e-3, 2.337e-4, 2.818e-5   rates 3.12, 3.05
  H1   2.649e-2, 6.524e-3, 1.614e-3   rates 2.02, 2.02
2 ranks (pinned partition) = serial: L2 2.33684944414569559e-04 vs 2.33684944414725820e-04 (nnx = 5).
Without the ghost penalty nnx = 9 is not stable (L2 6.1e-5, Linfty 2.1e-3). Sphere r = 0.3 with the planar
cuts, ghost penalty on: L2 1.834e-3, 2.256e-4, 2.748e-5 (rates 3.02, 3.04).
Tests: test/ADR3D 163 passed (183 s); P1 results unchanged, 2D untouched (nP_fit unchanged there).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tetrahedra (C44 phase 1b, B2)

New option embeddedBoundary_curved (default off: the planar cut and today's numbers). On a P2 tetrahedron with
the embedded solid alone it replaces the vertex-value plane by the quadric of all ten nodal values:
- cutquadric.h SolidFit: classification by the exact range test (not vertex signs), then on a cut element the
  degree-3 fits of H, D and the three normal-weighted Diracs D n_i at the element's quadrature points
  (physical scaling from the vertex Jacobian). Uncut elements store nothing.
- ADR.h: the Nitsche terms use updateEmbeddedBoundaryTermsDn (Dn_s replaces D_s * one normal per element, P3);
  H_s, D_s, the active-element test and the cut-face set for the ghost penalty come from the fit.
  Elements the vertex signs do not see as cut (edge cut twice, sub-nodal) are integrated and counted in the
  log (P1; ADR.py _logCutLabels, owned elements only). 2D, P1, immersed and Robin are refused (P7).
- setup.py: cADR depends on cutquadric.h and cutclip.h.

Measured (mac, conda-dev-mpich, structured tets, qOrder 7, ghost penalty on):
- plane n.x = 0.37, curved on vs planar (nnx = 5): L2 2.336849444126e-4 vs 2.336849444147e-4 (1e-11 relative).
- sphere r = 0.3, curved: nnx = 3, 5, 9, 17: L2 1.823e-3, 2.262e-4, 2.734e-5, 3.434e-6 (rates 3.01, 3.05,
  2.99); H1 2.618e-2, 6.607e-3, 1.626e-3 (rate 2.0). Planar at nnx = 17: 3.454e-6: with this manufactured
  solution the interpolation error dominates and the two agree to ~1%; no planar/curved gap is visible in the L2
  error up to nnx = 17.
- G1 geometry (sphere area/volume over the mesh, nnx = 9, 17): planar dV 9.96e-3, 2.43e-3 and dA -5.2e-2,
  -1.3e-2 (rate 2); curved dV 3.6e-5, -7.5e-7 and dA -1.2e-4, 1.5e-5.
- 2 ranks = serial (nnx = 5, sphere): L2 2.26200547410622632e-04 vs 2.26200547410589781e-04.
- classification at nnx = 9: 480 simple, 48 edge cut twice, 0 sub-nodal.
Tests: test/ADR3D, test/IFEM, test/ADR_SGS, test_equivalent_polynomials, test_adr_problem: 311 passed, 28
skipped, 1 failed (test_ymfrun_knows_which_domains_fix_the_mesh, also fails on main).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t stress, planar vs curved (C44 phase 1b, B3/B4)

- Kernel entry for 3D P2 with qOrder 8 (45 tetrahedron points, 16 face points); nP_fit is 4 there, 3 with qOrder 7
  (the default, decision P9, unchanged). Nothing else in the kernel changes.
- ladr_ss_3d_p.py: exact="radial" (u = rho^2 - R^2: in P2, 0 on the sphere, so a constant datum is exact and the
  error is the cut geometry's), sphereR, planeD.
- B3 not implemented, measured unnecessary: plane at delta*h from a vertex (nnx = 9, h = 1/8, P2, gradient ghost
  penalty gamma 0.1): L2 1.79e-5, 2.13e-5, 2.08e-5, 2.07e-5, 2.07e-5 for delta/h = 1e-1..1e-6 (flat); without the ghost
  penalty 1.82e-5, 3.12e-5 (Linfty 1.6e-3), 1.92e-5, 1.94e-5, 1.95e-5. The second-derivative jump would stabilise
  nothing that shows up.
- B4, radial case, nnx = 3, 5, 9, 17, qOrder 8:
    planar L2 8.40e-3, 5.16e-3, 1.32e-3, 3.76e-4 (rates 0.7, 2.0, 1.8); H1 7.18e-2, 5.77e-2, 1.72e-2, 5.04e-3
    curved L2 5.11e-3, 3.72e-4, 2.80e-5, 2.84e-6 (rates 3.8, 3.7, 3.3); H1 4.24e-2, 5.98e-3, 1.03e-3, 2.37e-4
  (rates 2.8, 2.5, 2.1). The same case at qOrder 7 (fit degree 3): curved L2 5.68e-3, 5.68e-4, 9.87e-5, 3.31e-5,
  H1 flat from nnx = 9 to 17 (2.94e-3, 2.76e-3): the degree-4 Nitsche penalty is not exact against k = 3. So the M2
  criterion (L2 3, H1 2) is met with qOrder 8; P9's fit degree 3 is not enough for the curved cut.
- Tests: test/ADR3D 171 passed (228 s).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ost estimate, PBS end from stime

From cekees/c17-c14-r6 at be922e7 (#276).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ersed boundary in 3D

From cekees/c44-ph2 at bee5984 (#277).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
From cekees/release-md-main at 7c62d59 (#282).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…) and the P2 embedded solid in 3D ADR (planar and curved)

From cekees/c44-1b at d187016 (#278).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
From cekees/drop-intel-main at 0fdc7b1 (#283).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cekees
cekees merged commit 33659c3 into proteustoolkit:main Nov 14, 2026
9 checks passed
@cekees
cekees deleted the train/main-2026-11-13 branch November 14, 2026 06:45
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