-
Notifications
You must be signed in to change notification settings - Fork 145
Description
Background
In reference to Issue #3207, our progress with the pyabacus project involves propagating it from the inception of the two-center integral module. While attempting to bind math_sphbes, it appears that there exist multiple implementations for the same mathematical operation.
/**
* @brief spherical bessel jl(qr)
*
* @param msh [in] number of grid points
* @param r [in] radial grid
* @param q [in] k_radial
* @param l [in] angular momentum
* @param jl [out] jl spherical bessel function
*/
static void Spherical_Bessel
(
const int &msh,
const double *r,
const double &q,
const int &l,
double *jl
);
and
//! computes the values of l-th order spherical Bessel function at q*r[ir]
static void sphbesj(const int n, //!< [in] number of r grid points
const double* const r, //!< [in] r grid
const double q, //!< [in] wave vector
const int l, //!< [in] order of the spherical Bessel function
double* const jl //!< [out] results
);
Both of these implementations actually perform the same operation. As I conducted a numerical precision test of both functions in #2958, the results suggest that the sphbesj
implemented by @jinzx10 should be prioritized. Furthermore, relocating redundant code will streamline the development process of pyabacus.
I've raised this issue to investigate the potential risks associated with removing redundant code in math_sphbes
. If developers are still utilizing the old implementation in the current codebase, please consider replacing it with the newer implementation.
Describe the solution you'd like
Related developers give their feedback about modification of math_sphbes
.
Task list only for developers
- Notice possible changes of behavior
- Explain the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi
Notice Possible Changes of Behavior (Reminder only for developers)
No response
Notice any changes of core modules (Reminder only for developers)
No response
Notice Possible Changes of Core Modules (Reminder only for developers)
No response
Additional Context
No response
Task list for Issue attackers (only for developers)
- Review and understand the proposed feature and its importance.
- Research on the existing solutions and relevant research articles/resources.
- Discuss with the team to evaluate the feasibility of implementing the feature.
- Create a design document outlining the proposed solution and implementation details.
- Get feedback from the team on the design document.
- Develop the feature following the agreed design.
- Write unit tests and integration tests for the feature.
- Update the documentation to include the new feature.
- Perform code review and address any issues.
- Merge the feature into the main branch.
- Monitor for any issues or bugs reported by users after the feature is released.
- Address any issues or bugs reported by users and continuously improve the feature.