tidy3d.AutoGrid
tidy3d.AutoGrid#
- class tidy3d.AutoGrid#
Specification for non-uniform grid along a given dimension.
- Parameters
min_steps_per_wvl (ConstrainedFloatValue = 10.0) – Minimal number of steps per wavelength in each medium.
max_scale (ConstrainedFloatValue = 1.4) – Sets the maximum ratio between any two consecutive grid steps.
mesher (GradedMesher = GradedMesher(type='GradedMesher')) – The type of mesher to use to generate the grid automatically.
Example
>>> grid_1d = AutoGrid(min_steps_per_wvl=16, max_scale=1.4)
Show JSON schema
{ "title": "AutoGrid", "description": "Specification for non-uniform grid along a given dimension.\n\nParameters\n----------\nmin_steps_per_wvl : ConstrainedFloatValue = 10.0\n Minimal number of steps per wavelength in each medium.\nmax_scale : ConstrainedFloatValue = 1.4\n Sets the maximum ratio between any two consecutive grid steps.\nmesher : GradedMesher = GradedMesher(type='GradedMesher')\n The type of mesher to use to generate the grid automatically.\n\nExample\n-------\n>>> grid_1d = AutoGrid(min_steps_per_wvl=16, max_scale=1.4)", "type": "object", "properties": { "type": { "title": "Type", "default": "AutoGrid", "enum": [ "AutoGrid" ], "type": "string" }, "min_steps_per_wvl": { "title": "Minimal number of steps per wavelength", "description": "Minimal number of steps per wavelength in each medium.", "default": 10.0, "minimum": 6.0, "type": "number" }, "max_scale": { "title": "Maximum Grid Size Scaling", "description": "Sets the maximum ratio between any two consecutive grid steps.", "default": 1.4, "exclusiveMaximum": 2.0, "minimum": 1.2, "type": "number" }, "mesher": { "title": "Grid Construction Tool", "description": "The type of mesher to use to generate the grid automatically.", "default": { "type": "GradedMesher" }, "allOf": [ { "$ref": "#/definitions/GradedMesher" } ] } }, "additionalProperties": false, "definitions": { "GradedMesher": { "title": "GradedMesher", "description": "Implements automatic nonuniform meshing with a set minimum steps per wavelength and\na graded mesh expanding from higher- to lower-resolution regions.\n\nParameters\n----------", "type": "object", "properties": { "type": { "title": "Type", "default": "GradedMesher", "enum": [ "GradedMesher" ], "type": "string" } }, "additionalProperties": false } } }
- Fields
max_scale (float)
mesher (tidy3d.components.grid.mesher.GradedMesher)
min_steps_per_wvl (float)
- attribute max_scale: float = 1.4#
Sets the maximum ratio between any two consecutive grid steps.
- Constraints
exclusiveMaximum = 2.0
minimum = 1.2
- attribute mesher: tidy3d.components.grid.mesher.GradedMesher = GradedMesher(type='GradedMesher')#
The type of mesher to use to generate the grid automatically.
- attribute min_steps_per_wvl: float = 10.0#
Minimal number of steps per wavelength in each medium.
- Constraints
minimum = 6.0