tidy3d.plugins.adjoint.JaxSimulationData#

class JaxSimulationData[source]#

Bases: SimulationData, JaxObject

A SimulationData registered with jax.

Parameters:
  • simulation (Attribute: simulation) –

    Type

    JaxSimulation

    Default

    Description

    The jax-compatible simulation corresponding to the data.

  • data (Attribute: data) –

    Type

    Tuple[Annotated[Union[tidy3d.components.data.monitor_data.FieldData, tidy3d.components.data.monitor_data.FieldTimeData, tidy3d.components.data.monitor_data.PermittivityData, tidy3d.components.data.monitor_data.ModeSolverData, tidy3d.components.data.monitor_data.ModeData, tidy3d.components.data.monitor_data.FluxData, tidy3d.components.data.monitor_data.FluxTimeData, tidy3d.components.data.monitor_data.FieldProjectionKSpaceData, tidy3d.components.data.monitor_data.FieldProjectionCartesianData, tidy3d.components.data.monitor_data.FieldProjectionAngleData, tidy3d.components.data.monitor_data.DiffractionData], FieldInfo(default=PydanticUndefined, discriminator=’type’, extra={})], …]

    Default

    Description

    List of MonitorData instances associated with the monitors of the original Simulation.

  • log (Attribute: log) –

    Type

    Optional[str]

    Default

    = None

    Description

    A string containing the log information from the simulation run.

  • diverged (Attribute: diverged) –

    Type

    bool

    Default

    = False

    Description

    A boolean flag denoting whether the simulation run diverged.

  • output_data (Attribute: output_data) –

    Type

    Tuple[Union[JaxModeData, JaxDiffractionData, JaxFieldData], …]

    Default

    = ()

    Description

    Tuple of Jax-compatible data associated with output monitors.

  • grad_data (Attribute: grad_data) –

    Type

    Tuple[FieldData, …]

    Default

    = ()

    Description

    Tuple of monitor data storing fields associated with the input structures.

  • grad_eps_data (Attribute: grad_eps_data) –

    Type

    Tuple[PermittivityData, …]

    Default

    = ()

    Description

    Tuple of monitor data storing epsilon associated with the input structures.

  • task_id (Attribute: task_id) –

    Type

    Optional[str]

    Default

    = None

    Description

    Optional field storing the task_id for the original JaxSimulation.

Attributes

grad_data_symmetry

self.grad_data but with symmetry_expanded_copy applied.

grad_eps_data_symmetry

self.grad_eps_data but with symmetry_expanded_copy applied.

monitor_data

Dictionary of .output_data monitor .name to the corresponding data.

output_monitor_data

Dictionary of .output_data monitor .name to the corresponding data.

data

log

Logging for Tidy3d.

Methods

from_sim_data(sim_data, jax_info[, task_id])

Construct a JaxSimulationData instance from a SimulationData.

make_adjoint_simulation(fwidth, run_time)

Make an adjoint simulation out of the data provided (generally, the vjp sim data).

normalize_adjoint_fields()

Make copy of jax_sim_data with grad_data (fields) normalized by adjoint sources.

split_data(mnt_data, jax_info)

Split list of monitor data into data, output_data, grad_data, and grad_eps_data.

split_fwd_sim_data(sim_data, jax_info)

Split a SimulationData into two parts, containing user and gradient data.

output_data#
grad_data#
grad_eps_data#
simulation#
task_id#
property grad_data_symmetry#

self.grad_data but with symmetry_expanded_copy applied.

property grad_eps_data_symmetry#

self.grad_eps_data but with symmetry_expanded_copy applied.

property output_monitor_data#

Dictionary of .output_data monitor .name to the corresponding data.

property monitor_data#

Dictionary of .output_data monitor .name to the corresponding data.

static split_data(mnt_data, jax_info)[source]#

Split list of monitor data into data, output_data, grad_data, and grad_eps_data.

classmethod from_sim_data(sim_data, jax_info, task_id=None)[source]#

Construct a JaxSimulationData instance from a SimulationData.

classmethod split_fwd_sim_data(sim_data, jax_info)[source]#

Split a SimulationData into two parts, containing user and gradient data.

make_adjoint_simulation(fwidth, run_time)[source]#

Make an adjoint simulation out of the data provided (generally, the vjp sim data).

normalize_adjoint_fields()[source]#

Make copy of jax_sim_data with grad_data (fields) normalized by adjoint sources.

__hash__()#

Hash method.