tidy3d.plugins.adjoint.JaxBox#
- class JaxBox[source]#
Bases:
JaxGeometry
,Box
,JaxObject
A
Box
registered 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,
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()
.center (Union[tuple[Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box]], Box] = (0.0, 0.0, 0.0)) β [units = um]. Center of object in x, y, and z.
size (Union[tuple[Union[pydantic.v1.types.NonNegativeFloat, autograd.tracer.Box], Union[pydantic.v1.types.NonNegativeFloat, autograd.tracer.Box], Union[pydantic.v1.types.NonNegativeFloat, autograd.tracer.Box]], Box]) β [units = um]. Size in x, y, and z directions.
center_jax (Tuple[Union[float, NumpyArrayType, Array, JVPTracer, object], Union[float, NumpyArrayType, Array, JVPTracer, object], Union[float, NumpyArrayType, Array, JVPTracer, object]] = (0.0, 0.0, 0.0)) β [units = um]. Jax traced value for the center of the box in (x, y, z).
size_jax (Tuple[Union[float, NumpyArrayType, Array, JVPTracer, object], Union[float, NumpyArrayType, Array, JVPTracer, object], Union[float, NumpyArrayType, Array, JVPTracer, object]]) β [units = um]. Jax-traced value for the size of the box in (x, y, z).
Attributes
Methods
store_vjp
(grad_data_fwd,Β grad_data_adj,Β ...)Stores the gradient of the box parameters given forward and adjoint field data.
Inherited Common Usage
- center_jax#
- size_jax#
- store_vjp(grad_data_fwd, grad_data_adj, grad_data_eps, sim_bounds, wvl_mat, eps_out, eps_in, num_proc=1)[source]#
Stores the gradient of the box parameters given forward and adjoint field data.
- __hash__()#
Hash method.