williamratcliff / spinwaves

Automatically exported from code.google.com/p/spinwaves
0 stars 1 forks source link

Dispersion calculation is redundant #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When performing the dispersion calculation, the entire spinwave_calc_file 
driver is put into two different threads in order to calculate the dispersion 
both numerically and analytically.

\spinwavecalc\spinwavepanel.OnOk

self.processManager.startAnalyticDispersion(int_file, spin_file)
self.processManager.startNumericDispersion(int_file, spin_file, data, kMin*pi, 
kMax*pi, data['step'])

This is wasteful though. We can streamline the process if we calculate the 
Hamiltonian (Hsave) in a single thread and then branch into two threads to 
calculate the eigenvalues analytically/numerically.  For big or complex 
lattices, calculating the Hamiltonian is the expensive part of the calculation 
and time should not be wasted calculating it twice. 

In order to fix this, one driver should calculate and return the hamiltonian, 
which should called first. Then two separate drivers (one numerical, other 
analytical) take Hsave as an argument to calculate their different tasks. These 
two drivers should be called in separate threads and run after Hsave has been 
calculated. 

Original issue reported on code.google.com by wfly...@gmail.com on 22 Jun 2010 at 6:03

GoogleCodeExporter commented 9 years ago

Original comment by wfly...@gmail.com on 22 Jun 2010 at 6:04

GoogleCodeExporter commented 9 years ago
Fixed

Original comment by wfly...@gmail.com on 30 Jul 2010 at 11:22