store_mesh_info#
- ClosedCurve.store_mesh_info(fdtd_session: FdtdSession) None#
Read the locked grid and store mesh info in
structure.Must be called after the FDTD grid has been locked so that the mesh coordinates reflect the final, frozen grid that will be used throughout the optimisation.
Populates the following keys in
self.structure:'user_specified_mesh':{'x': ..., 'y': ..., 'z': ...}— theuser specified meshvalues set on the FDTD solver bylock_grid(), used to re-apply the locked grid when the base simulation is reloaded on each iteration.'actual_mesh_sizes':{'dx': ..., 'dy': ..., 'dz': ...}— mean cell sizes along each axis (metres).'mesh_cells':{'nx': ..., 'ny': ..., 'nz': ...}— number of mesh cells along each axis within the optimization region.'mesh_coordinates':{'x': ..., 'y': ..., 'z': ...}— 1D coordinate arrays for the mesh cell centres.
- Parameters:
- fdtd_session
FdtdSession The FDTD session from which to read the index monitor grid.
- fdtd_session