tidy3d.plugins.adjoint.JaxStructure#

class tidy3d.plugins.adjoint.JaxStructure#

A Structure registered with jax.

Parameters
  • geometry (Union[JaxBox, JaxPolySlab]) – Geometry of the structure, which is jax-compatible.

  • name (Optional[str] = None) – Optional name for the structure.

  • medium (Union[JaxMedium, JaxAnisotropicMedium, JaxCustomMedium]) – Medium of the structure, which is jax-compatible.

Show JSON schema
{
   "title": "JaxStructure",
   "description": "Parameters\n----------\ngeometry : Optional[Any] = None\n        name : Optional[str] = None\n    Optional name for the structure.\nmedium : Optional[Any] = None\n    ",
   "type": "object",
   "properties": {
      "type": {
         "title": "Type",
         "default": "JaxStructure",
         "enum": [
            "JaxStructure"
         ],
         "type": "string"
      },
      "geometry": {
         "title": "Geometry"
      },
      "name": {
         "title": "Name",
         "description": "Optional name for the structure.",
         "type": "string"
      },
      "medium": {
         "title": "Medium"
      }
   },
   "additionalProperties": false
}

attribute geometry: Union[tidy3d.plugins.adjoint.components.geometry.JaxBox, tidy3d.plugins.adjoint.components.geometry.JaxPolySlab] [Required]#

Geometry of the structure, which is jax-compatible.

attribute medium: Union[tidy3d.plugins.adjoint.components.medium.JaxMedium, tidy3d.plugins.adjoint.components.medium.JaxAnisotropicMedium, tidy3d.plugins.adjoint.components.medium.JaxCustomMedium] [Required]#

Medium of the structure, which is jax-compatible.

classmethod from_structure(structure: tidy3d.components.structure.Structure) tidy3d.plugins.adjoint.components.structure.JaxStructure#

Convert Structure to JaxStructure.

make_grad_monitors(freq: float, name: str) tidy3d.components.monitor.FieldMonitor#

Return gradient monitor associated with this object.

store_vjp(grad_data_fwd: tidy3d.components.data.monitor_data.FieldData, grad_data_adj: tidy3d.components.data.monitor_data.FieldData, grad_data_eps: tidy3d.components.data.monitor_data.PermittivityData, sim_bounds: Tuple[Tuple[float, float, float], Tuple[float, float, float]]) tidy3d.plugins.adjoint.components.structure.JaxStructure#

Returns the gradient of the structure parameters given forward and adjoint field data.

to_structure() tidy3d.components.structure.Structure#

Convert JaxStructure instance to Structure