tidy3d.plugins.adjoint.JaxComplexPolySlab#
- class JaxComplexPolySlab[source]#
- Bases: - JaxPolySlab,- ComplexPolySlab- A - ComplexPolySlabregistered with jax.- 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, - attrsare mutable. For example, the following is allowed for setting an- attr- obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a- TypeErrorif- attrscontain objects that can not be serialized. One can check if- attrsare serializable by calling- obj.json().
- axis (Literal[0, 1, 2] = 2) β Specifies dimension of the planar axis (0,1,2) -> (x,y,z). 
- sidewall_angle (ConstrainedFloatValue = 0.0) β [units = rad]. Angle of the sidewall. - sidewall_angle=0(default) specifies a vertical wall;- 0<sidewall_angle<np.pi/2specifies a shrinking cross section along the- axisdirection; and- -np.pi/2<sidewall_angle<0specifies an expanding cross section along the- axisdirection.
- reference_plane (Literal['bottom', 'middle', 'top'] = middle) β The position of the plane where the supplied cross section are defined. The plane is perpendicular to the - axis. The plane is located at the- bottom,- middle, or- topof the geometry with respect to the axis. E.g. if- axis=1,- bottomrefers to the negative side of the y-axis, and- toprefers to the positive side of the y-axis.
- slab_bounds (Tuple[float, float]) β [units = um]. Minimum and maximum positions of the slab along axis dimension. 
- dilation (float = 0.0) β [units = um]. Dilation of the supplied polygon by shifting each edge along its normal outwards direction by a distance; a negative value corresponds to erosion. 
- vertices (Union[ArrayLike[dtype=float, ndim=2], Box]) β [units = um]. List of (d1, d2) defining the 2 dimensional positions of the polygon face vertices at the - reference_plane. The index of dimension should be in the ascending order: e.g. if the slab normal axis is- axis=y, the coordinate of the vertices will be in (x, z)
- vertices_jax (Tuple[Tuple[Union[float, tidy3d.plugins.adjoint.components.types.NumpyArrayType, jax.Array, jax._src.interpreters.ad.JVPTracer, object], Union[float, tidy3d.plugins.adjoint.components.types.NumpyArrayType, jax.Array, jax._src.interpreters.ad.JVPTracer, object]], ...]) β [units = um]. Jax-traced list of (d1, d2) defining the 2 dimensional positions of the polygon face vertices at the - reference_plane. The index of dimension should be in the ascending order: e.g. if the slab normal axis is- axis=y, the coordinate of the vertices will be in (x, z)
- slab_bounds_jax (Tuple[Union[float, NumpyArrayType, Array, JVPTracer, object], Union[float, NumpyArrayType, Array, JVPTracer, object]]) β [units = um]. Jax-traced list of (h1, h2) defining the minimum and maximum positions of the slab along the - axisdimension.
- sidewall_angle_jax (Union[float, NumpyArrayType, Array, JVPTracer, object] = 0.0) β [units = um]. Jax-traced float defining the sidewall angle of the slab along the - axisdimension.
 
 - Attributes - Divide a complex jax polyslab into a list of simple polyslabs, which are assembled into a - JaxGeometryGroup.- Divide a complex polyslab into a list of simple polyslabs. - Methods - Turn off the validation for this class. - Inherited Common Usage - classmethod no_self_intersecting_polygon_during_extrusion(val, values)[source]#
- Turn off the validation for this class. 
 - property geometry_group#
- Divide a complex jax polyslab into a list of simple polyslabs, which are assembled into a - JaxGeometryGroup.- Returns:
- JaxGeometryGroup for a list of simple jax polyslabs divided from the complex polyslab. 
- Return type:
- JaxGeometryGroup
 
 - property sub_polyslabs#
- Divide a complex polyslab into a list of simple polyslabs. Only neighboring vertex-vertex crossing events are treated in this version. - Returns:
- A list of simple jax polyslabs. 
- Return type:
- List[JaxPolySlab] 
 
 - __hash__()#
- Hash method.