tidy3d.plugins.invdes.InverseDesignMulti#
- class InverseDesignMulti[source]#
Bases:
AbstractInverseDesign
InverseDesign
with multiple simulations and corresponding postprocess functions.- Parameters:
attrs (dict = {}) β Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields,
attrs
are mutable. For example, the following is allowed for setting anattr
obj.attrs['foo'] = bar
. Also note that Tidy3D` will raise aTypeError
ifattrs
contain objects that can not be serialized. One can check ifattrs
are serializable by callingobj.json()
.design_region (TopologyDesignRegion) β Region within which we will optimize the simulation.
task_name (str) β Task name to use in the objective function when running the
JaxSimulation
.verbose (bool = False) β If
True
, will print the regular output fromweb
functions.simulations (Tuple[Simulation, ...]) β Set of simulation without the design regions or monitors used in the objective fn.
post_process_fn (Callable[[tidy3d.plugins.adjoint.components.data.sim_data.JaxSimulationData], float]) β
list
ofJaxSimulationData
instances corresponding to eachSimulation
in.simulations
. Should return afloat
contribution to the objective function.output_monitor_names (Optional[Tuple[Union[Tuple[str, ...], NoneType], ...]] = None) β Optional names of monitors whose data the differentiable output depends on.If this field is left
None
, the plugin will try to add all compatible monitors toJaxSimulation.output_monitors
. While this will work, there may be warnings if the monitors are not compatible with theadjoint
plugin, for example if there areFieldMonitor
instances with.colocate != False
.
Attributes
List of individual
InverseDesign
objects corresponding to this instance.construct the objective function for this
InverseDesign
object.Methods
to_simulation
(params)Convert the
InverseDesign
to a corresponding list of ``td.Simulation``s given params.to_simulation_data
(params,Β task_name,Β **kwargs)Convert the
InverseDesignMulti
to a set of ``td.Simulation``s and run async.Inherited Common Usage
- simulations#
- post_process_fn#
- output_monitor_names#
- property designs#
List of individual
InverseDesign
objects corresponding to this instance.
- property objective_fn#
construct the objective function for this
InverseDesign
object.
- to_simulation(params)[source]#
Convert the
InverseDesign
to a corresponding list of ``td.Simulation``s given params.
- to_simulation_data(params, task_name, **kwargs)[source]#
Convert the
InverseDesignMulti
to a set of ``td.Simulation``s and run async.
- __hash__()#
Hash method.