tidy3d.components.grid.grid_spec.GridSpec1d

tidy3d.components.grid.grid_spec.GridSpec1d#

class GridSpec1d[source]#

Bases: Tidy3dBaseModel, ABC

Abstract base class, defines 1D grid generation specifications.

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, attrs are mutable. For example, the following is allowed for setting an attr obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a TypeError if attrs contain objects that can not be serialized. One can check if attrs are serializable by calling obj.json().

Attributes

attrs

Methods

make_coords(axis, structures, symmetry, ...)

Generate 1D coords to be used as grid boundaries, based on simulation parameters.

Inherited Common Usage

make_coords(axis, structures, symmetry, periodic, wavelength, num_pml_layers)[source]#

Generate 1D coords to be used as grid boundaries, based on simulation parameters. Symmetry, and PML layers will be treated here.

Parameters:
  • axis (Axis) – Axis of this direction.

  • structures (List[StructureType]) – List of structures present in simulation, the first one being the simulation domain.

  • symmetry (Tuple[Symmetry, Symmetry, Symmetry]) – Reflection symmetry across a plane bisecting the simulation domain normal to each of the three axes.

  • wavelength (float) – Free-space wavelength.

  • num_pml_layers (Tuple[int, int]) – number of layers in the absorber + and - direction along one dimension.

Returns:

1D coords to be used as grid boundaries.

Return type:

Coords1D

__hash__()#

Hash method.