tidy3d.CustomGrid#
- class CustomGrid[source]#
Bases:
GridSpec1dCustom 1D grid supplied as a list of grid cell sizes centered on the simulation center.
- Parameters:
dl (Attribute:
dl) –TypeTuple[PositiveFloat, …]
DefaultUnitsum
DescriptionAn array of custom nonuniform grid sizes. The resulting grid is centered on the simulation center such that it spans the region
(center - sum(dl)/2, center + sum(dl)/2), unless acustom_offsetis given. Note: if supplied sizes do not cover the simulation size, the first and last sizes are repeated to cover the simulation domain.custom_offset (Attribute:
custom_offset) –TypeOptional[float]
Default= None
Unitsum
DescriptionThe starting coordinate of the grid which defines the simulation center. If
None, the simulation center is set such that it spans the region(center - sum(dl)/2, center + sum(dl)/2).
Example
>>> grid_1d = CustomGrid(dl=[0.2, 0.2, 0.1, 0.1, 0.1, 0.2, 0.2])
Attributes
Methods
- dl#
- custom_offset#
- __hash__()#
Hash method.