Gradient square is defined as (in 3d):
\left| \nabla f\right|^2 = \nabla f^* \cdot \nabla f= \left | \frac{\partial f}{\partial x} \right|^2 + \left | \frac{\partial f}{\partial y} \right|^2 + \left | \frac{\partial f}{\partial z} \right|^2
After simple algebra one can show that:
\left| \nabla f\right|^2 = \frac{1}{2}\Delta (f^*\cdot f) - \textrm{Re}\left( f^*\cdot \Delta f \right )
Numerically, the formula that utilizes laplacians provides results of higher accuracy.
References:
- S. Jin, A. Bulgac, K. Roche, G. Wlazłowski, Coordinate-Space Solver for Superfluid Many-Fermion Systems with Shifted Conjugate Orthogonal Conjugate Gradient Method, Phys. Rev. C 95, 044302, 2017, arXiv:1608.03711
- Yue Shi, Precision of finite-difference representation in 3D coordinate-space Hartree-Fock-Bogoliubov calculations, Phys. Rev. C 98, 014329, 2018, arXiv:1805.07919