Metric example:
Resonance in a square dielectric cavity with two perpendicular port waveguides,
driver file:
sqrjunc.cpp
Snapshot of the physical optical electric field; the fundamental TE mode excites the resonator from the lower left channel: