guagua-pamcn / a-dda

Automatically exported from code.google.com/p/a-dda
0 stars 0 forks source link

Improve Sommerfeld table in sparse mode #175

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Currently, even in sparse mode, the table of Sommerfeld integrals is computed 
for all possible combinations of dipoles, put in a computational box. So its 
size is (approximately) (2*boxZ-1)*(boxX*boxY - MIN(boxX*boxY)^2). This is fine 
for FFT mode, but can be very inefficient for SPARSE mode.

1) This procedure incurs (potentially) a lot of unnecessary evaluations
of Sommerfeld integrals. For really sparse aggregates the better way is to 
buildup a lookup table, using only actually used pairs of (z,rho), as is done 
in DDA-SI code. A hash table can be used for that.

2) Another problem in sparse mode is that currently all values of z are 
computed on each processor (in MPI mode). This is related to the current 
parallelization mode (issue 160), but it can be improved by computing all 
values in chunks and then gathering them on each processor. Better to combine 
it with the hash table above.

Original issue reported on code.google.com by yurkin on 25 Sep 2013 at 7:37