load_forward_results#
- Project.load_forward_results(config_key: Any = None) None#
Reload a completed forward simulation file into the FDTD session.
compute_gradientreturns with the FDTD session in a freshly rebuilt base-setup state (no monitor data) because computing thedEps/dPJacobian requires reverting to a clean geometry. Callers that want to inspect monitor results after gradient computation – typically live visualizations such asGraphicalVisualizer– can use this method to restore the post-forward-simulation state.The
.fspfile written byset_fwd()already contains the recorded fields, so this is a fast disk load rather than a new simulation.- Parameters:
- config_key
hashable,optional Specific config to load. When
None(the default) the first config infom.config_mapis loaded, which is the common single-config case.
- config_key
- Raises:
RuntimeErrorIf the project has no FDTD session, the FOM/config map is missing, or the requested forward simulation file does not exist on disk yet (e.g.
compute_fomhas not been called).KeyErrorIf
config_keyis provided but not present in the config map.