gds_fdtd.caching¶
gds_fdtd simulation toolbox.
Simulation-result caching. A job is identified by a sha256
over a canonical JSON fingerprint of everything that determines its result:
component geometry (structures, ports, bounds), technology, SimulationSpec,
solver name and engine version. cached_run short-circuits repeat runs to
a stored SMatrix — the expensive run() executes at most once per
distinct job.
Results are stored as <solver>_<hash16>.npz via SMatrix.to_npz
(npz rather than HDF5 so the cache has zero optional dependencies).
Functions
|
|
|
Return the cached SMatrix for this exact job, running only on a miss. |
|
Everything about the geometry that affects a simulation result. |
|
The full canonical description of one simulation job. |
|
sha256 hex digest of the job fingerprint (the cache key). |