Skip to content

Add near-to-far-field transform and half-wave dipole validation - #81

Open
xtalax-droid wants to merge 27 commits into
maxwell/4-lumpedfrom
maxwell/5-dipole
Open

xtalax-droid wants to merge 27 commits into
maxwell/4-lumpedfrom
maxwell/5-dipole

Conversation

@xtalax-droid

@xtalax-droid xtalax-droid commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Depends on #79 (this PR targets its branch, so the diff shows only this layer; it will be retargeted once the layers below merge).

Adds a near-to-far-field transform for MaxwellModel solutions and validates it on a Hertzian source and on a strip dipole fed by a lumped port, meshed with Gmsh physical groups.

API

  • far_field(sol, surface, directions; center) returns E_theta, E_phi of r e^{ikr} E (exp(+iωt)), from Love's equivalent currents J = n × H and M = −n × E on a closed interior facet set (the Huygens surface).
  • radiated_power(sol, surface; method = :flux | :far_field) integrates the Poynting flux through the surface or the radiation intensity over the sphere.
  • directivity(sol, surface, directions) returns 4πU / P_far.

The surface must be closed, in vacuum, clear of PEC and star-shaped about center; each condition is checked with a clear error. H is the curl of E averaged over the two cells next to each facet.

sweep = solve_sweep(model, [ω]; fields = true)
sol = MaxwellSolution(model, ω, sweep.fields[1][:, 1])
ff = far_field(sol, "huygens", [Vec(sin(θ), 0.0, cos(θ)) for θ in θs])
D = directivity(sol, "huygens", [Vec(1.0, 0.0, 0.0)])

Validation

Hertzian source (uniform current ball of radius 0.05λ, ABC sphere at 0.75λ, Huygens sphere at 0.3λ, 2.1e4 dofs, Maxwell group): complex E_theta (phase included) within 1% of the exact radiation integral over three φ-cuts and 10–170°, E_phi below 0.5% of the peak, D = 1.505 (exact 1.5), P_far within 1.2% of exact. The flux exceeds the far-field power by 5%: that is the first-order ABC's reflection (about 1/(kR)²), which the outgoing far field does not see.

Strip dipole (examples/dipole: PEC strip of width 4a with a = 0.005λ, 50 Ω lumped port in the gap, resonance found by a frequency sweep):

coarse (Maxwell group) full (FEM_MAXWELL_DIPOLE=1) reference
dofs 22,547 136,567
h at the strip / bulk; ABC radius 0.0075λ / λ/7; 0.6λ 0.00125λ / λ/12; 1.0λ
resonant length 0.437λ 0.456λ 0.4665λ (induced EMF)
R at resonance 59.5 Ω 69.6 Ω 59.9 Ω (induced EMF)
directivity 1.631 1.636 (−0.01 dB) 1.641 (thin λ/2 dipole)
HPBW 77.8° 78.5° 78.08°
E-plane pattern, 30–150°, vs cos(π/2 cos θ)/sin θ 0.03 dB 0.058 dB
time / peak memory 11 s 27 s / 8.4 GB

The pattern, directivity and beamwidth agree closely. The resonant length (−2.2% against induced EMF) is still rising as the mesh at the strip is refined (0.437, 0.451, 0.454, 0.456λ), so it is mesh-limited at order 1. R at resonance is 16% above the induced-EMF value; induced EMF is known to under-estimate R for a wire this thick, so treat that reference as soft. The gated full test asserts D within ±0.1 dB, the pattern within 0.2 dB and power balance within 2%, not the impedance bands.

Maxwell group 222/222, QA 21/21.

Docs: a far-field and dipole section in docs/src/maxwell.md.

Review pointers

  • _far_field in src/maxwell/farfield.jl: signs and scale (E_θ = −ik/4π (L_φ + η N_θ), E_φ = +ik/4π (L_θ − η N_φ)), checked in complex form by the Hertzian test.
  • examples/dipole/mesh.jl builds the grid from Gmsh directly (gmsh_grid) with a node-hash facet lookup: FerriteGmsh.togrid matches facets in O(facets × cells) (about 17 s at 1.8e5 cells, against 0.2 s here), and building a grid by hand from tonodes assumes node tags are in getNodes order.
  • The impedance accuracy is limited by the first-order ABC radius (at 0.6λ the far-field and flux powers differ by 13%); the PML in Add a Cartesian UPML to the Maxwell model #78 should reduce that once the layers are combined.

🤖 Posted by an AI agent · harness: Claude Code 2.1.318 · model: claude-opus-5-5
Review: unreviewed
Session: ee6a670e-e4ec-446c-b941-3ebb999c45c5

t and others added 3 commits November 5, 2026 23:39
far_field, radiated_power and directivity transform a MaxwellSolution on a closed interior facet set (Love's currents J = n x H, M = -n x E, outward side away from a centre, H averaged over both cells), validated against the exact radiation of a small current ball. examples/dipole meshes a strip dipole with a lumped-port gap, a Huygens sphere and an absorbing sphere through Gmsh physical groups and finds its resonance, impedance, directivity and pattern; a coarse case runs in the Maxwell group and the full one with FEM_MAXWELL_DIPOLE=1.

Agent-Harness: Claude Code 2.1.318
Agent-Model: claude-opus-5-5
Agent-Session: ee6a670e-e4ec-446c-b941-3ebb999c45c5
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Measured: togrid takes about 17 s at 1.8e5 cells, not hours.

Agent-Harness: Claude Code 2.1.318
Agent-Model: claude-opus-5-5
Agent-Session: ee6a670e-e4ec-446c-b941-3ebb999c45c5
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.319
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1)

Time benchmarks
master 3d0e723... master / 3d0e723...
construction/heat P1 10x10 5.46 ± 0.32 ms 7.06 ± 0.67 ms 0.774 ± 0.086
construction/heat P1 20x20 7.56 ± 0.44 ms 10 ± 0.89 ms 0.755 ± 0.08
time_to_load 4.49 ± 0.064 s 4.51 ± 0.037 s 0.996 ± 0.016
Memory benchmarks
master 3d0e723... master / 3d0e723...
construction/heat P1 10x10 0.0395 M allocs: 2.12 MB 0.0395 M allocs: 2.12 MB 1
construction/heat P1 20x20 0.0704 M allocs: 4.74 MB 0.0704 M allocs: 4.74 MB 1
time_to_load 0.201 k allocs: 12.2 kB 0.201 k allocs: 12.2 kB 1

t and others added 2 commits November 10, 2026 20:13
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

Independent review (Codex CLI v0.164.0 / gpt-6.1-sol), reviewer session 01a1c8d1-aeb2-7ac1-b5f4-a4c02df735db, reviewed head a6d4f66

  • Verdict: CHANGES
  • Risk assessment: medium-low (ML7: additive Maxwell public API; existing entry points and defaults are unchanged). Independently assessed from the diff without reading an author rating.
  • Round / slot: 2 / 1

This is a blind code-only review by a session other than the PR author's, copied below from the reviewer's report with only the grading metadata removed. The posting agent did not re-run the reviewer's commands. A MERGE verdict is advice; merging is left to the maintainers.

Risk

medium-low (ML7: additive Maxwell public API; existing entry points and defaults are unchanged). Independently assessed from the diff without reading an author rating.

Blocking findings

  1. [P2] Lossy wave-port coefficients do not satisfy the advertised power-wave contract — src/maxwell/ports.jl:252, src/maxwell/ports.jl:267. Confirmed by running. Complex dielectric permittivity is accepted at wave ports; only conductivity is rejected at line 153. Writing P = data.norm * length_scale^2 and Y = β/(ωμ0μr), the code gives |a|²/2 = P|Y|/2, whereas the time-averaged incident modal Poynting power is P Re(Y)/2. For an allowed eps_r = 2 - 2im WR-90 port at 10 GHz, the probe obtained 2.3489213222017275e-7 W versus 2.1123866662937617e-7 W, an 11.20% overstatement. A second probe used a passive 1 μm lossy entrance layer followed by a 15 mm vacuum guide and a PEC short: S11 = 0.9241039694744899 - 1.103228675146593im, hence |S11| = 1.4391253093682341, with positive integrated dielectric dissipation. The independent transmission-line traveling-wave result has magnitude 1.433714469887619; this confirms the convention mismatch rather than an active medium. Consumers cannot interpret these results as power ratios as documented. Implement a complex-reference power-wave convention, or explicitly document lossy/evanescent results as traveling-wave coefficients and restrict the power interpretation to lossless propagating ports. Add coverage of this case; the current wave-port tests exercise lossless port materials.

  2. [P2] New Maxwell paths depend on non-public Ferrite helpers — src/maxwell/model.jl:165, src/maxwell/lumped.jl:67, src/maxwell/ports.jl:141, src/maxwell/farfield.jl:15. Confirmed by running against Ferrite 1.7.0: Base.ispublic(Ferrite, :dirichlet_facetdof_indices) and Base.ispublic(Ferrite, :reference_facets) both return false. These helpers are used throughout PEC, port and Huygens-surface assembly. This violates the supplied “Public API only” instruction. The existing QA ignore list already contains both names, so it also masks their additional use here; that exemption does not establish a public dependency contract. Use public Ferrite APIs, obtain an upstream public API, or keep the necessary small topology helper locally as the instructions permit.

  • Verdict: CHANGES
  • Round: 2
  • Blocking priorities: P2, P2

Non-blocking findings

None.

What I ran

  • Reviewed git diff origin/master...HEAD and the affected implementation, tests, examples and documentation. Read the requested risk criteria. No root AGENTS.md or CLAUDE.md exists in this checkout. Did not read PR bodies, comments, reviews or sibling review artifacts.

  • Interpreter: julia --version → julia version 1.13.2. The checkout contains no Julia Manifest or interpreter pin. Created a separate scratch environment with Pkg.develop(path=pwd()), preserving the runtime's original JULIA_DEPOT_PATH. Resolved versions included Ferrite 1.7.0, FerriteGmsh 1.5.0, Gmsh 0.3.1 and SciMLTesting 2.13.3.

  • Exported TMPDIR=(a local scratch path). All probes, environments and logs are under the requested scratch/tmp directories.

  • Affected suite, from the checkout, under a 12 GiB systemd scope:

    env JULIA_NUM_THREADS=4 JULIA_NUM_PRECOMPILE_TASKS=4 OPENBLAS_NUM_THREADS=1 GROUP=Maxwell \
      julia --startup-file=no \
      --project=(a local scratch path) \
      -e 'using Pkg; Pkg.develop(path=pwd()); Pkg.test("FiniteElementMethod"; julia_args=["--startup-file=no"])'

    Exit 0: 222/222 assertions passed: dipole 8, farfield 21, lumped 60, manufactured 4, model 80, ports 49. Log: scratch/maxwell-suite.log.

  • Targeted probes, serially after the suite, under a 6 GiB scope:

    env JULIA_NUM_THREADS=1 JULIA_NUM_PRECOMPILE_TASKS=1 OPENBLAS_NUM_THREADS=1 \
      julia --startup-file=no \
      --project=(a local scratch path) \
      (a local scratch path)

    Exit 1: 18 passed, 2 failed, with both failures establishing finding 1. The 16 invariance assertions passed: physical metre/millimetre scaling, rigid rotations/translations, driven field and curl scaling, far-field complex linearity, translation phase, power scaling and directivity invariance. Port scaling/rotation errors were at most 1.46e-14; far-field linearity/translation errors were below 4.5e-18. The same script printed the public-API checks supporting finding 2. Log: scratch/probes.log.

  • uv run --locked python --version → Python 3.15.0, with the warning that --locked has no effect outside a project. There is no uv.lock or Python project here, so no project-locked Python interpreter is available. Python was not used for the numerical verification.

  • Final git diff --exit-code and git status --porcelain confirmed an unchanged checkout. Both started Julia jobs finished. Reviewer: codex-cli 0.164.0, model gpt-6.1-sol; local session identified above, no session URL available.

What I did not verify

Julia 1.10/1.12 or prerelease compatibility, the other test groups including QA, documentation build, and the opt-in full dipole run (FEM_MAXWELL_DIPOLE=1). No GitHub/CI state or P2 deferral issues were inspected or supplied; no deferral is established by this blind review. No fixes, commits, pushes or GitHub posts were made.


🤖 Posted by an AI agent — harness: Claude Code 2.1.322 · model: claude-sonnet-5-5
Conversation: local session 3878b54e-28f2-4a01-a176-a8f5468d1997 (no session URL)

t and others added 5 commits November 11, 2026 23:56
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…errite API

Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@xtalax-droid

Copy link
Copy Markdown
Collaborator Author

Review feedback on this PR has been addressed on head 353da16. Master was merged in first (merge commits only, no rebase or force-push), then each finding was fixed with a regression test, and a Codex review of the branch approved with no open findings. All named CI checks are green on this head, including the Documentation job, which had one re-run after the gh-pages deploy push was rejected by a concurrent job (the docs build itself succeeded).

Stacked on #79.

Items deliberately left as they are: reaction coefficients that are subnormal but representable are still rejected (conservative); coefficients that cancel to zero only up to roundoff are rejected rather than compared with a tolerance; the absorbing-boundary adjoint derivative uses 0 for the sigma term at omega = 0 although the true limit is finite and nonzero.

🤖 Posted by an AI agent · harness: Claude Code 2.1.322 · model: claude-sonnet-5-5
Review: unreviewed
Session: 43e03fde-3384-4386-bae9-03e81f19ba7c

@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

Independent review (Codex CLI v0.164.0 / gpt-6.1-sol), reviewer session 01a1ceeb-7c45-77d1-a275-167668d79684, reviewed head 353da16

  • Verdict: CHANGES
  • Risk assessment: medium-low (ML7: additive Maxwell public API; existing entry points and defaults are unchanged). Independent risk recorded before any author rating; verification is in progress.
  • Round / slot: 3 / 1

This is a blind code-only review by a session other than the PR author's, copied below from the reviewer's report with only the grading metadata removed. The posting agent did not re-run the reviewer's commands. A MERGE verdict is advice; merging is left to the maintainers.

CI: green
Session: 01a1ceeb-7c45-77d1-a275-167668d79684

Risk

medium-low (ML7: additive Maxwell public API; existing entry points and defaults are unchanged). Independent risk recorded before any author rating; verification is in progress.

Blocking findings

Verification in progress.

Non-blocking findings

Verification in progress.

What I ran

Verification in progress.

What I did not verify

Verification in progress.


🤖 Posted by an AI agent — harness: Claude Code 2.1.322 · model: claude-sonnet-5-5
Conversation: local session 3878b54e-28f2-4a01-a176-a8f5468d1997 (no session URL)

t and others added 2 commits November 12, 2026 10:20
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@xtalax-droid

Copy link
Copy Markdown
Collaborator Author

Follow-up to the latest review on head 6f7ad12: merge of the updated base branch (zero-frequency rejection for wave ports). No other change in this PR.

Codex review of the branch approved with no open findings, and all named CI checks are green on this head. Merge commits only; no rebase or force-push.

🤖 Posted by an AI agent · harness: Claude Code 2.1.322 · model: claude-sonnet-5-5
Review: unreviewed
Session: 43e03fde-3384-4386-bae9-03e81f19ba7c

@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

PR: #81

Reviewed head: 6f7ad12
Raw SHA-256: a2cdd83bfa4cfbf36b8c3852ce0330fd292be9ec06dc7107f38e4faab832e354
Source SHA-256: 3b73a0a09524021ce044ced21f70f8b9a6667c6d5a9e4952cbfe25c964ba2a1d
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1d11c-3ee3-7512-8610-91b15fafe158
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes

Risk assessment

  • Risk: medium-low (ML7)
  • Verdict: CHANGES
  • Reviewed head: 6f7ad12

Review report

VERDICT: CHANGES
Round: 4
Head: 6f7ad12
Slot: 1
CI: green
Session: 01a1d11c-3ee3-7512-8610-91b15fafe158

Risk

medium-low (ML7: additive Maxwell public API with existing package entry points and defaults unchanged). Independent assessment; no author risk rating was read.

Blocking findings

  1. [P2] The below-cutoff power-wave contract remains incorrect — src/maxwell/ports.jl:272, src/maxwell/ports.jl:292, src/maxwell/sweep.jl:20, docs/src/maxwell.md:54. This is the unresolved round-3 blocker; the delta leaves its normalization and documentation unchanged. Confirmed by running: for a normalized rectangular guide with broad dimension 2 and ω = 1 < π/2, the code returns β = -1.2113633229846195im and an incident coefficient with |a|²/2 = 0.4942045914210199. Independently integrating ½ Re(E × H̄) for the projected incident mode, with H = β/(ωμ) k̂ × E, gives exactly 0 real axial power. At ω = 2, the coefficient and flux both give 0.25253211426380556. Thus supported evanescent coefficients cannot have the documented individual incident/outgoing power interpretation. Suggested fix: describe them as generalized traveling-wave coefficients, restrict the power interpretation to propagating wave ports throughout the manual, s_parameters, MaxwellSweep, and normalization comment, and add a below-cutoff zero-real-power test. The evanescent coefficients can remain supported.
  • Verdict: CHANGES
  • Round: 4
  • Blocking priorities: P2
  • Deferred P2 issues: None supplied; no issue deferral verified in this blind review.

Non-blocking findings

  1. Incorrect explanation of the new zero-frequency guard — src/maxwell/ports.jl:240, src/maxwell/ports.jl:245, src/maxwell/ports.jl:297. Confirmed by direct evaluation: at ω = 0, β = -1.5707963267948966im and the documented impedance Z = ωμ/β evaluates to 0, while the new comment, error, and docstring call it infinite. The guard itself passes its regression tests. Explain the singular β/ω normalization at zero frequency; reserve the infinite-impedance explanation for exact cutoff.

What I ran

  • Read the supplied delta.diff, the explicitly requested prior-head previous-review.md, the full git diff origin/master...HEAD and affected code/tests/docs for context, and fleet-master/risk.md. Focused new probes on the delta and unresolved blocker. Root AGENTS.md and CLAUDE.md are absent. No PR body, discussion, author rating, sibling review directory, or earlier same-head opinion was inspected.

  • Exported the requested TMPDIR before commands and preserved JULIA_DEPOT_PATH unchanged. Scratch source, environments, scripts, and logs are under this round's scratch/. Checked memory and /proc/loadavg; Julia runs were serial, inside memory-capped systemd scopes, with one Julia thread, one precompile task, automatic package precompilation disabled, and one OpenBLAS thread.

  • julia --version → julia version 1.13.2. No checked-in Julia Manifest or interpreter pin exists. Built scratch/env from the checkout's dependency/compat declarations and developed this checkout there. Resolved Ferrite 1.7.0, FerriteGmsh 1.5.0, Gmsh 0.3.1, SciMLTesting 2.13.3, and SafeTestsets 0.1.0 (scratch/setup.log). The checkout was unchanged.

  • Affected suite, through the project's test entry point, in an 8 GiB scope:

    env JULIA_NUM_THREADS=1 JULIA_NUM_PRECOMPILE_TASKS=1 \
      JULIA_PKG_PRECOMPILE_AUTO=0 OPENBLAS_NUM_THREADS=1 GROUP=Maxwell \
      timeout 3600 julia --startup-file=no --project=../scratch/env test/runtests.jl

    Exit 0, 247/247 passed: dipole 8, farfield 21, lumped 64, manufactured 4, model 84, ports 66. Log: scratch/maxwell-suite.log.

  • Targeted probes, using the same environment/thread settings and a 4 GiB scope:

    timeout 3600 julia --startup-file=no --project=../scratch/env ../scratch/probes.jl

    Exit 1, 50 passed, 1 failed, 0 errored, 0 broken. Passed: one-pass wave/lumped/mixed iterators, port order, assembly/excitation/sweep equivalence and overlap validation (21); zero/cutoff rejection before solver invocation, multiple real zero types, mixed-port indexing, nearby frequencies, and unchanged lumped-only zero-frequency helpers (28); propagating incident-power agreement (1). The sole failure is the evanescent power assertion above. Log: scratch/probes.log. An initial scratch assertion required exact -1 for a 50-ohm lumped reflection and differed by one ULP; reran with exactly representable Z0 = 4, retaining the exact assertion (scratch/probes.initial.log).

  • Failing-before/passing-after replay of all three added assertions (scratch/delta_regressions.jl), with the same environment/thread settings and 4 GiB scopes:

    timeout 3600 julia --startup-file=no --project=../scratch/before \
      -e 'using FiniteElementMethod; println("LOADED_SOURCE=", pathof(FiniteElementMethod)); include("../scratch/delta_regressions.jl")'
    timeout 3600 julia --startup-file=no --project=../scratch/env ../scratch/delta_regressions.jl

    scratch/before was extracted with git archive 353da166e1cec6ab1b9b007f3cd73c176c83e117 and reused the resolved scratch Manifest. Verified pathof loaded that snapshot. Before: exit 1, 2 failed, 1 errored — zero-frequency calls threw no exception; the stateful iterator hit MethodError: no method matching keys(::Base.Iterators.Stateful...). After: exit 0, 3/3 passed. Logs: scratch/delta-before.log, scratch/delta-after.log. The initial before replay stopped at the constructor error; placed the construction inside its assertion so the other two checks also ran (scratch/delta-before.initial.log).

  • uv run --locked python --version → Python 3.15.0, warning that --locked has no effect outside a project. There is no uv.lock or Python project, so project-locked Python verification is unavailable. Python was not used for numerical checks.

  • git diff --exit-code, git diff --cached --exit-code, and git status --porcelain confirmed an unchanged checkout at the specified head after testing. Every command started finished before this report was written. Reviewer: codex-cli 0.164.0, model gpt-6.1-sol, session above; no session URL available. Newest commit trailers report Claude Code 2.1.322, claude-sonnet-5-5.

What I did not verify

Other test groups including QA; documentation build; the opt-in full dipole run; other Julia versions; full default-branch regression comparison. CI green is supplied metadata, not independently inspected. No GitHub state or P2-deferral issue evidence was consulted. No fixes, checkout edits, commits, pushes, GitHub posts, approvals, or merges were made.

AUTHOR_GRADE: {"task":"feature","score":4,"difficulty":4,"rounds":4,"author_harness":"Claude Code 2.1.322","author_model":"claude-sonnet-5-5","note":"All 247 affected-suite assertions pass. The three delta assertions fail or error on the prior head and pass on this head; 50 targeted probes pass. The prior below-cutoff power-wave documentation blocker remains confirmed by an independent Poynting-flux calculation."}

Head link: 6f7ad12


🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol
Conversation: local session 01a1d11c-3ee3-7512-8610-91b15fafe158 (no session URL)

t and others added 10 commits November 12, 2026 19:09
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Replaces a non-public Ferrite function with the package's own facet node table, which test/Maxwell/model.jl checks against the geometry.

Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

PR: #81

Reviewed head: 841183e
Raw SHA-256: 6bee097964a22b287f1ec6d9816c3cb75b1c5fbfb4e3ec6af765cf3538ae0f03
Source SHA-256: c6a6a6caafea857c01875572a3c0b0b4519222ea27d48edd17d7673dce8d53c8
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1d194-bef1-7f91-947b-ad71274ca79f
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes

Risk assessment

  • Risk: medium-low (ML7)
  • Verdict: MERGE
  • Reviewed head: 841183e

Review report

VERDICT: MERGE
Round: 5
Head: 841183e
Slot: 1
CI: CI is not green
Session: 01a1d194-bef1-7f91-947b-ad71274ca79f

Risk

medium-low (ML7: additive Maxwell public API; existing package entry points and defaults remain unchanged). Independent assessment; no author risk rating was read.

Blocking findings

None. The prior below-cutoff power interpretation blocker is resolved: the manual, port and sweep docstrings, and normalization comment distinguish propagating power waves from evanescent coefficients. Independent facet integration confirms the distinction. The prior zero-frequency explanation is also corrected.

  • Verdict: MERGE
  • Round: 5
  • Blocking priorities: None
  • Deferred P2 issues: None required.

Non-blocking findings

None.

What I ran

  • Read the supplied delta since 6f7ad12a77116083ebd08b2bd41c49585845b840, the explicitly requested prior-head review, and the whole PR's code, tests and documentation diff for context. Focused probes on the delta and prior findings. Root AGENTS.md and CLAUDE.md are absent. No PR body, discussion, author rating, sibling review directory or earlier same-head opinion was inspected.
  • Exported the requested TMPDIR; preserved JULIA_DEPOT_PATH. All scratch files and logs are in this round's scratch/. Julia commands ran serially in memory-capped systemd scopes, with one Julia thread, one precompile task, automatic package precompilation disabled and one OpenBLAS thread. Checked memory and /proc/loadavg before launching.
  • julia --version → julia version 1.13.2. No checked-in Manifest or interpreter pin exists. Resolved scratch/review-env from the project's dependency/compat declarations and the affected test dependencies, developing this checkout there. Versions include Ferrite 1.7.0, FerriteGmsh 1.5.0, Gmsh 0.3.1, SciMLTesting 2.13.3, SafeTestsets 0.1.0. Subsequent commands reused that Manifest unchanged.
  • GROUP=Maxwell timeout 3600 julia --startup-file=no --project=../scratch/review-env test/runtests.jl → exit 0, 310/310 passed: dipole 8, farfield 21, lumped 67, manufactured 4, model 98, ports 112. Log: scratch/maxwell-suite.log.
  • timeout 3600 julia --startup-file=no --project=../scratch/review-env ../scratch/probes.jl → exit 0, 171/171 passed. Covered outgoing admittance and vanishing-loss continuity across material/frequency signs; analytic field convergence; independent Poynting-flux integration; zero/negative-frequency guards before solver callbacks; mixed-port ordering; lumped negative-frequency conjugacy; empty sweeps. Analytic single-negative-material L2 convergence rates were 0.9531, 0.9862 for both frequency signs. Below cutoff, integrated real incident power was 0, while the coefficient's |a|²/2 was 0.5758369213; above cutoff they agreed at 0.2942451724. Log: scratch/probes.log.
  • Ran timeout 3600 julia --startup-file=no --project=../scratch/before-env ../scratch/delta-regressions.jl, then the identical script with --project=../scratch/review-env. The before snapshot was extracted with git archive 6f7ad12a77116083ebd08b2bd41c49585845b840; environments shared the same resolved dependencies, with only the package source path changed. Verified pathof(FiniteElementMethod) in both runs. Before: exit 1, 15 failed. After: exit 0, 15 passed. The two outgoing-boundary midpoint values changed from −1.9995648 / +1.9995648 to +0.5960469 / −0.5960469, against analytic +0.5851696 / −0.5851696; the separate refinement probes establish convergence. Frequency and constitutive-parameter rejection regressions also failed before and passed after. Logs: scratch/delta-before.log, scratch/delta-after.log.
  • uv run --locked python --version → Python 3.15.0, with warning that --locked has no effect outside a project. No uv.lock or Python project exists; project-locked Python verification is unavailable. Python was not used for numerical checks.
  • git diff --check origin/master...HEAD, git diff --exit-code, git diff --cached --exit-code and git status --porcelain completed cleanly; HEAD remains the specified SHA. All started commands finished. Reviewer: codex-cli 0.164.0, model gpt-6.1-sol, local session 01a1d194-bef1-7f91-947b-ad71274ca79f (no session URL). Author attribution was read only from the newest commit's trailers.

What I did not verify

Other test groups, including QA; documentation build; opt-in full dipole run; other Julia versions; full default-branch regression comparison. CI status is supplied metadata, not independently inspected; its non-green state remains a merge gate. No GitHub state or issue-deferral evidence was consulted. No checkout edits, fixes, commits, pushes, GitHub posts, approvals or merges were made.

AUTHOR_GRADE: {"task":"feature","score":5,"difficulty":4,"rounds":5,"author_harness":"Claude Code 2.1.322","author_model":"claude-sonnet-5-5","note":"The prior power-interpretation blocker and zero-frequency explanation are resolved. All 310 affected-suite assertions and 171 targeted probes pass. Fifteen delta regression assertions fail on the prior head and pass on this head; independent analytic convergence and Poynting-flux calculations support the numerical behavior."}

Head link: 841183e


🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol
Conversation: local session 01a1d194-bef1-7f91-947b-ad71274ca79f (no session URL)

Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

PR: #81

Reviewed head: af48c13
Raw SHA-256: 604c2d85d980116ebccd8b7e7c0a24abdcd865b47f4f0395a103840c5b4d0210
Source SHA-256: a8228e2f6c0f36654cace52cda930e43901056c4380c778177872faa6b739054
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1d1d4-8a32-7b23-b8a4-4b57175a2af7
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes

Risk assessment

  • Risk: medium-low (ML7)
  • Verdict: CHANGES
  • Reviewed head: af48c13

Review report

VERDICT: CHANGES
Round: 6
Head: af48c13
Slot: 1
CI: CI is not green
Session: 01a1d1d4-8a32-7b23-b8a4-4b57175a2af7

Risk

medium-low (ML7: additive, documented Maxwell public API on a separate solver path)

Blocking findings

  • Verdict: CHANGES
  • Round: 6
  • Blocking priorities: P2
  • Deferred P2 issues: None supplied; issue/PR discussion was not inspected during this blind review.
  1. [P2] New non-public dependency access — examples/dipole/mesh.jl:134 calls Ferrite.facets(cell). Confirmed by running against the resolved Ferrite 1.7.0: Base.ispublic(Ferrite, :facets) == false and Base.isexported(Ferrite, :facets) == false. The function has a docstring, but is not declared public. This violates the supplied author's “Public API only” rule. The access supplies the mesh connectivity used by both new radiation tests. Use the public grid-conversion API, a small local tetrahedron-facet helper, or an upstream public API. The other queried FerriteGmsh conversion helpers are public. No numerical failure is alleged for this finding.

Non-blocking findings

  • src/maxwell/farfield.jl:181: the theta midpoint rule is described as spectrally accurate. Integrating the constant function over the sphere gives relative solid-angle errors 3.173803062910263e-4 at 36 theta points and 7.933185828190581e-5 at 72: second-order convergence. Describe theta integration as second order; the periodic phi rule can have spectral convergence.

What I ran

  • Reviewed git diff origin/master...HEAD, the changed source/docs/tests and newest commit trailers, without reading PR discussion, prior reviews or author ratings. Root AGENTS.md and CLAUDE.md are absent. Reviewer: Codex, model gpt-6.1-sol.
  • Exported the requested TMPDIR before commands and preserved the inherited JULIA_DEPOT_PATH. Created an exact git archive HEAD copy at scratch/independent-01a1d1d4/repo; all dependency-environment writes and probes stayed outside the checkout.
  • julia --version: 1.13.2. The checkout has no Julia Manifest, Python project or uv.lock. uv run --locked python --version printed Python 3.15.0, with --locked has no effect when used outside of a project; this is not a locked project Python interpreter.
  • With JULIA_NUM_THREADS=4, JULIA_NUM_PRECOMPILE_TASKS=4, and a 12 GiB systemd scope, ran GROUP=Maxwell julia --project=<scratch-copy> -e 'using Pkg; Pkg.test(; allow_reresolve = false)'. Exit 0; 321/321 assertions passed: dipole 8, farfield 21, lumped 67, manufactured 4, model 98, ports 123. Full output: scratch/independent-01a1d1d4/maxwell-test.log.
    Observed lossless H(curl) convergence rates 0.9821, 0.9973; lossy rates 0.9670, 0.9932; refined transmission-line error 9.9173e-5; Hertzian far-field relative error 0.01010.
  • Froze the resolved test Project/Manifest in scratch/independent-01a1d1d4/test-env. Ran julia --startup-file=no --project=<test-env> <scratch>/probes.jl with one BLAS thread: 2/2 assertions passed, complex-phase linearity error 0, translation-phase error 4.5625e-16. Also queried dependency public/export/docstring status and sphere quadrature weights. Output: probes.log beside the script.
  • Ran api_units_probe.jl in the same environment: 3/3 length-unit assertions passed, S-matrix difference 3.5147e-15, relative E/curl(E) differences 4.6221e-15 / 2.8981e-15; the separate Base.ispublic(Ferrite, :facets) policy assertion failed, exit 1. Output: api-units-rerun.log. The first version of this scratch probe errored because complex Ferrite Vec values require conversion to arrays for these norm/isapprox checks; corrected only the probe and reran it.
  • git diff --check origin/master...HEAD and typos over every changed file: exit 0. Final git status --porcelain=v1: empty; HEAD unchanged.

What I did not verify

  • Full default/QA suites, documentation build, other supported Julia versions, and the opt-in FEM_MAXWELL_DIPOLE=1 full mesh.
  • Default-branch baseline tests, remote CI, issue-deferral evidence, PR discussion, or any earlier same-head opinion. CI status above is supplied by the review assignment.
  • No commits, pushes, GitHub posts, or checkout edits were made. All commands started for this review have finished.

AUTHOR_GRADE: {"task":"feature","score":4,"difficulty":4,"rounds":6,"author_harness":"Claude Code 2.1.322","author_model":"claude-sonnet-5-5","note":"321 affected assertions and five independent numerical invariants passed. One new dependency access is not declared public under the supplied author rule; the theta-quadrature comment overstates its convergence order."}

Head link: af48c13


🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol
Conversation: local session 01a1d1d4-8a32-7b23-b8a4-4b57175a2af7 (no session URL)

t and others added 2 commits November 12, 2026 22:44
…eta rule is second order

The Gmsh grid helper read the facets of a tetrahedron through Ferrite.facets, which is not public; it uses the local node indices of the four facets in Ferrite's order instead. The far-field midpoint rule in theta converges at second order, not spectrally; only the periodic phi rule can be spectral.

Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

PR: #81

Reviewed head: df73abc
Raw SHA-256: 1620ed60f18b1f97ed127a85dd95d10999b3f674126d7232bdca89a646492d3b
Source SHA-256: 35ceab41d907b90114f79e5de298db60cb8c85e6ab33a76bb2c6b6c37909c922
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1d222-ecf0-73f2-82a1-09f0701db087
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes

Risk assessment

  • Risk: medium-low (ML7)
  • Verdict: MERGE
  • Reviewed head: df73abc

Review report

VERDICT: MERGE
Round: 7
Head: df73abc
Slot: 1
CI: CI is not green
Session: 01a1d222-ecf0-73f2-82a1-09f0701db087

Risk

medium-low (ML7: additive, documented Maxwell public API on a separate solver path)

Blocking findings

  • Verdict: MERGE
  • Round: 7
  • Blocking priorities: none
  • Deferred P2 issues: None required; no blockers remain.

None. The prior blocker at examples/dipole/mesh.jl:137 is resolved: facet enumeration uses a local tetrahedron table. Running the independent converter comparison confirmed identical connectivity and facet sets. The delta changes no tests, tolerances, dependencies or solver formulas.

Non-blocking findings

None. The revised comment at src/maxwell/farfield.jl:181 correctly describes second-order theta integration; the measured refinement ratios were 4.000666 and 4.000167.

What I ran

  • Read the supplied delta since af48c1337d3a51230455da993c668f8033375b2b, the supplied round-six review, and the whole PR diff/source/tests for context. Confirmed the supplied delta exactly matches git diff af48c1337d3a51230455da993c668f8033375b2b HEAD. Root AGENTS.md and CLAUDE.md are absent. No PR discussion, author rating or earlier same-head opinion was read. Reviewer: codex-cli 0.164.0, model gpt-6.1-sol; actual local session is identified above (no session URL available).
  • Exported the requested TMPDIR and preserved the inherited layered JULIA_DEPOT_PATH. Tested an exact git archive HEAD copy under scratch/independent-01a1d222/repo; dependency writes and probes stayed outside the checkout. No tracked interpreter pin, Julia Manifest, Python project or uv.lock exists. julia --version printed 1.13.2. The required uv run --locked python --version printed Python 3.15.0, with the warning that --locked has no effect outside a project; this is not a locked project Python interpreter.
  • With four Julia threads, four precompile tasks, one BLAS thread and a 12 GiB systemd scope, ran GROUP=Maxwell julia --startup-file=no --project=<scratch-copy> -e 'using Pkg; Pkg.test(; allow_reresolve = false)'. Exit 0; 321/321 assertions passed: dipole 8, farfield 21, lumped 67, manufactured 4, model 98, ports 123. Observed lossless H(curl) rates 0.982079, 0.997302, lossy rates 0.967037, 0.993164, and Hertzian far-field relative error 0.0101047. Output: scratch/independent-01a1d222/maxwell-test.log.
  • Froze that run's resolved test Project/Manifest in scratch/independent-01a1d222/test-env. Ran julia --startup-file=no --project=<frozen-test-env> <scratch>/delta-probes.jl with one Julia/BLAS thread and a 4 GiB scope. Exit 0; 21/21 assertions passed. Compared the changed converter with public FerriteGmsh.togrid() on two touching-volume fixtures, one rotated and translated: each had 512 tetrahedra and 13 facet sets, with exactly equal nodes, cells, cell sets and facet sets. Each shared interface had 38 triangles listed twice; each exterior had 332 listed once. Constant-sphere integration errors at 36/72/144 theta points were 3.173803e-4, 7.933186e-5, 1.983214e-5. Resolved versions: Ferrite 1.7.0, FerriteGmsh 1.5.0, Gmsh 0.3.1; all queried FerriteGmsh conversion helpers are declared public. Script/output: scratch/independent-01a1d222/delta-probes.jl and delta-probes.log.
  • julia --startup-file=no --project=@runic -m Runic --check examples/dipole/mesh.jl src/maxwell/farfield.jl src/maxwell/model.jl src/maxwell/ports.jl, typos on those four delta files, and git diff --check origin/master...HEAD: exit 0. Final git status --porcelain=v1 was empty and HEAD remained the requested SHA.

What I did not verify

  • Full default/QA suites, documentation build, other supported Julia versions, and the opt-in FEM_MAXWELL_DIPOLE=1 full mesh.
  • Default-branch baseline tests or remote CI. The CI status in the header is supplied by the assignment; this verdict is review advice, not merge authorization.
  • No commits, pushes, GitHub posts or checkout edits were made. All commands started for this review have finished.

AUTHOR_GRADE: {"task":"feature","score":4,"difficulty":4,"rounds":7,"author_harness":"Claude Code 2.1.322","author_model":"claude-sonnet-5-5","note":"The delta resolves the prior non-public dependency access and corrects numerical explanations. All 321 affected assertions and 21 independent delta probes passed, including exact agreement with the public mesh converter on rotated and shared-interface meshes. Full QA, documentation and remote CI remain unverified."}

Head link: df73abc


🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol
Conversation: local session 01a1d222-ecf0-73f2-82a1-09f0701db087 (no session URL)

Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.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.

2 participants