spinsphotonics / fdtdz

Fast, scalable, accessible photonic simulation
MIT License
111 stars 13 forks source link

Introduce ``offset`` to save GPU memory. #17

Closed jlu-spins closed 1 year ago

jlu-spins commented 1 year ago

fdtdz() now has an offset argument which allows for memory to be saved when performing large simulations.

Specifically, it allows one to

  1. only output a subvolume of the fields from the simulation domain (the other fields will still be simulated, they just won't be materialized as output), and
  2. define epsilon only on that same subvolume (under the hood it is edge-padded to fill out the entire simulation).