CmPA/iPic3D — pull request #23 by alecjohnson (2013-06-22 03:23:19+00:00)
Title: issue#22: using one preallocated Moments instance per thread in interpP2...

This should address the performance issue that Stefano was seeing.
I changed the code to preallocate one instance of the Moments class
for each OpenMP thread. In the case that OpenMP is not enabled,
only one instance of the Moments class is created. I do not see a
compelling reason to avoid use of the Moments class in the case
that OpenMP is not used. For the moment there is still a (very minor) benefit
from the fact that one fewer index is needed when summing moments.
In the end I think that the summed moments themselves should be
put in Moments class (that perhaps lives along with a Fields class in a
GridData class).