19#ifndef DFTFE_SPHERICALHARMONICUTILS_H
20#define DFTFE_SPHERICALHARMONICUTILS_H
21#include <interpolation.h>
29 const alglib::spline1dinterpolant *spline)
31 splineVal = alglib::spline1dcalc(*spline, radialCoordinate);
40 double & sphericalHarmonicVal)
43 sphericalHarmonicVal =
44 std::sqrt(2.0) * boost::math::spherical_harmonic_i(l, -m, theta, phi);
47 sphericalHarmonicVal =
48 boost::math::spherical_harmonic_r(l, m, theta, phi);
51 sphericalHarmonicVal =
52 std::sqrt(2.0) * boost::math::spherical_harmonic_r(l, m, theta, phi);
63 double tolerance = 1
e-12;
64 r = std::sqrt(x[0] * x[0] + x[1] * x[1] + x[2] * x[2]);
66 if (std::fabs(r - 0.0) <= tolerance)
73 theta = std::acos(x[2] / r);
82 if (fabs(theta - 0.0) >= tolerance && fabs(theta - M_PI) >= tolerance)
83 phi = std::atan2(x[1], x[0]);
Definition sphericalHarmonicUtils.h:25
void convertCartesianToSpherical(double *x, double &r, double &theta, double &phi)
Definition sphericalHarmonicUtils.h:58
void getRadialFunctionVal(const double radialCoordinate, double &splineVal, const alglib::spline1dinterpolant *spline)
Definition sphericalHarmonicUtils.h:27
void getSphericalHarmonicVal(const double theta, const double phi, const int l, const int m, double &sphericalHarmonicVal)
Definition sphericalHarmonicUtils.h:36
Definition pseudoPotentialToDftfeConverter.cc:34
@ e
Definition ExcSSDFunctionalBaseClass.h:52