Metric example:
Resonance in a square dielectric cavity with two parallel port waveguides,
driver file:
sqrres.cpp
Snapshot of the physical optical electric field; the fundamental TE mode is launched in the lower left channel: