Releases: loganbvh/superscreen
v0.11.0
v0.10.5
v0.10.4
v0.10.3
v0.10.2
v0.10.1
v0.10.0
v0.9.2
v0.9.1
v0.9.0
SuperScreen
v0.9.0
is a significant update intended to improve the CPU/memory efficiency and ergonomics of the package. The major upgrades are contained in the following Pull Requests: #96, #99.
Major changes
-
Rather than creating a single mesh containing all films in a device, each film now gets its own mesh and finite element operators.
- This approach avoids meshing large vacuum regions between films, which is costly.
- This approach also means that films with transport terminals can exist in the same
superscreen.Device
as films without terminals. As a result, thesuperscreen.TransportDevice
class is no longer needed and has been removed. - It is no longer necessary to explicitly define a bounding box around the film(s) being modeled. A suitable bounding box is automatically generated for each film within
superscreen.Device.make_mesh()
.
-
Reduced memory footprint and improved performance using
numba
JIT compiled functions.- Several costly numerical operations have been migrated from
numpy
/scipy
to customnumba
just-in-time (JIT) compiled functions. Thenumba
functions are automatically performed in parallel on multiple CPU cores and avoid the allocation of large intermediate arrays, which can cause significant memory usage innumpy
/scipy
. - For devices with multiple films, the inductive coupling between films is now calculated using the supercurrent density and a
numba
implementation of the Biot-Savart law, rather than the stream function and Ampere's law. The new approach is both more robust for closely-stacked films and avoids storage of large temporary arrays. - The default for
superscreen.Device.solve_dtype
has been changed fromfloat64
tofloat32
.
- Several costly numerical operations have been migrated from
-
The linear system describing the magnetic response of each film is now LU factored only once per call to
superscreen.solve()
.- This dramatically speeds up self-consistent simulations involving multiple films and makes the solver code more modular.
- The portions of the model that are independent of the applied field can be pre-factorized using
superscreen.factorize_model()
, which returns asuperscreen.FactorizedModel
object that can be saved for future use. Asuperscreen.FactorizedModel
instance can be passed directly tosuperscreen.solve()
.
-
As a result of the above optimizations, GPU support using
jax
and parallel processing with shared memory usingray
no longer seem to add much value to the package, so they have been removed.- The
gpu
argument tosuperscreen.solve()
has been removed, along with the (optional) dependency onjax
. superscreen.solve_many()
has been removed, along with the dependency onray
.
- The
-
All IO operations, including writing
superscreen.Device
andsuperscreen.Solution
objects to disk, are now performed using the HDF5 file format viah5py
.- All objects within
superscreen
that can be serialized to disk now have.to_hdf5()
and.from_hdf5()
methods.
- All objects within
-
SuperScreen
has dropped support for Python 3.7, which will reach end-of-life in June 2023.- Added support for Python 3.11, which was being blocked by the dependency on
ray
.
- Added support for Python 3.11, which was being blocked by the dependency on