From 03443d705fadd2aa08546d9ca9cb7820e22e12b5 Mon Sep 17 00:00:00 2001 From: Ardavan Oskooi Date: Fri, 28 Jan 2022 06:01:56 +0000 Subject: [PATCH 1/7] add type hints to constructor arguments of Simulation class --- doc/docs/Python_User_Interface.md | 60 ++++++++++++------------- python/simulation.py | 74 ++++++++++++++++--------------- 2 files changed, 68 insertions(+), 66 deletions(-) diff --git a/doc/docs/Python_User_Interface.md b/doc/docs/Python_User_Interface.md index 84371fce6..2db13995d 100644 --- a/doc/docs/Python_User_Interface.md +++ b/doc/docs/Python_User_Interface.md @@ -87,40 +87,40 @@ control various parameters of the Meep computation. ```python def __init__(self, - cell_size, - resolution, - geometry=None, - sources=None, - eps_averaging=True, - dimensions=3, - boundary_layers=None, - symmetries=None, - force_complex_fields=False, - default_material=Medium(), - m=0, - k_point=False, + cell_size: meep.geom.Vector3, + resolution: float, + geometry: List[meep.geom.GeometricObject] = None, + sources: List[meep.source.Source] = None, + eps_averaging: bool = True, + dimensions: int = 3, + boundary_layers: List[meep.simulation.PML] = None, + symmetries: List[meep.simulation.Symmetry] = None, + force_complex_fields: bool = False, + default_material: meep.geom.Medium = Medium(), + m: int = 0, + k_point: bool = False, kz_2d='complex', - extra_materials=None, + extra_materials: List[meep.geom.Medium] = None, material_function=None, epsilon_func=None, - epsilon_input_file='', - progress_interval=4, - subpixel_tol=0.0001, - subpixel_maxeval=100000, - loop_tile_base_db=0, - loop_tile_base_eh=0, - ensure_periodicity=True, - num_chunks=0, - Courant=0.5, - accurate_fields_near_cylorigin=False, - filename_prefix=None, - output_volume=None, - output_single_precision=False, - geometry_center=Vector3<0.0, 0.0, 0.0>, - force_all_components=False, - split_chunks_evenly=True, + epsilon_input_file: str = '', + progress_interval: float = 4.0, + subpixel_tol: float = 0.0001, + subpixel_maxeval: int = 100000, + loop_tile_base_db: int = 0, + loop_tile_base_eh: int = 0, + ensure_periodicity: bool = True, + num_chunks: int = 0, + Courant: float = 0.5, + accurate_fields_near_cylorigin: bool = False, + filename_prefix: str = None, + output_volume: meep.simulation.Volume = None, + output_single_precision: bool = False, + geometry_center: meep.geom.Vector3 = Vector3<0.0, 0.0, 0.0>, + force_all_components: bool = False, + split_chunks_evenly: bool = True, chunk_layout=None, - collect_stats=False): + collect_stats: bool = False): ```
diff --git a/python/simulation.py b/python/simulation.py index 9ed5c6338..f38f9223e 100644 --- a/python/simulation.py +++ b/python/simulation.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- from __future__ import division, print_function +from typing import Callable, List, Tuple, Union + import functools import math import numbers @@ -21,8 +23,8 @@ import numpy as np import meep as mp -from meep.geom import Vector3, init_do_averaging -from meep.source import EigenModeSource, GaussianBeamSource, IndexedSource, check_positive +from meep.geom import Vector3, init_do_averaging, GeometricObject, Medium +from meep.source import Source, EigenModeSource, GaussianBeamSource, IndexedSource, check_positive import meep.visualization as vis from meep.verbosity_mgr import Verbosity @@ -933,40 +935,40 @@ class Simulation(object): control various parameters of the Meep computation. """ def __init__(self, - cell_size, - resolution, - geometry=None, - sources=None, - eps_averaging=True, - dimensions=3, - boundary_layers=None, - symmetries=None, - force_complex_fields=False, - default_material=mp.Medium(), - m=0, - k_point=False, - kz_2d="complex", - extra_materials=None, - material_function=None, - epsilon_func=None, - epsilon_input_file='', - progress_interval=4, - subpixel_tol=1e-4, - subpixel_maxeval=100000, - loop_tile_base_db=0, - loop_tile_base_eh=0, - ensure_periodicity=True, - num_chunks=0, - Courant=0.5, - accurate_fields_near_cylorigin=False, - filename_prefix=None, - output_volume=None, - output_single_precision=False, - geometry_center=mp.Vector3(), - force_all_components=False, - split_chunks_evenly=True, - chunk_layout=None, - collect_stats=False): + cell_size: Vector3, + resolution: float, + geometry: List[GeometricObject] = None, + sources: List[Source] = None, + eps_averaging: bool = True, + dimensions: int = 3, + boundary_layers: List[PML] = None, + symmetries: List[Symmetry] = None, + force_complex_fields: bool = False, + default_material: Medium = mp.Medium(), + m: int = 0, + k_point: bool = False, + kz_2d = "complex", + extra_materials: List[Medium] = None, + material_function = None, + epsilon_func = None, + epsilon_input_file: str = '', + progress_interval: float = 4., + subpixel_tol: float = 1e-4, + subpixel_maxeval: int = 100000, + loop_tile_base_db: int = 0, + loop_tile_base_eh: int = 0, + ensure_periodicity: bool = True, + num_chunks: int = 0, + Courant: float = 0.5, + accurate_fields_near_cylorigin: bool = False, + filename_prefix: str = None, + output_volume: Volume = None, + output_single_precision: bool = False, + geometry_center: Vector3 = Vector3(), + force_all_components: bool = False, + split_chunks_evenly: bool = True, + chunk_layout = None, + collect_stats: bool = False): """ All `Simulation` attributes are described in further detail below. In brackets after each variable is the type of value that it should hold. The classes, complex From 6c86d5d84d62e4084dc0cef0bb7d74d8a4c4fec5 Mon Sep 17 00:00:00 2001 From: Ardavan Oskooi Date: Fri, 28 Jan 2022 08:13:54 +0000 Subject: [PATCH 2/7] specify default None for cell_size and resolution --- doc/docs/Python_User_Interface.md | 4 ++-- python/simulation.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/docs/Python_User_Interface.md b/doc/docs/Python_User_Interface.md index 2db13995d..b0b8b7c17 100644 --- a/doc/docs/Python_User_Interface.md +++ b/doc/docs/Python_User_Interface.md @@ -87,8 +87,8 @@ control various parameters of the Meep computation. ```python def __init__(self, - cell_size: meep.geom.Vector3, - resolution: float, + cell_size: meep.geom.Vector3 = None, + resolution: float = None, geometry: List[meep.geom.GeometricObject] = None, sources: List[meep.source.Source] = None, eps_averaging: bool = True, diff --git a/python/simulation.py b/python/simulation.py index f38f9223e..26281e00a 100644 --- a/python/simulation.py +++ b/python/simulation.py @@ -935,8 +935,8 @@ class Simulation(object): control various parameters of the Meep computation. """ def __init__(self, - cell_size: Vector3, - resolution: float, + cell_size: Vector3 = None, + resolution: float = None, geometry: List[GeometricObject] = None, sources: List[Source] = None, eps_averaging: bool = True, From 7c697f67750c3cf799f7bc67688da6ba83b52d89 Mon Sep 17 00:00:00 2001 From: Ardavan Oskooi Date: Sat, 29 Jan 2022 10:21:25 -0800 Subject: [PATCH 3/7] use Optional type for certain members with None defaults and other fixes --- doc/docs/Python_User_Interface.md | 66 +++++++++++++++---------------- python/simulation.py | 31 ++++++++------- 2 files changed, 49 insertions(+), 48 deletions(-) diff --git a/doc/docs/Python_User_Interface.md b/doc/docs/Python_User_Interface.md index b0b8b7c17..cd54fcdc2 100644 --- a/doc/docs/Python_User_Interface.md +++ b/doc/docs/Python_User_Interface.md @@ -87,40 +87,40 @@ control various parameters of the Meep computation. ```python def __init__(self, - cell_size: meep.geom.Vector3 = None, - resolution: float = None, - geometry: List[meep.geom.GeometricObject] = None, - sources: List[meep.source.Source] = None, - eps_averaging: bool = True, - dimensions: int = 3, - boundary_layers: List[meep.simulation.PML] = None, - symmetries: List[meep.simulation.Symmetry] = None, - force_complex_fields: bool = False, - default_material: meep.geom.Medium = Medium(), - m: int = 0, - k_point: bool = False, + cell_size:Union[meep.geom.Vector3, Tuple[float, ...], Tuple[int, ...]]=None, + resolution:Union[float, int]=None, + geometry:Union[List[meep.geom.GeometricObject], NoneType]=None, + sources:Union[List[meep.source.Source], NoneType]=None, + eps_averaging:bool=True, + dimensions:int=3, + boundary_layers:Union[List[meep.simulation.PML], NoneType]=None, + symmetries:Union[List[meep.simulation.Symmetry], NoneType]=None, + force_complex_fields:bool=False, + default_material:meep.geom.Medium=Medium(), + m:int=0, + k_point:bool=False, kz_2d='complex', - extra_materials: List[meep.geom.Medium] = None, - material_function=None, - epsilon_func=None, - epsilon_input_file: str = '', - progress_interval: float = 4.0, - subpixel_tol: float = 0.0001, - subpixel_maxeval: int = 100000, - loop_tile_base_db: int = 0, - loop_tile_base_eh: int = 0, - ensure_periodicity: bool = True, - num_chunks: int = 0, - Courant: float = 0.5, - accurate_fields_near_cylorigin: bool = False, - filename_prefix: str = None, - output_volume: meep.simulation.Volume = None, - output_single_precision: bool = False, - geometry_center: meep.geom.Vector3 = Vector3<0.0, 0.0, 0.0>, - force_all_components: bool = False, - split_chunks_evenly: bool = True, + extra_materials:Union[List[meep.geom.Medium], NoneType]=None, + material_function:Union[Callable[[Union[meep.geom.Vector3, Tuple[float, ...], Tuple[int, ...]]], meep.geom.Medium], NoneType]=None, + epsilon_func:Union[Callable[[Union[meep.geom.Vector3, Tuple[float, ...], Tuple[int, ...]]], float], NoneType]=None, + epsilon_input_file:str='', + progress_interval:float=4.0, + subpixel_tol:float=0.0001, + subpixel_maxeval:int=100000, + loop_tile_base_db:int=0, + loop_tile_base_eh:int=0, + ensure_periodicity:bool=True, + num_chunks:int=0, + Courant:float=0.5, + accurate_fields_near_cylorigin:bool=False, + filename_prefix:Union[str, NoneType]=None, + output_volume:Union[meep.simulation.Volume, NoneType]=None, + output_single_precision:bool=False, + geometry_center:Union[meep.geom.Vector3, Tuple[float, ...], Tuple[int, ...]]=Vector3<0.0, 0.0, 0.0>, + force_all_components:bool=False, + split_chunks_evenly:bool=True, chunk_layout=None, - collect_stats: bool = False): + collect_stats:bool=False): ```
@@ -152,7 +152,7 @@ Python. `Vector3` is a `meep` class. + **`boundary_layers` [ list of `PML` class ]** — Specifies the [PML](Perfectly_Matched_Layer.md) absorbing boundary layers to use. Defaults to - none. + none (empty list). + **`cell_size` [ `Vector3` ]** — Specifies the size of the cell which is centered on the origin of the coordinate system. Any sizes of 0 imply a diff --git a/python/simulation.py b/python/simulation.py index 26281e00a..35b273529 100644 --- a/python/simulation.py +++ b/python/simulation.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import division, print_function -from typing import Callable, List, Tuple, Union +from typing import Callable, List, Tuple, Union, Optional import functools import math @@ -170,6 +170,7 @@ def p(self): return self._p DefaultPMLProfile = lambda u: u * u +Vector3Type = Union[Vector3, Tuple[float, ...], Tuple[int, ...]] class PML(object): """ @@ -935,24 +936,24 @@ class Simulation(object): control various parameters of the Meep computation. """ def __init__(self, - cell_size: Vector3 = None, - resolution: float = None, - geometry: List[GeometricObject] = None, - sources: List[Source] = None, + cell_size: Vector3Type = None, + resolution: Union[float, int] = None, + geometry: Optional[List[GeometricObject]] = None, + sources: Optional[List[Source]] = None, eps_averaging: bool = True, dimensions: int = 3, - boundary_layers: List[PML] = None, - symmetries: List[Symmetry] = None, + boundary_layers: Optional[List[PML]] = None, + symmetries: Optional[List[Symmetry]] = None, force_complex_fields: bool = False, default_material: Medium = mp.Medium(), m: int = 0, k_point: bool = False, kz_2d = "complex", - extra_materials: List[Medium] = None, - material_function = None, - epsilon_func = None, + extra_materials: Optional[List[Medium]] = None, + material_function: Optional[Callable[[Vector3Type], Medium]] = None, + epsilon_func: Optional[Callable[[Vector3Type], float]] = None, epsilon_input_file: str = '', - progress_interval: float = 4., + progress_interval: float = 4.0, subpixel_tol: float = 1e-4, subpixel_maxeval: int = 100000, loop_tile_base_db: int = 0, @@ -961,10 +962,10 @@ def __init__(self, num_chunks: int = 0, Courant: float = 0.5, accurate_fields_near_cylorigin: bool = False, - filename_prefix: str = None, - output_volume: Volume = None, + filename_prefix: Optional[str] = None, + output_volume: Optional[Volume] = None, output_single_precision: bool = False, - geometry_center: Vector3 = Vector3(), + geometry_center: Vector3Type = Vector3(), force_all_components: bool = False, split_chunks_evenly: bool = True, chunk_layout = None, @@ -997,7 +998,7 @@ def __init__(self, + **`boundary_layers` [ list of `PML` class ]** — Specifies the [PML](Perfectly_Matched_Layer.md) absorbing boundary layers to use. Defaults to - none. + none (empty list). + **`cell_size` [ `Vector3` ]** — Specifies the size of the cell which is centered on the origin of the coordinate system. Any sizes of 0 imply a From 1b8e395244cb4499f20829a39783f4dc75787b78 Mon Sep 17 00:00:00 2001 From: Ardavan Oskooi Date: Tue, 1 Feb 2022 19:07:15 -0800 Subject: [PATCH 4/7] fixes for cell_size, m, and kz_2d --- python/simulation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/simulation.py b/python/simulation.py index 35b273529..a8a2ac021 100644 --- a/python/simulation.py +++ b/python/simulation.py @@ -936,7 +936,7 @@ class Simulation(object): control various parameters of the Meep computation. """ def __init__(self, - cell_size: Vector3Type = None, + cell_size: Optional[Vector3Type] = None, resolution: Union[float, int] = None, geometry: Optional[List[GeometricObject]] = None, sources: Optional[List[Source]] = None, @@ -946,9 +946,9 @@ def __init__(self, symmetries: Optional[List[Symmetry]] = None, force_complex_fields: bool = False, default_material: Medium = mp.Medium(), - m: int = 0, - k_point: bool = False, - kz_2d = "complex", + m: Union[float, int] = 0, + k_point: Union[Vector3Type, bool] = False, + kz_2d: str = "complex", extra_materials: Optional[List[Medium]] = None, material_function: Optional[Callable[[Vector3Type], Medium]] = None, epsilon_func: Optional[Callable[[Vector3Type], float]] = None, From 0b36b6055ec111a419fc0ffc97eb966d911c100d Mon Sep 17 00:00:00 2001 From: Ardavan Oskooi Date: Wed, 2 Feb 2022 05:01:05 +0000 Subject: [PATCH 5/7] replace int type with float, add annotation for chunk_layout, update markdown docs --- doc/docs/Python_User_Interface.md | 68 +++++++++++++++---------------- python/simulation.py | 10 ++--- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/doc/docs/Python_User_Interface.md b/doc/docs/Python_User_Interface.md index cd54fcdc2..69dd01938 100644 --- a/doc/docs/Python_User_Interface.md +++ b/doc/docs/Python_User_Interface.md @@ -87,40 +87,40 @@ control various parameters of the Meep computation. ```python def __init__(self, - cell_size:Union[meep.geom.Vector3, Tuple[float, ...], Tuple[int, ...]]=None, - resolution:Union[float, int]=None, - geometry:Union[List[meep.geom.GeometricObject], NoneType]=None, - sources:Union[List[meep.source.Source], NoneType]=None, - eps_averaging:bool=True, - dimensions:int=3, - boundary_layers:Union[List[meep.simulation.PML], NoneType]=None, - symmetries:Union[List[meep.simulation.Symmetry], NoneType]=None, - force_complex_fields:bool=False, - default_material:meep.geom.Medium=Medium(), - m:int=0, - k_point:bool=False, - kz_2d='complex', - extra_materials:Union[List[meep.geom.Medium], NoneType]=None, - material_function:Union[Callable[[Union[meep.geom.Vector3, Tuple[float, ...], Tuple[int, ...]]], meep.geom.Medium], NoneType]=None, - epsilon_func:Union[Callable[[Union[meep.geom.Vector3, Tuple[float, ...], Tuple[int, ...]]], float], NoneType]=None, - epsilon_input_file:str='', - progress_interval:float=4.0, - subpixel_tol:float=0.0001, - subpixel_maxeval:int=100000, - loop_tile_base_db:int=0, - loop_tile_base_eh:int=0, - ensure_periodicity:bool=True, - num_chunks:int=0, - Courant:float=0.5, - accurate_fields_near_cylorigin:bool=False, - filename_prefix:Union[str, NoneType]=None, - output_volume:Union[meep.simulation.Volume, NoneType]=None, - output_single_precision:bool=False, - geometry_center:Union[meep.geom.Vector3, Tuple[float, ...], Tuple[int, ...]]=Vector3<0.0, 0.0, 0.0>, - force_all_components:bool=False, - split_chunks_evenly:bool=True, - chunk_layout=None, - collect_stats:bool=False): + cell_size: 'Optional[Vector3Type]' = None, + resolution: 'float' = None, + geometry: 'Optional[List[GeometricObject]]' = None, + sources: 'Optional[List[Source]]' = None, + eps_averaging: 'bool' = True, + dimensions: 'int' = 3, + boundary_layers: 'Optional[List[PML]]' = None, + symmetries: 'Optional[List[Symmetry]]' = None, + force_complex_fields: 'bool' = False, + default_material: 'Medium' = Medium(), + m: 'float' = 0, + k_point: 'Union[Vector3Type, bool]' = False, + kz_2d: 'str' = 'complex', + extra_materials: 'Optional[List[Medium]]' = None, + material_function: 'Optional[Callable[[Vector3Type], Medium]]' = None, + epsilon_func: 'Optional[Callable[[Vector3Type], float]]' = None, + epsilon_input_file: 'str' = '', + progress_interval: 'float' = 4, + subpixel_tol: 'float' = 0.0001, + subpixel_maxeval: 'int' = 100000, + loop_tile_base_db: 'int' = 0, + loop_tile_base_eh: 'int' = 0, + ensure_periodicity: 'bool' = True, + num_chunks: 'int' = 0, + Courant: 'float' = 0.5, + accurate_fields_near_cylorigin: 'bool' = False, + filename_prefix: 'Optional[str]' = None, + output_volume: 'Optional[Volume]' = None, + output_single_precision: 'bool' = False, + geometry_center: 'Vector3Type' = Vector3<0.0, 0.0, 0.0>, + force_all_components: 'bool' = False, + split_chunks_evenly: 'bool' = True, + chunk_layout: 'Optional[str, Simulation, BinaryPartition]' = None, + collect_stats: 'bool' = False): ```
diff --git a/python/simulation.py b/python/simulation.py index a8a2ac021..009b2e94a 100644 --- a/python/simulation.py +++ b/python/simulation.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import division, print_function +from __future__ import division, print_function, annotations from typing import Callable, List, Tuple, Union, Optional @@ -937,7 +937,7 @@ class Simulation(object): """ def __init__(self, cell_size: Optional[Vector3Type] = None, - resolution: Union[float, int] = None, + resolution: float = None, geometry: Optional[List[GeometricObject]] = None, sources: Optional[List[Source]] = None, eps_averaging: bool = True, @@ -946,14 +946,14 @@ def __init__(self, symmetries: Optional[List[Symmetry]] = None, force_complex_fields: bool = False, default_material: Medium = mp.Medium(), - m: Union[float, int] = 0, + m: float = 0, k_point: Union[Vector3Type, bool] = False, kz_2d: str = "complex", extra_materials: Optional[List[Medium]] = None, material_function: Optional[Callable[[Vector3Type], Medium]] = None, epsilon_func: Optional[Callable[[Vector3Type], float]] = None, epsilon_input_file: str = '', - progress_interval: float = 4.0, + progress_interval: float = 4, subpixel_tol: float = 1e-4, subpixel_maxeval: int = 100000, loop_tile_base_db: int = 0, @@ -968,7 +968,7 @@ def __init__(self, geometry_center: Vector3Type = Vector3(), force_all_components: bool = False, split_chunks_evenly: bool = True, - chunk_layout = None, + chunk_layout: Optional[str, Simulation, BinaryPartition] = None, collect_stats: bool = False): """ All `Simulation` attributes are described in further detail below. In brackets From c0f47601f7650fbdab34b8338d099fad971c6f0c Mon Sep 17 00:00:00 2001 From: Ardavan Oskooi Date: Wed, 2 Feb 2022 05:50:57 +0000 Subject: [PATCH 6/7] remove type annotation for chunk_layout --- python/simulation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/simulation.py b/python/simulation.py index 009b2e94a..126f05db2 100644 --- a/python/simulation.py +++ b/python/simulation.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import division, print_function, annotations +from __future__ import division, print_function from typing import Callable, List, Tuple, Union, Optional @@ -968,7 +968,7 @@ def __init__(self, geometry_center: Vector3Type = Vector3(), force_all_components: bool = False, split_chunks_evenly: bool = True, - chunk_layout: Optional[str, Simulation, BinaryPartition] = None, + chunk_layout = None, collect_stats: bool = False): """ All `Simulation` attributes are described in further detail below. In brackets From 75758d9f7b55a1b4d3bd0b799fcc2ab5f7198777 Mon Sep 17 00:00:00 2001 From: Ardavan Oskooi Date: Wed, 2 Feb 2022 05:52:14 +0000 Subject: [PATCH 7/7] update markdown docs --- doc/docs/Python_User_Interface.md | 68 +++++++++++++++---------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/doc/docs/Python_User_Interface.md b/doc/docs/Python_User_Interface.md index 69dd01938..4cc513a75 100644 --- a/doc/docs/Python_User_Interface.md +++ b/doc/docs/Python_User_Interface.md @@ -87,40 +87,40 @@ control various parameters of the Meep computation. ```python def __init__(self, - cell_size: 'Optional[Vector3Type]' = None, - resolution: 'float' = None, - geometry: 'Optional[List[GeometricObject]]' = None, - sources: 'Optional[List[Source]]' = None, - eps_averaging: 'bool' = True, - dimensions: 'int' = 3, - boundary_layers: 'Optional[List[PML]]' = None, - symmetries: 'Optional[List[Symmetry]]' = None, - force_complex_fields: 'bool' = False, - default_material: 'Medium' = Medium(), - m: 'float' = 0, - k_point: 'Union[Vector3Type, bool]' = False, - kz_2d: 'str' = 'complex', - extra_materials: 'Optional[List[Medium]]' = None, - material_function: 'Optional[Callable[[Vector3Type], Medium]]' = None, - epsilon_func: 'Optional[Callable[[Vector3Type], float]]' = None, - epsilon_input_file: 'str' = '', - progress_interval: 'float' = 4, - subpixel_tol: 'float' = 0.0001, - subpixel_maxeval: 'int' = 100000, - loop_tile_base_db: 'int' = 0, - loop_tile_base_eh: 'int' = 0, - ensure_periodicity: 'bool' = True, - num_chunks: 'int' = 0, - Courant: 'float' = 0.5, - accurate_fields_near_cylorigin: 'bool' = False, - filename_prefix: 'Optional[str]' = None, - output_volume: 'Optional[Volume]' = None, - output_single_precision: 'bool' = False, - geometry_center: 'Vector3Type' = Vector3<0.0, 0.0, 0.0>, - force_all_components: 'bool' = False, - split_chunks_evenly: 'bool' = True, - chunk_layout: 'Optional[str, Simulation, BinaryPartition]' = None, - collect_stats: 'bool' = False): + cell_size: Union[meep.geom.Vector3, Tuple[float, ...], Tuple[int, ...], NoneType] = None, + resolution: float = None, + geometry: Optional[List[meep.geom.GeometricObject]] = None, + sources: Optional[List[meep.source.Source]] = None, + eps_averaging: bool = True, + dimensions: int = 3, + boundary_layers: Optional[List[meep.simulation.PML]] = None, + symmetries: Optional[List[meep.simulation.Symmetry]] = None, + force_complex_fields: bool = False, + default_material: meep.geom.Medium = Medium(), + m: float = 0, + k_point: Union[meep.geom.Vector3, Tuple[float, ...], Tuple[int, ...], bool] = False, + kz_2d: str = 'complex', + extra_materials: Optional[List[meep.geom.Medium]] = None, + material_function: Optional[Callable[[Union[meep.geom.Vector3, Tuple[float, ...], Tuple[int, ...]]], meep.geom.Medium]] = None, + epsilon_func: Optional[Callable[[Union[meep.geom.Vector3, Tuple[float, ...], Tuple[int, ...]]], float]] = None, + epsilon_input_file: str = '', + progress_interval: float = 4, + subpixel_tol: float = 0.0001, + subpixel_maxeval: int = 100000, + loop_tile_base_db: int = 0, + loop_tile_base_eh: int = 0, + ensure_periodicity: bool = True, + num_chunks: int = 0, + Courant: float = 0.5, + accurate_fields_near_cylorigin: bool = False, + filename_prefix: Optional[str] = None, + output_volume: Optional[meep.simulation.Volume] = None, + output_single_precision: bool = False, + geometry_center: Union[meep.geom.Vector3, Tuple[float, ...], Tuple[int, ...]] = Vector3<0.0, 0.0, 0.0>, + force_all_components: bool = False, + split_chunks_evenly: bool = True, + chunk_layout=None, + collect_stats: bool = False): ```