tidy3d.plugins.invdes.TopologyDesignRegion#
- class TopologyDesignRegion[source]#
- Bases: - DesignRegion- Design region as a pixellated permittivity grid. - 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 an- attr- obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a- TypeErrorif- attrscontain objects that can not be serialized. One can check if- attrsare serializable by calling- obj.json().
- size (Tuple[NonNegativeFloat, NonNegativeFloat, NonNegativeFloat]) – [units = um]. Size in x, y, and z directions. 
- center (Tuple[float, float, float]) – [units = um]. Center of object in x, y, and z. 
- eps_bounds (Tuple[float, float]) – Minimum and maximum relative permittivity expressed to the design region. 
- transformations (Tuple[FilterProject, ...] = ()) – Transformations that get applied from first to last on the parameter array.The end result of the transformations should be the material density of the design region . With floating point values between (0, 1), 0 corresponds to the minimum relative permittivity and 1 corresponds to the maximum relative permittivity. Specific permittivity values given the density array are determined by - eps_bounds.
- penalties (Tuple[ErosionDilationPenalty, ...] = ()) – Set of penalties that get evaluated on the material density. Note that the penalties are applied after - transformationsare applied. Penalty weights can be set inside of the penalties directly through the- .weightfield.
- pixel_size (PositiveFloat) – Pixel size of the design region in x, y, z. For now, we only support the same pixel size in all 3 dimensions. If - TopologyDesignRegion.override_structure_dlis left- None, the- pixel_sizewill determine the FDTD mesh size in the design region. Therefore, if your pixel size is large compared to the FDTD grid size, we recommend setting the- override_structure_dldirectly to a value on the same order as the grid size.
- override_structure_dl (Union[PositiveFloat, Literal[False]] = None) – Defines grid size when adding an - override_structureto the- JaxSimulation.grid_speccorresponding to this design region. If left- None,- invdeswill mesh the simulation with the same resolution as the- pixel_size. This is advised if the pixel size is relatively close to the FDTD grid size. Supplying- Falsewill completely leave out the override structure.
 
 - Attributes - Coordinates for the custom medium corresponding to this design region. - Generate mesh override structure for this - DesignRegionusing- pixel_sizestep.- Convenience for generating random parameters of all 0.5 values with correct shape. - Convenience for generating random parameters of all 1 values with correct shape. - Convenience for generating random parameters between (0,1) with correct shape. - Shape of the parameters array in (x, y, z), given the - pixel_sizeand bounds.- Convenience for generating random parameters of all 0 values with correct shape. - Methods - eps_values(params)- Values for the custom medium permittivity. - evaluate_penalty(penalty, material_density)- Evaluate an erosion-dilation penalty, passing in pixel_size. - evaluate_transformation(transformation, params)- Evaluate a transformation, passing in design_region_dl. - params_uniform(value)- Make an array of parameters with all the same value. - to_structure(params)- Convert this - DesignRegioninto a custom- JaxStructure.- Inherited Common Usage - pixel_size#
 - transformations#
 - penalties#
 - override_structure_dl#
 - property params_shape#
- Shape of the parameters array in (x, y, z), given the - pixel_sizeand bounds.
 - property params_random#
- Convenience for generating random parameters between (0,1) with correct shape. 
 - property params_zeros#
- Convenience for generating random parameters of all 0 values with correct shape. 
 - property params_half#
- Convenience for generating random parameters of all 0.5 values with correct shape. 
 - property params_ones#
- Convenience for generating random parameters of all 1 values with correct shape. 
 - property coords#
- Coordinates for the custom medium corresponding to this design region. 
 - property mesh_override_structure#
- Generate mesh override structure for this - DesignRegionusing- pixel_sizestep.
 - evaluate_transformation(transformation, params)[source]#
- Evaluate a transformation, passing in design_region_dl. 
 - evaluate_penalty(penalty, material_density)[source]#
- Evaluate an erosion-dilation penalty, passing in pixel_size. 
 - __hash__()#
- Hash method.