ampsci
c++ program for high-precision atomic structure calculations of single-valence systems
ContinuumState.hpp
1 #pragma once
2 #include "AdamsMoulton.hpp"
3 #include <utility>
4 #include <vector>
5 class DiracSpinor;
6 class Grid;
7 
8 namespace DiracODE {
9 
12 
17 void solveContinuum(DiracSpinor &Fa, double en, const std::vector<double> &v,
18  double alpha, const DiracSpinor *const VxFa = nullptr,
19  const DiracSpinor *const Fa0 = nullptr);
20 
22 double analytic_f_amplitude(double en, double alpha);
23 
25 
34 std::pair<double, double> numerical_f_amplitude(double en, int kappa,
35  double alpha, double Zeff,
36  double f_final, double g_final,
37  double r_final, double dr);
38 
41  : AdamsMoulton::DerivativeMatrix<double, double> {
42 
43  DiracContinuumDerivative(double in_Zeff, const int in_kappa,
44  const double in_en, const double in_alpha)
45  : Zeff(in_Zeff),
46  kappa(in_kappa),
47  en(in_en),
48  alpha(in_alpha),
49  cc(1.0 / alpha) {}
50 
51  double Zeff = 1.0;
52  int kappa;
53  double en, alpha, cc;
54 
55  double a(double r) const final { return double(-kappa) / r; }
56  double b(double r) const final {
57  return (alpha * en + 2.0 * cc + Zeff * alpha / r);
58  }
59  double c(double r) const final { return -alpha * (Zeff / r + en); }
60  double d(double r) const final { return -a(r); }
61 };
62 
65 double fitQuadratic(double x1, double x2, double x3, double y1, double y2,
66  double y3);
67 
68 } // namespace DiracODE
Stores radial Dirac spinor: F_nk = (f, g)
Definition: DiracSpinor.hpp:41
Holds grid, including type + Jacobian (dr/du)
Definition: Grid.hpp:31
Functions and classes used to solve the Dirac equation.
Definition: AsymptoticSpinor.hpp:8
void solveContinuum(DiracSpinor &Fa, double en, const std::vector< double > &v, double alpha, const DiracSpinor *const VxFa, const DiracSpinor *const Fa0)
For given energy en (en > 0), solves Dirac eq. for continuum state (with energy normalisation).
Definition: ContinuumState.cpp:14
double fitQuadratic(double x1, double x2, double x3, double y1, double y2, double y3)
Fits a quadratic to three points {x,y}, assuming |y2| = max(|y1|,|y2|,|y3|).
Definition: ContinuumState.cpp:189
std::pair< double, double > numerical_f_amplitude(double en, int kappa, double alpha, double Zeff, double f_final, double g_final, double r_final, double dr)
Finds the (numerical) amplitude of f(r) continuum Dirac solution at large r.
Definition: ContinuumState.cpp:83
double analytic_f_amplitude(double en, double alpha)
Analytic amplitude of f(r) at very large r, for H-like Dirac continuum.
Definition: ContinuumState.cpp:179
Pure-virtual struct, holds the derivative matrix for 2x2 system of ODEs. Derive from this,...
Definition: AdamsMoulton.hpp:79
Derivative function for H-like; valid for continuum states at large r.
Definition: ContinuumState.hpp:41
double a(double r) const final
a,b,c,d are derivative matrix functions; all must be user implemented
Definition: ContinuumState.hpp:55