set_adj#

Project.set_adj(params: ndarray = None) str#

Generate the files for the adjoint simulations to run.

params is accepted for API symmetry with set_fwd() but is intentionally unused here: each adjoint file is built by loading the already-saved forward .fsp (which already contains the base setup, applied config, and geometry at the current parameters) and only changing the source/port settings. The expectation is that set_fwd() was called with the same params immediately before set_adj() – this is what compute_gradient() does internally.

Parameters:
paramsnp.ndarray, optional

Unused. Geometry comes from the forward simulation file.