gplugins.gmeep.write_sparameters_grating_batch#
- gplugins.gmeep.write_sparameters_grating_batch(instances, cores_per_instance: int = 2, total_cores: int = 4, temp_dir: str | None = None, delete_temp_files: bool = False, verbosity: bool = False) None [source]#
Write grating coupler Sparameters using multiple cores in batches of simulations.
Given a tuple of write_sparameters_meep keyword arguments (instances) launches parallel simulations each simulation is assigned “cores_per_instance” cores Assumes total of “total_cores” if cores_per_instance * len(instances) > total_cores then the overflow will be performed serially
- Parameters:
instances – list of Dicts. The keys must be parameters names of write_sparameters_meep, and entries the values.
cores_per_instance – number of processors to assign to each instance.
total_cores – total number of cores to use.
temp_dir – temporary directory to hold simulation files.
delete_temp_file – whether to delete temp_dir when done.
verbosity – show progress messages.