Long Range Handlers Need Refactoring
- Dominant language
- C++
- Stars
- 403
- Forks
- 154
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 82
Description
I think the way the long range handlers deal with different breakups, (i.e. for energy, force, and stress), is a mess (I'm to blame for this :P). Basically, a single handler (lets take LRHandlerTemp) for example, is designed to do the breakups and simultaneously manage breakups for the energy, force, and stress. Moreover, if I want to do some but not all of these breakups, I have to add more functions to independently initialize and populate the data structures required to do the breakup.
I propose to:
1.) Split LRBreakup into 3 derived classes, one for energy, one for force, and one for stress. Basically, DoBreakup will be different for all of these, but otherwise, the arguments and returns will be the same.
2.) Template LRHandlerBase and derived classes on the breakup scheme. There will thus be only one set of fit coefficients, and one set of long-range fourier components.
3.) Eliminate the data structures associated with every other breakup scheme, and eliminate a lot of evaluate/initialize calls to other breakup schemes.
Temporary solution:
LRHandlerSRCoulomb will be the force-only breakup handler until the refactor is done.
Contributor guide
Assessment
This issue has not been assessed yet.