tidy3d.EMEUniformGrid#
- class EMEUniformGrid[source]#
Bases:
EMEGridSpec
Specification for a uniform EME grid.
- 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()
.num_cells (PositiveInt) โ Number of cells in the uniform EME grid.
mode_spec (EMEModeSpec) โ Mode specification for the uniform EME grid.
Example
>>> from tidy3d import EMEModeSpec >>> mode_spec = EMEModeSpec(num_modes=10) >>> eme_grid = EMEUniformGrid(num_cells=10, mode_spec=mode_spec)
Attributes
Methods
make_grid
(center,ย size,ย axis)Generate EME grid from the EME grid spec.
Inherited Common Usage
- num_cells#
- mode_spec#
- make_grid(center, size, axis)[source]#
Generate EME grid from the EME grid spec.
- Parameters:
center (
Coordinate
) โ Center of the EME simulation.size (
Size
) โ Size of the EME simulation.axis (
Axis
) โ Propagation axis for the EME simulation.
- Returns:
An EME grid dividing the EME simulation into cells, as defined by the EME grid spec.
- Return type:
- __hash__()#
Hash method.