A Gaussian process (GP) framework for modeling 3D time-harmonic electromagnetic fields constrained by Maxwell's equations, built on JAX. The prior is an Ehrenpreis-Palamodov plane-wave feature map, so every sample and the posterior mean satisfy the homogeneous Maxwell system exactly; only the data (boundary or interior field observations) are fit.
This is the general-purpose solver core. The cavity-specific physics and the reaction-operator assembly live in cavity-epgp, which depends on this package.
MaxwellKernel(n_spectral, wavenumber, trace=..., key=...)plane-wave feature map;trace="tangential"conditions on the tangential trace.GaussianProcess(kernel, log_noise=...)the regression core: marginal likelihood (nlml) andcondition(X, Y).GaussianProcessPosteriorposteriormean,cov,vargiven feature evaluations.
A field point is a 3-vector; conditioning points carry a normal (a 6-vector,
position and normal stacked). The model predicts the 6-vector field [E, B].
uv run python examples/basic.pyexamples/basic.py fits a known plane-wave superposition from sampled points and
reports the recovered-field RMSE, exercising the kernel, marginal-likelihood
training, and posterior mean.
uv run ruff check
uv run pyright