tidy3d.QuasiUniformGrid#
- class QuasiUniformGrid[source]#
Bases:
AbstractAutoGridSimilar to
UniformGridthat generates uniform 1D grid, but grid positions are locally fine tuned to be snaped to snapping points and the edges of structure bounding boxes. Internally, it is using the same meshing method asAutoGrid, but it ignores material information in favor for a user-defined grid size.- Parameters:
max_scale (float = 1.4) – Sets the maximum ratio between any two consecutive grid steps.
mesher (
GradedMesher= GradedMesher()) – The type of mesher to use to generate the grid automatically.dl_min (Optional[NonNegativeFloat] = None) – [units = um]. Lower bound of the grid size along this dimension regardless of structures present in the simulation, including override structures with
enforced=True. It is a soft bound, meaning that the actual minimal grid size might be slightly smaller. IfNoneor 0, a heuristic lower bound value will be applied.dl (PositiveFloat) – [units = um]. Grid size for quasi-uniform grid generation. Grid size at some locations can be slightly smaller.
Example
>>> grid_1d = QuasiUniformGrid(dl=0.1)
See also
UniformGridUniform 1D grid.
AutoGridSpecification for non-uniform grid along a given dimension.
- Notebooks:
Attributes
max_scalemesherdl_minMethods
estimated_min_dl(wavelength, structure_list, ...)Estimated minimal grid size, which equals grid size here.
- dl#