The `Simulation` [class](#classes) contains all the attributes that you can set to control various parameters of the Meep computation.
| 1218 | |
| 1219 | |
| 1220 | class Simulation: |
| 1221 | """ |
| 1222 | The `Simulation` [class](#classes) contains all the attributes that you can set to |
| 1223 | control various parameters of the Meep computation. |
| 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 |
nothing calls this directly
no outgoing calls
no test coverage detected