Provide fast splint in OneDimCubicSpline for PBC Coulomb Potentials
- Dominant language
- C++
- Stars
- 403
- Forks
- 154
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 82
Description
Since commit 1bc275373377871b921de37a661ac98ad5197340, splint calls in evaluateSR in PBC Coulomb potentials use cubic spline interpolation. This leads a substantial slowdown, 6% of NiO-a512 calculations, on SPR on Aurora.
diff --git a/src/Numerics/OneDimCubicSpline.h b/src/Numerics/OneDimCubicSpline.h
index f58245e12..004d7b0cc 100644
--- a/src/Numerics/OneDimCubicSpline.h
+++ b/src/Numerics/OneDimCubicSpline.h
- return
- m_grid->cubicInterpolateFirst(m_Y[Loc],m_Y[Loc+1],m_Y1[Loc],m_Y1[Loc+1]);
**Additional context**
Add any other context or screenshots about the feature request here.
Since the potential grid spacing is small, the cubic spline is not necessary for the accuracy. I understand the change was made to handle a wide range of grids and forces. A possible solution is to add splint_fast.
Contributor guide
Assessment
This issue has not been assessed yet.