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 datatypes like `GeometricObject`, are described in a later subsection. The basic datatypes, like `integer
(
self,
cell_size: 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 = mp.Medium(),
m: float = 0,
bfast_scaled_k: Optional[Vector3Type] = None,
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 = 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: Optional[str] = None,
output_volume: Optional[Volume] = None,
output_single_precision: bool = False,
geometry_center: Vector3Type = Vector3(),
force_all_components: bool = False,
split_chunks_evenly: bool = True,
chunk_layout=None,
collect_stats: bool = False,
)
| 1224 | """ |
| 1225 | |
| 1226 | def __init__( |
| 1227 | self, |
| 1228 | cell_size: Vector3Type = None, |
| 1229 | resolution: float = None, |
| 1230 | geometry: Optional[List[GeometricObject]] = None, |
| 1231 | sources: Optional[List[Source]] = None, |
| 1232 | eps_averaging: bool = True, |
| 1233 | dimensions: int = 3, |
| 1234 | boundary_layers: Optional[List[PML]] = None, |
| 1235 | symmetries: Optional[List[Symmetry]] = None, |
| 1236 | force_complex_fields: bool = False, |
| 1237 | default_material: Medium = mp.Medium(), |
| 1238 | m: float = 0, |
| 1239 | bfast_scaled_k: Optional[Vector3Type] = None, |
| 1240 | k_point: Union[Vector3Type, bool] = False, |
| 1241 | kz_2d: str = "complex", |
| 1242 | extra_materials: Optional[List[Medium]] = None, |
| 1243 | material_function: Optional[Callable[[Vector3Type], Medium]] = None, |
| 1244 | epsilon_func: Optional[Callable[[Vector3Type], float]] = None, |
| 1245 | epsilon_input_file: str = "", |
| 1246 | progress_interval: float = 4, |
| 1247 | subpixel_tol: float = 1e-4, |
| 1248 | subpixel_maxeval: int = 100000, |
| 1249 | loop_tile_base_db: int = 0, |
| 1250 | loop_tile_base_eh: int = 0, |
| 1251 | ensure_periodicity: bool = True, |
| 1252 | num_chunks: int = 0, |
| 1253 | Courant: float = 0.5, |
| 1254 | accurate_fields_near_cylorigin: bool = False, |
| 1255 | filename_prefix: Optional[str] = None, |
| 1256 | output_volume: Optional[Volume] = None, |
| 1257 | output_single_precision: bool = False, |
| 1258 | geometry_center: Vector3Type = Vector3(), |
| 1259 | force_all_components: bool = False, |
| 1260 | split_chunks_evenly: bool = True, |
| 1261 | chunk_layout=None, |
| 1262 | collect_stats: bool = False, |
| 1263 | ): |
| 1264 | """ |
| 1265 | All `Simulation` attributes are described in further detail below. In brackets |
| 1266 | after each variable is the type of value that it should hold. The classes, complex |
| 1267 | datatypes like `GeometricObject`, are described in a later subsection. The basic |
| 1268 | datatypes, like `integer`, `boolean`, `complex`, and `string` are defined by |
| 1269 | Python. `Vector3` is a `meep` class. |
| 1270 | |
| 1271 | + **`geometry` [ list of `GeometricObject` class ]** — Specifies the geometric |
| 1272 | objects making up the structure being simulated. When objects overlap, later |
| 1273 | objects in the list take precedence. Defaults to no objects (empty list). |
| 1274 | |
| 1275 | + **`geometry_center` [ `Vector3` class ]** — Specifies the coordinates of the |
| 1276 | center of the cell. Defaults to (0, 0, 0), but changing this allows you to shift |
| 1277 | the coordinate system used in Meep (for example, to put the origin at the |
| 1278 | corner). Passing `geometry_center=c` is equivalent to adding the `c` vector to |
| 1279 | the coordinates of every other object in the simulation, i.e. `c` becomes the |
| 1280 | new origin that other objects are defined with respect to. |
| 1281 | |
| 1282 | + **`sources` [ list of `Source` class ]** — Specifies the current sources to be |
| 1283 | present in the simulation. Defaults to none (empty list). |