tidy3d.CustomGridBoundaries#
- class CustomGridBoundaries[source]#
Bases:
GridSpec1dCustom 1D grid supplied as a list of grid cell boundary coordinates.
- 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().coords (ArrayLike[dtype=float, ndim=1]) – [units = um]. An array of grid boundary coordinates.
Example
>>> grid_1d = CustomGridBoundaries(coords=[-0.2, 0.0, 0.2, 0.4, 0.5, 0.6, 0.7])
Attributes
Methods
estimated_min_dl(wavelength, structure_list, ...)Minimal grid size from grid specification.
Inherited Common Usage
- coords#
- estimated_min_dl(wavelength, structure_list, sim_size)[source]#
Minimal grid size from grid specification.
- Parameters:
wavelength (float) – Wavelength to use for the step size and for dispersive media epsilon.
structure_list (List[Structure]) – List of structures present in the simulation.
sim_size (Tuple[float, 3]) – Simulation domain size.
- Returns:
Minimal grid size from grid specification.
- Return type:
float
- __hash__()#
Hash method.