Feature status#

Draft Established by reading the code at commit 7c348a7 (2026-11-11), ports and removed files updated at commit 72fb8c6 (2026-11-27); test suite re-run at commit 72fb8c6 (2026-11-27).

The state of every feature of the solver, including what does not work. A feature is Stable when it is covered by automated tests, Experimental when it works but is not covered, Known issue when a result is known to be wrong, Not functional when the code does not run.

Features#

Feature

Status

Code

Notes

Mesh topology, RWG pairs, junctions

Stable

harmolab/rwg/rwg1.py, rwg2.py

See RWG basis functions.

Impedance matrix (EFIE, singular quadrature)

Stable

harmolab/utils/impedance/impmet.py, harmolab/utils/quadrature/, harmolab/rwg/rwg3.py

Regression, normalisation, reciprocity and CPU/GPU tests.

GPU assembly (CuPy)

Stable

harmolab/utils/impedance/compute_backend.py, impmet.impedance_matrix_z_sweep_gpu

Automatic above 100 edges when a CUDA GPU is usable.

Ports: enhanced gap, delta gap on a cut, delta gap on one edge

Stable

harmolab/utils/ports/

test/test_ports_package.py, test_ports_specs.py, test_ports_unified.py, test_gap_source.py, test_gap_source_partial.py. See Ports.

Radiation (one or several ports)

Stable

harmolab/src/radiation_algorithm/, rwg4.py

Multi-port power budget: see known issues.

Frequency sweep, port impedance and reflection

Stable

harmolab/utils/frequency_sweep.py

Reflection coefficients are active values (all ports driven together), not the full S-matrix.

Lumped R, L, C loads

Experimental

rwg3.calculate_z_matrice_lumped_elements

Only the CPU/GPU consistency is tested (test_rwg3_gpu_dispatch.py); no test checks the effect of a load on the result. Sweeps with loads fall back to one full simulation per frequency.

Lossy conductors (surface impedance)

Known issue

harmolab/utils/impedance/lossy_electric_conductor.py, impmet.rwg_gram_matrix

Radiation efficiency incorrect (lossy_antenna/copper_antenna.ipynb).

Scattering by a plane wave

Stable

harmolab/src/scattering_algorithm/scattering_algorithm.py

Restored on 2026-11-11 (it raised a TypeError before), covered by test/test_scattering_algorithm.py.

Fields, patterns, polarisation, RCS

Experimental

harmolab/efield/, harmolab/utils/fields/dipole_parameters.py

Used by the example notebooks; the old tests (test_efield1-3) no longer run. The printed “Gain” of efield2 is a directivity.

Characteristic modes (one frequency and sweep, tracking, reports)

Stable

harmolab/cma/

TECACorrection is registered but deliberately not implemented.

Reduced multiport and optimisation

Stable

harmolab/optim/

86 tests in test/optim/. Limits listed in harmolab/optim/README.md.

Adaptive mesh refinement

Experimental

harmolab/utils/refinement/ (error_estimator.py, h_refinement_func.py, h_refinement_loop.py)

Not covered by tests.

Graphical interface

Planned

interface/

Empty for now; main.py only prints how to use the Python API.

Known issues#

Multi-port gap sources: power budget. With several ports excited by the enhanced gap source, the radiated power does not equal the input power. Reference notebook: harmolab/antenna_simulation/gap_voltage_implementation/strip_gap_radiation.ipynb. (The issue was reported with the former multiple_gap_sources. The new ports satisfy the input-side identity exactly, \(\sum_p P_p = \tfrac12\mathrm{Re}\{V^\mathsf T I^*\}\) for non-overlapping ports, see Ports; the radiated side has not been re-examined.)

Enhanced gap narrower than the conductor. When the gap window (a cube of side \(W\)) is narrower than the conductor, only the part of the gap cross-section inside the cube is fed. Since the exact integration of commit 52b5eb6, a cell that spans the whole width is fed in proportion, so on a strip one cell wide \(Z_\mathrm{in}\) is multiplied by about \((w/W)^2\): 355 + 180j Ω instead of about 90 Ω for the 5 cm strip of Ding et al. with \(W\) = 25 mm. GapSourceWarning is emitted. Keep \(W\) at least as wide as the conductor (Excitations and input impedance, Ports: feeding an antenna).

Removed. harmolab/src/scattering_algorithm/scattering_from_E_field_antenna.py (not functional) and harmolab/utils/efield_1_sweep.py were removed with the port refactoring, as were 14 example notebooks of harmolab/antenna_simulation/radiation_antenna/ built on Makarov’s meshes.

Lossy conductors: efficiency. The radiation efficiency computed for lossy antennas is wrong. Reference notebook: harmolab/antenna_simulation/lossy_antenna/copper_antenna.ipynb.

Free-space constant. \(\mu_0\) is taken as \(1.257\times10^{-6}\) H/m instead of \(4\pi\times10^{-7}\) H/m, a relative difference of about \(3\times10^{-4}\), the same value in every module.

Test suite#

At commit 72fb8c6 (python -m pytest test/ solver/, with a GPU, 2026-11-27): 626 tests pass, 2 are skipped, 2 fail. (At commit a6a4cfd: 563 pass, 2 skipped, the same 2 failures; without CuPy, python -m pytest test/ on a fresh install then gave 218 passed, 2 skipped.)

  • test_impedance_matrix_matches_golden (2 cases): the frozen values were computed with the former fill_mode="mirror"; the default is now "full_sym", checked by test_impedance_fill_mode.py.

test_cma_frequency_sweep_tracks_a_real_structure used to fail once in a while: its gmsh mesh changes from run to run when gmsh uses several threads (see Numerical limits and conditioning), and it compared two numbers that can be equal to the last digit with a strict inequality. The comparison now allows equality up to rounding (commit 5738844).

Nine early scripts in test/ are excluded from collection (test/conftest.py): they need .mat files that are not in the repository.