tidy3d
tidy3d copied to clipboard
Auto-set `Simulation.simulation_type` based on kwarg to `web.run()`
The simulation_type kwarg determines how the simulation gets run on the background.
There's now a field Simulation.simulation_type that adds this flag and is needed for the autograd to differentiate between regular and fwd adjoint tasks for caching purposes.
It would be more robust perhaps if the web.upload() had some logic to either strip this from the Simulation or kwarg, make sure they are consistent, and ultimately place the data in the Simulation.
Would require some backend changes too to use the simulation field, instead of the webapi kwarg.