Repository navigation
Add a PDESystem front end for frequency-domain Maxwell - #82
xtalax-droid wants to merge 31 commits into
Conversation
FEMDiscretization(Ω, t; omega, spaces = Dict(E => Nedelec{RefTetrahedron, 1}())) now makes discretize read the time-domain curl-curl equation for a vector unknown off PDEBase's strong-form analysis, check its flux tensor is curl(ν curl E), sample the coefficients per cell and return the complex LinearProblem of the equivalent MaxwellModel. The perfect conductor n × E = 0 is written with facet_normal (PDEBase#164). Additive core methods: per-cell materials for MaxwellModel and a raw-load driven_problem. The operator-level model is the test oracle.
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>
…r Nedelec spaces
Codex r1: the component, isotropy and first-order checks ran at four sampled centroids, so a term confined to an unsampled region (h(x) E_2 in one equation) was silently dropped. They now run at every cell centroid, the same points the materials are sampled at, for three frequency-slot values; nonlinearity, time dependence and nonlinearity in the time derivatives are checked symbolically. A Nedelec space other than Nedelec{RefTetrahedron, 1}() is rejected instead of being replaced by it.
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>
Codex r2: a second derivative of a field-free expression lands in the StrongForm flux, which only its E-derivatives were read from, so it vanished from the load. Now the flux at E = 0 must be symbolically zero, flux, remainder and mass may not hold Hessian or time-derivative slots, time derivatives inside spatial derivatives are rejected (in the phasor walk, and as any frequency dependence of the second- and first-order coefficients), and the PEC data at E = 0 must be symbolically zero rather than at three sampled normals. Each case is rejected with its own message. 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>
Codex r3: the rank and tangentiality checks of the PEC conditions ran at three generic normals, so n[1] .* cross(n, E) .~ 0 on the cube's top face (n[1] = 0 there, no constraint) was imposed as full PEC. The linear map from the trace to the residuals is now evaluated at the outward normal of every facet of the piece, and must have rank 2 with n in its null space, i.e. be equivalent to n × E = 0 there. 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>
Resolve conflicts against the master sync of maxwell/1-core. 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>
The coupling tolerance was 1e-10 times the larger of the second-order and zeroth-order coefficients, so a large nu silently hid a coupling of the components of E in the zeroth-order term. It is now relative to the zeroth-order coefficients alone. 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>
… against nu The first-order checks used 1e-10 times the larger second-order or zeroth-order coefficient, so a first-order term of size 1 next to nu = 1e12 passed validation and was dropped from the model. No first-order term is allowed, so only roundoff (10 eps) of those coefficients is tolerated. 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>
The second-order checks used a tolerance that included the zeroth-order coefficients, so a large reaction coefficient hid a component-wise Laplacian beside curl(nu*curl(E)). The tolerance is now relative to the second-order coefficients alone. 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>
Conflicts in src/maxwell/model.jl resolved keeping both sides; on 2-eigen the facet table also covers the linear Lagrange space used by the eigen solver. 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>
Independent review (Codex CLI v0.164.0 / gpt-6.1-sol), reviewer session 01a1c8d2-99a9-7190-bb3c-beb132d84711, reviewed head 21a4fe9
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. Riskmedium (M1: adds a method of Ferrite/Tensors.curl on foreign AbstractVector/NTuple argument types, affecting another package's dispatch). Blocking findings
Non-blocking findings
What I ranIndependent AI review by codex-cli 0.164.0, model gpt-6.1-sol; the Session above is the actual local session ID (no session URL). Tests ran against an exact
What I did not verify
🤖 Posted by an AI agent — harness: Claude Code 2.1.322 · model: claude-sonnet-5-5 |
model.jl conflict resolved keeping both sides; on 2-eigen the linear Lagrange table is the shared facet node table. 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>
…acet normal, BigFloat omega range First-order terms, couplings of the components and per-component coefficients of E, dt E and dtt E are tested for exact symbolic zero (with only unit-scale roundoff beyond it), and the coefficients are compared across the equations order by order, so a large reaction coefficient no longer hides them. facet_normal builds its own symbolic normal when PDEBase has none, so the perfect-conductor tests run unconditionally. FEMDiscretization judges omega after conversion to Float64. Review-history labels are removed from a test comment. 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>
…ot representable a0/omega^2 overflows or is 0/0 for tiny omega and gave NaN operators; it is now an ArgumentError. 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>
…ation's own coefficients The absolute tolerance of the symbolic fallback depended on how an equation was scaled; it is now 100 eps of the largest coefficient of the same equation. 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>
Any tolerance relative to other coefficients, or to a unit, depends on how an equation is scaled and can hide a significant term, so a coefficient is zero only if it is symbolically zero or exactly zero at every cell centroid; also fixes the vertical concatenation of the scale list that the previous commit introduced. 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>
… eps a0/omega^2 below the smallest normal number was silently dropped next to a dominant curl-curl term; now an ArgumentError. 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>
|
Review feedback on this PR has been addressed on head Stacked on #74. 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 |
Independent review (Codex CLI v0.164.0 / gpt-6.1-sol), reviewer session 01a1ceeb-945c-7b60-8a8e-3c01416a9de6, reviewed head 8bcc28d
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 Riskmedium (M1: adds a symbolic-vector method to Ferrite.curl; additive Maxwell API and numerical assembly). Blocking findingsReview in progress; verdict pending executed checks. Non-blocking findingsPending. What I ranRisk recorded independently from the code diff before reading the provided previous-review.md. What I did not verifyPending. 🤖 Posted by an AI agent — harness: Claude Code 2.1.322 · model: claude-sonnet-5-5 |
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>
PR: #82 Reviewed head: 339563c Risk assessment
Review reportVERDICT: CHANGES Riskmedium (M1: adds a symbolic-vector method to Ferrite/Tensors.curl on foreign argument types, affecting another package's dispatch). Blocking findings
Non-blocking findingsNone. The delta at What I ranIndependent AI review by codex-cli 0.164.0, model gpt-6.1-sol, local session ID above; no session URL available. I recorded the independent risk in this file before reading the explicitly supplied previous-round report. Scope: supplied delta and unresolved prior blocker, with the whole PR diff for context. Neither AGENTS.md nor CLAUDE.md exists at the checkout root; the supplied instructions were applied. All Julia execution used an exact
What I did not verify
AUTHOR_GRADE: {"task":"feature","score":3,"difficulty":4,"rounds":3,"author_harness":"Claude Code 2.1.322","author_model":"claude-sonnet-5-5","note":"All 200 Maxwell assertions pass, and the delta's geometric facet tests detect eight incorrect table assignments without non-public Ferrite helpers. The prior anisotropy blocker remains reproducible: an exactly representable cancellation case is silently reduced to an isotropic operator and produces 71.4% relative error against an analytic constant solution."} Head link: 339563c 🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol |
The anisotropy check used a tolerance of 100 eps times the larger coefficient, so reactions 2^48 + c cancelling an inertia 2^46 at omega = 2 into diag(1, 2, 3) passed as isotropic and the equation was silently solved with one component's coefficient. Coefficients must now be equal as expressions or equal as numbers. 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>
PR: #82 Reviewed head: e25564c Risk assessment
Review reportVERDICT: MERGE Riskmedium (M1: extends Ferrite/Tensors.curl for symbolic vectors of foreign types, affecting another package's dispatch). Blocking findingsNone. The prior cancellation/anisotropy blocker is resolved at Non-blocking findingsNone. What I ranIndependent AI review using codex-cli 0.164.0, model gpt-6.1-sol, local session above (no session URL). Risk was recorded before any author rating. I read the supplied previous-round report, the whole PR diff for context, and the two-file delta; investigation focused on that delta and the prior blocker. Neither AGENTS.md nor CLAUDE.md exists at the checkout root. Tests used exact
What I did not verify
AUTHOR_GRADE: {"task":"feature","score":5,"difficulty":4,"rounds":4,"author_harness":"Claude Code 2.1.322","author_model":"claude-sonnet-5-5","note":"The delta resolves the prior anisotropy/cancellation blocker: an identical rejection assertion fails before and passes after. All 201 Maxwell assertions and 13 targeted assertions pass, including rescaling, one-ulp differences, both equality paths, and a valid scalar cancellation case checked against an analytic constant field."} Head link: e25564c 🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol |
PR: #82 Reviewed head: e25564c Risk assessment
Review reportVERDICT: CHANGES Riskmedium (M1: adds a method to Ferrite/Tensors' public curl function; also adds the documented Maxwell API, ML7). Blocking findings
Non-blocking findings
What I ran
What I did not verify
AUTHOR_GRADE: {"task":"feature","score":3,"difficulty":4,"rounds":5,"author_harness":"Claude Code 2.1.322","author_model":"claude-sonnet-5-5","note":"All 201 Maxwell and 167 affected existing frontend assertions passed, including independent manufactured-solution convergence. Targeted runtime probes nevertheless reproduced an 11.1% error in a supported scalar reaction equation, discarded second-order terms, and a time-slice boundary condition promoted to PEC."} REVIEWER_GRADE: {"task":"feature","score":2,"rounds":5,"reviewer_harness":"codex","reviewer_model":"gpt-6.1-sol","verdict":"missed","note":"The earlier review supplied concrete failing-before/passing-after evidence for the anisotropy fix and 201 passing Maxwell assertions, but its MERGE verdict missed three same-head runtime failures in the frozen independent report: 11.1% reaction error, silently discarded second-order terms beside large curl coefficients, and a time-zero boundary trace promoted to PEC."} Head link: e25564c 🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol |
…ents The reaction a2 - a0/omega^2 cancelled badly for large coefficients (relative error 0.11 on an exact constant field); the net a0 - omega^2 a2 is now formed in extended precision and divided once. The structural checks (grad div E, vector Laplacian, anisotropy, component choice) compared against a tolerance scaled by the largest coefficient, so -Laplacian E with coefficient 1 next to nu = 1e12 passed; they are decided symbolically from each term's own coefficient. The trace E(t, Gamma) of a boundary condition must use the time variable and its piece, so a condition at one time is no longer taken as a perfect conductor. The perfect-conductor rows are judged by their own norm. 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>
With omega = 1e154, a0 = 5 and a2 = 5e-308 the net reaction a0 - omega^2 a2 is 8.4e-17 but eps_r = -net/omega^2 underflows to zero and the reaction was silently dropped. The coefficient and the reaction assembly forms from it are checked against the exact net value, and a nonzero net that becomes zero, subnormal or non-finite is an ArgumentError. 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>
The cancellation used BigFloat at the caller's precision, so inside setprecision(BigFloat, 53) an exact net reaction of -1 (omega = 1 + 2^-30, a2 = 2^60, a0 = 2^60 + 2^31) rounded to zero and the reaction was dropped. The Float64 inputs are now combined as Rational{BigInt}, which is exact at any precision.
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>
PR: #82 Reviewed head: 20ca571 Risk assessment
Review reportVERDICT: CHANGES Riskmedium (M1: adds a method to Ferrite/Tensors' curl function; the documented additive Maxwell API also matches ML7). Blocking findings
Non-blocking findings
What I ran
What I did not verify
AUTHOR_GRADE: {"task":"feature","score":4,"difficulty":4,"rounds":6,"author_harness":"Claude Code 2.1.322","author_model":"claude-sonnet-5-5","note":"All 217 Maxwell assertions passed. Paired runtime probes confirm the three prior fixes and boundary-row scaling improvements, but the reaction guard still accepts a subnormal frequency square that produces a 19.04% field error. Additional frontend validation encountered a standalone-reproducible Ferrite error."} Head link: 20ca571 🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol |
With omega = 2e-162 the square rounds to the subnormal 5e-324, so assembly formed -4.94e-16 for an exact net reaction of -4e-16 (19% field error) while both eps_r and the reconstructed reaction were finite and nonzero. The reaction assembly forms (with omega squared rounded as it rounds it) is now compared with the exact rational net to 1e-10, and a subnormal omega squared or coefficient with a nonzero net is rejected. 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>
PR: #82 Reviewed head: 732f87c Risk assessment
Review reportVERDICT: CHANGES Riskmedium (M1: the full PR adds a method to Ferrite/Tensors' curl function; the documented additive Maxwell API also matches ML7). Blocking findings
Non-blocking findings
What I ran
What I did not verify
AUTHOR_GRADE: {"task":"feature","score":3,"difficulty":4,"rounds":7,"author_harness":"Claude Code 2.1.322","author_model":"claude-sonnet-5-5","note":"All 218 Maxwell assertions pass and the prior 19.04% field-error case is rejected. Paired runtime probes establish that the delta drops the subnormal-reaction rejection, accepting an equation whose assembled reaction and source both vanish and whose computed field has 100% error."} Head link: 732f87c 🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol |
With omega = 2^-511, nu = 1e-307 and a0 = 2^-1074 every scalar round trip is exact, yet the assembled reaction block and the load round to zero (100% field error). A subnormal reconstructed reaction is rejected again, and the assembled reaction entries and the load are checked for underflow to zero or subnormal values whenever the net reaction or a source is nonzero. 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>
…tude and omega Extreme-scale underflow cases were found one at a time (conductivity block, ε from the net reaction, ω squared, the assembled reaction and load). Every nonzero nu, a0, a1, a2 and source amplitude and omega must now lie in 1e-100..1e100 and the products ω² a2 and ω a1 in 1e-250..1e250, far wider than SI-unit physics, so that products with mesh quantities cannot underflow; outside it an ArgumentError names the coefficient and the window and asks for a nondimensionalised equation. The exact, round-trip and assembly checks stay as defence in depth. The window is documented in the maxwell_model docstring and the manual, with a copper-conductivity SI example as a regression. 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>
A source supported between the quadrature points integrates to an exactly zero load without any arithmetic underflow, and the window already keeps sources and mesh quantities from underflowing, so the check of the final load vector is removed. The assembled reaction check stays: it only looks at entries that are nonzero in the unscaled block. 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>
…after conversion The window check saw only the cell centroids, so a source supported around a quadrature point with a huge or subnormal amplitude bypassed it, and a finite BigFloat 1e400 passed the finiteness test before becoming Inf as a Float64. The load assembly now evaluates a validated source (window on every value) and values are converted to Float64 before the finiteness test. 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>
…sion BigFloat 1e-400 became an exact 0.0 before the window check, which exempts zero, so a nonzero source, reaction, conductivity or nu was silently erased. The shared conversion now rejects a nonzero value whose Float64 is zero or subnormal with the window error, after the finiteness test on the converted value. 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>
A parameter given as BigFloat 1e-400 became an exact 0.0 in _parameter_values before the coefficient and source checks, so a parameterised source, reaction or conductivity was silently erased, and 1e400 became Inf. The values are checked at the entry of the Maxwell front end: a nonzero value that converts to zero or subnormal is a window error naming the parameter, a non-finite one a finiteness error. 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>
Depends on #74 (this PR targets its branch) and SciML/PDEBase.jl#164.
Summary
A
PDESystemfront end for the frequency-domain Maxwell model of #74. WithFEMDiscretization(Ω, t; omega, spaces = Dict(E => Nedelec{RefTetrahedron, 1}())),discretizereads thetime-domain equation
for a vector unknown
@variables E(..)[1:3]off PDEBase's strong-form analysis, samples the coefficients percell, and returns the complex
LinearProblemthatdriven_problembuilds for the equivalentMaxwellModel(with
ε0 = μ0 = 1). It bypasses the scalar weak form, assembly and DAE path entirely.How the operator is recognised
The flux tensor
B[e,a,c,b] = ∂flux[e][a]/∂G[c,b]ofStrongForm.analysemust beν(δ_eb δ_ac − δ_ec δ_ab)with one scalarν(x). It is decomposed into its three isotropic parts andchecked at every cell centroid (the same points the materials are sampled at), which also words the errors: a vector Laplacian, a grad div term
(including the expanded
∂ᵢ∂ⱼEⱼ − ΔEᵢ), an anisotropic second-order part, first-order terms, cross-componentor anisotropic reaction terms, nonlinear terms, time-dependent coefficients or sources, field-free sources inside a derivative and time
derivatives nested in spatial ones each get their own message; nothing in the analysed equation is dropped
silently. Before the analysis,
Dt(E)andDt(Dt(E))are replaced by two frequency symbols, and the reactioncoefficient is split in them into
a₀ + s₁a₁ + s₂a₂. Each cell getsMaxwellMaterial(eps_r = a₂ − a₀/ω², mu_r = 1/ν, sigma = a₁)at its centroid; the load is∫ f ⋅ Nᵢ.The perfect conductor
n × E = 0is recognised from the conditions on each piece: linear in the traces, with zero data, and at the actual outward normal of every facet of the piecetangential (
C n = 0) and of rank 2, socross(n, E)andcross(E, n)are both acceptedand a single component, a single row of the cross product, inhomogeneous data or a derivative are rejected.
Pieces with no condition get the natural
n × (ν curl E) = 0.Additions to the #74 core (additive only)
MaxwellModel(grid; materials = ::Vector{MaxwellMaterial}), one material per cell.driven_problem(model, ω; load), a raw load vector instead of a current density.FEMDiscretization(…; omega);DAEProblem,NonlinearProblem,symbolic_discretizeandoperatorsreject it. A Nédélec space without
omegais rejected at construction.curl(F, (x, y, z))is a method of Ferrite's (Tensors')curl, re-exported, sousing FiniteElementMethod, Ferritehas onecurl. QA treats it as owned (piracy) and ignores its non-owner import.facet_normal(Γ)wrapsPDEBase.normal(Γ)under a name that does not clash with DomainSets'normal.maxwell_model(pdesys, disc) -> (; model, omega, load)exposes the model, forMaxwellSolution(model, omega, sol.u)andfield_values.Limitations
ε' − iε''has no real time-domain form here and stays onthe operator-level path.
Nedelec{RefTetrahedron, 1}()is accepted.tmust still be paired with an interval.Tests (
test/Maxwell/frontend.jl)ν,εrandσinx) with PEC on all faces gives the operator-leveldriven_problemmatrix exactly (relative difference 0.0) and its load to 1.1e-16; a case with parameters, areaction term
a₀and conductivity matches to 1e-12 too.1.00), evaluated through
MaxwellSolutionandfield_values.Without SciML/PDEBase.jl#164 the PEC cases cannot be written: the oracle test runs without PEC (natural
boundary everywhere), and the PEC cavity and boundary-condition tests are
@test_skipped, so CI on thereleased PDEBase stays green.
🤖 Posted by an AI agent · harness: Claude Code 2.1.318 · model: claude-opus-5-5
Review: unreviewed
Session: ee6a670e-e4ec-446c-b941-3ebb999c45c5