tidy3d.YeeGrid
tidy3d.YeeGrid#
- class tidy3d.YeeGrid#
Holds the yee grid coordinates for each of the E and H positions.
- Parameters
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
Show JSON schema
{ "title": "YeeGrid", "description": "Holds the yee grid coordinates for each of the E and H positions.\n\nParameters\n----------\nE : FieldGrid\n Coordinates of the locations of all three components of the electric field.\nH : FieldGrid\n Coordinates of the locations of all three components of the magnetic field.\n\nExample\n-------\n>>> x = np.linspace(-1, 1, 10)\n>>> y = np.linspace(-1, 1, 11)\n>>> z = np.linspace(-1, 1, 12)\n>>> coords = Coords(x=x, y=y, z=z)\n>>> field_grid = FieldGrid(x=coords, y=coords, z=coords)\n>>> yee_grid = YeeGrid(E=field_grid, H=field_grid)\n>>> Ex_coords = yee_grid.E.x", "type": "object", "properties": { "E": { "title": "Electric Field Grid", "description": "Coordinates of the locations of all three components of the electric field.", "allOf": [ { "$ref": "#/definitions/FieldGrid" } ] }, "H": { "title": "Electric Field Grid", "description": "Coordinates of the locations of all three components of the magnetic field.", "allOf": [ { "$ref": "#/definitions/FieldGrid" } ] }, "type": { "title": "Type", "default": "YeeGrid", "enum": [ "YeeGrid" ], "type": "string" } }, "required": [ "E", "H" ], "additionalProperties": false, "definitions": { "Coords": { "title": "Coords", "description": "Holds data about a set of x,y,z positions on a grid.\n\nParameters\n----------\nx : Array\n 1-dimensional array of x coordinates.\ny : Array\n 1-dimensional array of y coordinates.\nz : Array\n 1-dimensional array of z coordinates.\n\nExample\n-------\n>>> x = np.linspace(-1, 1, 10)\n>>> y = np.linspace(-1, 1, 11)\n>>> z = np.linspace(-1, 1, 12)\n>>> coords = Coords(x=x, y=y, z=z)", "type": "object", "properties": { "x": { "title": "Array Like", "description": "Accepts sequence (tuple, list, numpy array) and converts to tuple.", "type": "tuple", "properties": {}, "required": [] }, "y": { "title": "Array Like", "description": "Accepts sequence (tuple, list, numpy array) and converts to tuple.", "type": "tuple", "properties": {}, "required": [] }, "z": { "title": "Array Like", "description": "Accepts sequence (tuple, list, numpy array) and converts to tuple.", "type": "tuple", "properties": {}, "required": [] }, "type": { "title": "Type", "default": "Coords", "enum": [ "Coords" ], "type": "string" } }, "required": [ "x", "y", "z" ], "additionalProperties": false }, "FieldGrid": { "title": "FieldGrid", "description": "Holds the grid data for a single field.\n\nParameters\n----------\nx : Coords\n x,y,z coordinates of the locations of the x-component of a vector field.\ny : Coords\n x,y,z coordinates of the locations of the y-component of a vector field.\nz : Coords\n x,y,z coordinates of the locations of the z-component of a vector field.\n\nExample\n-------\n>>> x = np.linspace(-1, 1, 10)\n>>> y = np.linspace(-1, 1, 11)\n>>> z = np.linspace(-1, 1, 12)\n>>> coords = Coords(x=x, y=y, z=z)\n>>> field_grid = FieldGrid(x=coords, y=coords, z=coords)", "type": "object", "properties": { "x": { "title": "X Positions", "description": "x,y,z coordinates of the locations of the x-component of a vector field.", "allOf": [ { "$ref": "#/definitions/Coords" } ] }, "y": { "title": "Y Positions", "description": "x,y,z coordinates of the locations of the y-component of a vector field.", "allOf": [ { "$ref": "#/definitions/Coords" } ] }, "z": { "title": "Z Positions", "description": "x,y,z coordinates of the locations of the z-component of a vector field.", "allOf": [ { "$ref": "#/definitions/Coords" } ] }, "type": { "title": "Type", "default": "FieldGrid", "enum": [ "FieldGrid" ], "type": "string" } }, "required": [ "x", "y", "z" ], "additionalProperties": false } } }
- attribute E: tidy3d.components.grid.grid.FieldGrid [Required]#
Coordinates of the locations of all three components of the electric field.
- attribute H: tidy3d.components.grid.grid.FieldGrid [Required]#
Coordinates of the locations of all three components of the magnetic field.
- property grid_dict#
The Yee grid coordinates associated to various field components as a dictionary.