tidy3d.YeeGrid#
- class YeeGrid[source]#
Bases:
Tidy3dBaseModelHolds the yee grid coordinates for each of the E and H positions.
- 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 anattrobj.attrs['foo'] = bar. Also note that Tidy3D` will raise aTypeErrorifattrscontain objects that can not be serialized. One can check ifattrsare serializable by callingobj.json().E (FieldGrid) β Coordinates of the locations of all three components of the electric field.
H (FieldGrid) β Coordinates of the locations of all three components of the magnetic field.
Example
>>> x = np.linspace(-1, 1, 10) >>> y = np.linspace(-1, 1, 11) >>> z = np.linspace(-1, 1, 12) >>> coords = Coords(x=x, y=y, z=z) >>> field_grid = FieldGrid(x=coords, y=coords, z=coords) >>> yee_grid = YeeGrid(E=field_grid, H=field_grid) >>> Ex_coords = yee_grid.E.x
Attributes
Methods
Inherited Common Usage
- E#
- H#
- property grid_dict#
The Yee grid coordinates associated to various field components as a dictionary.
- __hash__()#
Hash method.