SpinW / spinw

SpinW Matlab library for spin wave calculation
http://www.spinw.org
GNU General Public License v3.0
35 stars 15 forks source link

Reduce memory use in spinwave.m #50

Open mducle opened 3 years ago

mducle commented 3 years ago

For cases where SpinW is asked to calculate a large number of q-points, its memory handling (particularly in the calculation of the correlation function and in handling twins) is not optimised with the use of temporary arrays which can be very large, leading to out-of-memory errors.

mducle commented 2 years ago

Just to note that this problem would likely be solved (or shifted) once the code (and main loop / chunking) is translated into C++.

The reason the above patch is not in a PR is that although it saves memory it obscures the mathematics a bit and makes the code harder to understand.