setup_adjoint_simulation#
- FieldFom.setup_adjoint_simulation(fdtd_session: FdtdSession, sources: list, sim_result: FieldResults) None#
Configure the FDTD session for an adjoint field simulation.
Reads and conjugates the forward E-field from
sim_result, switches the session to layout mode, disables all forward sources, enables source mode on the monitor associated withsim_result, and configures that adjoint source with the conjugated forward E-field.- Parameters:
- fdtd_session
FdtdSession Active FDTD session to modify. Must be in analysis mode with forward-simulation results.
- sources
list List of forward source descriptors (source_type, source_name) to disable.
- sim_result
FieldResults Simulation result whose monitor will be switched to source mode.
- fdtd_session
- Raises:
RuntimeErrorIf disabling the forward sources fails.
RuntimeErrorIf switching the monitor to source mode fails.