2 #include "Physics/PhysConst_constants.hpp"
3 #include "qip/Maths.hpp"
11 template <std::
size_t Nx = 15>
15 double Zeff, en, alpha, eps_target;
16 double kappa2, alpha2, c, c2, lambda, sigma, Ren;
18 std::array<double, Nx> bx;
19 std::array<double, Nx> ax;
24 double in_eps_target = 1.0e-14,
double m = 1.0)
29 eps_target(in_eps_target),
30 kappa2(
double(kappa * kappa)),
31 alpha2(alpha * alpha),
34 lambda(std::sqrt(-en * (2.0 + en * alpha2 / m))),
35 sigma((m + en * alpha2) * (Zeff / lambda)),
58 std::pair<double, double>
fg(
double r)
const {
65 const double A_large = std::sqrt(1.0 + 0.5 * en * alpha2 / m_mass);
66 const double A_small = std::sqrt(-0.5 * en) * alpha;
68 const double rfac = 2.0 * std::pow(r, sigma) * std::exp(-lambda * r);
73 for (std::size_t k = 0; k < Nx; k++) {
78 std::max(std::abs(ax[k] / fs), std::abs(bx[k] / gs)) / rk;
79 if (eps < eps_target) {
83 return {rfac * (A_large * fs + A_small * gs),
84 rfac * (A_large * gs - A_small * fs)};
88 std::array<double, Nx> make_bx()
const {
90 std::array<double, Nx> tbx;
91 const auto Zalpha2 = Zeff * Zeff * alpha2;
92 tbx[0] = (kappa + (Zeff / lambda)) * (0.5 * alpha);
93 for (std::size_t i = 1; i < Nx; i++) {
94 tbx[i] = (kappa2 - qip::pow<2>((
double(i) - sigma)) - Zalpha2) *
95 tbx[i - 1] / (
double(2 * i) * lambda);
100 std::array<double, Nx> make_ax()
const {
103 std::array<double, Nx> tax;
104 const auto RenAlpha2 = 1.0 + en * alpha2;
105 for (std::size_t i = 0; i < Nx; i++) {
106 tax[i] = (kappa + (double(i + 1) - sigma) * RenAlpha2 -
107 Zeff * lambda * alpha2) *
108 (bx[i] *
c) / (
double(i + 1) * lambda);
Performs asymptotic expansion for f and g at large r, up to order Nx in (1/r)
Definition: AsymptoticSpinor.hpp:12
std::pair< double, double > fg(double r) const
Performs asymptotic expansion for f and g at large r, up to order Nx in (1/r)
Definition: AsymptoticSpinor.hpp:58
Functions and classes used to solve the Dirac equation.
Definition: AsymptoticSpinor.hpp:8
constexpr double alpha
fine-structure constant
Definition: PhysConst_constants.hpp:13
constexpr double c
speed of light in a.u. (=1/alpha)
Definition: PhysConst_constants.hpp:17