flex_rf.tidy3d.Grid
Type: class │ Base(s): Tidy3dBaseModel
Description
Section titled “Description”Contains all information about the spatial positions of the FDTD grid.
Example(s)
Section titled “Example(s)”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)grid = Grid(boundaries=coords)centers = grid.centerssizes = grid.sizesyee_grid = grid.yeeParameters
Section titled “Parameters”boundaries [Coords] |
|
x,y,z coordinates of the boundaries between cells, defining the FDTD grid. |
Attributes
Section titled “Attributes”centers [Coords] |
|
Return centers of the cells in the |
fine_mesh_info [dict[tuple[str, float], float]] |
|
Return locations where cell sizes are minimal or near-minimal. |
info [dict] |
|
Dictionary collecting various properties of the grids. |
max_size [float] |
|
Return maximal cells size in all dimensions. |
min_size [float] |
|
Return minimal cells size in all dimensions. |
num_cells [tuple[int, int, int]] |
|
Return sizes of the cells in the |
sizes [Coords] |
|
Return sizes of the cells in the |
yee [YeeGrid] |
|
Return the |
Methods
Section titled “Methods”discretize_inds(box: Box, extend: bool = False, relax_precision: bool = False) |
|
Start and stopping indexes for the cells that intersect with a |
extended_subspace(axis: Axis, ind_beg: int = 0, ind_end: int = 0, periodic: bool = True) |
|
Pick a subspace of 1D boundaries within |
snap_to_box_zero_dim(box: Box) |
|
Snap a grid to an exact box position for dimensions for which the box is size 0. If the box location is outside of the grid, an error is raised. |