2#include "Physics/PhysConst_constants.hpp"
3#include "qip/Maths.hpp"
28template <
typename T =
double, std::
size_t Nx = 15>
32 struct ExplicitLambda {};
37 double alpha, m_mass, eps_target;
38 double kappa2, alpha2, c;
49 T in_lambda,
double in_alpha,
double in_eps_target,
double m)
55 eps_target(in_eps_target),
56 kappa2(
double(kappa * kappa)),
57 alpha2(alpha * alpha),
60 sigma((m + en * alpha2) * (Zeff / lambda)),
61 A_large(std::sqrt(1.0 + 0.5 * en * alpha2 / m_mass)),
62 A_small(lambda * alpha / (2.0 * m_mass * A_large)),
69 double in_eps_target = 1.0e-14,
double m = 1.0)
71 ExplicitLambda{}, in_kappa, in_Zeff, in_en,
72 std::sqrt(-in_en * (2.0 * m + in_en * in_alpha * in_alpha)), in_alpha,
87 double in_eps_target = 1.0e-14,
90 in_lambda, in_alpha, in_eps_target, m);
109 std::pair<T, T>
fg(
double r)
const {
116 const T rfac = std::pow(r, sigma) * std::exp(-lambda * r);
120 for (std::size_t k = 0; k < Nx; k++) {
121 const auto rkp1 =
qip::pow(r,
int(k) + 1);
122 const auto df = ax[k] / rkp1;
123 const auto dg = bx[k] / rkp1;
126 const auto eps = std::max(std::abs(df / fs), std::abs(dg / gs));
127 if (eps < eps_target) {
132 return {rfac * (A_large * fs + A_small * gs),
133 rfac * (A_large * gs - A_small * fs)};
138 std::array<T, Nx> make_bx()
const {
140 std::array<T, Nx> tbx;
141 const auto Zalpha2 = Zeff * Zeff * alpha2;
142 tbx[0] = (kappa / m_mass + (Zeff / lambda)) * (0.5 * alpha);
143 for (std::size_t i = 1; i < Nx; i++) {
144 tbx[i] = (kappa2 - qip::pow<2>((
double(i) - sigma)) - Zalpha2) *
145 tbx[i - 1] / (
double(2 * i) * lambda);
150 std::array<T, Nx> make_ax()
const {
153 std::array<T, Nx> tax;
154 const auto RenAlpha2 = m_mass + en * alpha2;
155 for (std::size_t i = 0; i < Nx; i++) {
156 tax[i] = (kappa * m_mass + (double(i + 1) - sigma) * RenAlpha2 -
157 Zeff * lambda * alpha2) *
158 (bx[i] *
c) / (
double(i + 1) * lambda);
214template <std::
size_t Nx = 15>
217 using Complex = std::complex<double>;
223 double m_amplitude_large;
234 double eps_target = 1.0e-14,
double m = 1.0)
235 : p(std::sqrt(en * (2.0 * m + en * alpha * alpha))),
236 m_beta(std::sqrt(en * alpha * alpha / (2.0 * m + en * alpha * alpha))),
237 m_amplitude_large(std::sqrt(alpha / (M_PI * m_beta))),
238 m_scale(m_amplitude_large /
239 std::sqrt(1.0 + 0.5 * en * alpha * alpha / m)),
241 kappa, Zeff, Complex{en}, Complex{0.0, p}, alpha, eps_target, m)) {
242 assert(en > 0.0 &&
"Must have en>0 in AsymptoticSpinorContinuum");
250 double beta()
const {
return m_beta; }
261 const auto [f, g] = m_expansion.
fg(r);
262 return {m_scale * f.real(), m_scale * g.real(), m_scale * f.imag(),
Large-r Dirac-Coulomb oscillating tail spinors of a continuum (en > 0) state, energy-normalised.
Definition AsymptoticSpinor.hpp:215
double momentum() const
Relativistic momentum p = sqrt(en(en+2c^2))/c.
Definition AsymptoticSpinor.hpp:246
double amplitude_large() const
Energy-normalised large-component amplitude A_L = sqrt(alpha/(pi*beta)).
Definition AsymptoticSpinor.hpp:248
ContinuumTailSpinors fg(double r) const
Returns the two real oscillating tail spinors {F^C, G^C} at r.
Definition AsymptoticSpinor.hpp:260
double beta() const
Small/large amplitude ratio beta = sqrt(en/(en+2c^2)).
Definition AsymptoticSpinor.hpp:250
Performs asymptotic expansion for f and g at large r, up to order Nx in (1/r).
Definition AsymptoticSpinor.hpp:29
std::pair< T, T > fg(double r) const
Returns {f(r), g(r)} via asymptotic expansion at large r.
Definition AsymptoticSpinor.hpp:109
static AsymptoticSpinor with_lambda(int in_kappa, double in_Zeff, T in_en, T in_lambda, double in_alpha=PhysConst::alpha, double in_eps_target=1.0e-14, double m=1.0)
Constructs with an explicitly chosen lambda (exponent in exp(-lambda r)), i.e. with a chosen branch o...
Definition AsymptoticSpinor.hpp:84
Functions and classes used to solve the Dirac equation.
Definition AsymptoticSpinor.hpp:10
double fC
F^C = {fC, gC}, large ~ cos.
Definition AsymptoticSpinor.hpp:174
double fG
G^C = {fG, gG}, large ~ sin.
Definition AsymptoticSpinor.hpp:176
Pair of oscillating continuum spinor values at one radius: the regular (F) and irregular (G) large-r ...
Definition AsymptoticSpinor.hpp:172
constexpr double alpha
Fine-structure constant: alpha = 1/137.035 999 177(21) [CODATA 2022].
Definition PhysConst_constants.hpp:24
constexpr double c
speed of light in a.u. (=1/alpha)
Definition PhysConst_constants.hpp:63
constexpr auto pow(T x)
x^n for compile-time integer n, x any arithmetic type.
Definition Maths.hpp:98