gds_fdtd.convergence

gds_fdtd simulation toolbox.

Convergence sweeps: rerun one job while stepping a single SimulationSpec field (mesh, run_time_factor, buffer, …) and measure how much the S-matrix still moves between successive values. Generalizes the hand-rolled mesh sweeps of the legacy examples:

report = sweep(Tidy3DSolver, component, tech, spec,
               field="mesh", values=[6, 10, 14, 18],
               cache_dir=".cache")   # reruns are free
report.recommend(tol_db=0.05)        # first converged value
report.plot(savefig="convergence.png")

Functions

max_delta_db(a, b[, floor_db])

Worst-case |Δ|S|²| in dB between two S-matrices of the same job.

sweep(solver_cls, component[, technology, ...])

Run the same job at each spec.<field> = value and compare results.

Classes

ConvergenceReport(field, values, smatrices, ...)

Result of a convergence sweep over one SimulationSpec field.