|
ampsci
High-precision calculations for one- and two-valence atomic systems
|
Functions and classes used to solve the Dirac equation.
Classes | |
| class | AsymptoticSpinor |
| Performs asymptotic expansion for f and g at large r, up to order Nx in (1/r). More... | |
| struct | DiracContinuumDerivative |
| H-like Dirac derivative matrix for continuum states at large r. More... | |
Functions | |
| void | boundState (DiracSpinor &Fa, const double en0, const std::vector< double > &v, const std::vector< double > &H_off_diag={}, const double alpha=PhysConst::alpha, double eps=1.0e-14, const DiracSpinor *const VxFa=nullptr, const DiracSpinor *const Fa0=nullptr, double zion=1, double mass=1.0) |
| Solves bound-state problem for local potential (en < 0). | |
| void | regularAtOrigin (DiracSpinor &Fa, const double en, const std::vector< double > &v, const std::vector< double > &H_off_diag, const double alpha, const DiracSpinor *const VxFa=nullptr, const DiracSpinor *const Fa0=nullptr, double zion=1, double mass=1.0) |
| For given energy en, solves DE with correct boundary conditions at the origin. | |
| void | regularAtInfinity (DiracSpinor &Fa, const double en, const std::vector< double > &v, const std::vector< double > &H_off_diag, const double alpha, const DiracSpinor *const VxFa=nullptr, const DiracSpinor *const Fa0=nullptr, double zion=1, double mass=1.0) |
| For given energy en, solves (local) DE with correct boundary conditions at infinity. | |
| DiracSpinor | boundState (int n, int kappa, const double en0, const std::shared_ptr< const Grid > &gr, const std::vector< double > &v, const std::vector< double > &H_off_diag={}, const double alpha=PhysConst::alpha, double eps=1.0e-14, const DiracSpinor *const VxFa=nullptr, const DiracSpinor *const Fa0=nullptr, double zion=1, double mass=1.0) |
| Factory overload: constructs a DiracSpinor(n, kappa, gr) and calls boundState(). | |
| void | regularAtOrigin_C (DiracSpinor &FaR, DiracSpinor &FaI, const std::complex< double > en, const std::vector< double > &v, const std::vector< double > &H_off_diag, const double alpha) |
| For given complex energy en, solves Dirac equation with correct boundary conditions at the origin. | |
| void | regularAtInfinity_C (DiracSpinor &FaR, DiracSpinor &FaI, const std::complex< double > en, const std::vector< double > &v, const std::vector< double > &H_off_diag, const double alpha) |
| For given complex energy en, solves Dirac equation with correct boundary conditions at infinity. | |
| void | solveContinuum (DiracSpinor &Fa, double en, const std::vector< double > &v, double alpha, const DiracSpinor *const VxFa=nullptr, const DiracSpinor *const Fa0=nullptr) |
| Solves Dirac equation for a continuum state (en > 0) with energy normalisation. | |
| 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 and phase of f(r) for a continuum Dirac solution at large r. | |
| double | analytic_f_amplitude (double en, double alpha) |
| Analytic amplitude of f(r) at very large r for an H-like Dirac continuum state. | |
| double | fitQuadratic (double x1, double x2, double x3, double y1, double y2, double y3) |
| Fits a quadratic to three points and returns the interpolated maximum. | |
| DiracSpinor | solve_inhomog (const int kappa, const double en, const std::vector< double > &v, const std::vector< double > &H_mag, const double alpha, const DiracSpinor &source, const DiracSpinor *const VxFa=nullptr, const DiracSpinor *const Fa0=nullptr, double zion=1, double mass=1.0) |
| Solves the inhomogeneous Dirac equation, returning the solution spinor. | |
| void | solve_inhomog (DiracSpinor &Fa, const double en, const std::vector< double > &v, const std::vector< double > &H_mag, const double alpha, const DiracSpinor &source, const DiracSpinor *const VxFa=nullptr, const DiracSpinor *const Fa0=nullptr, double zion=1, double mass=1.0) |
| Solves the inhomogeneous Dirac equation, overwriting Fa. | |
| void | solve_inhomog (DiracSpinor &Fa, DiracSpinor &Fzero, DiracSpinor &Finf, const double en, const std::vector< double > &v, const std::vector< double > &H_mag, const double alpha, const DiracSpinor &source, const DiracSpinor *const VxFa=nullptr, const DiracSpinor *const Fa0=nullptr, double zion=1, double mass=1.0) |
| Solves the inhomogeneous Dirac equation, overwriting Fa and exposing the homogeneous solutions. | |
| void DiracODE::boundState | ( | DiracSpinor & | Fa, |
| const double | en0, | ||
| const std::vector< double > & | v, | ||
| const std::vector< double > & | H_off_diag = {}, |
||
| const double | alpha = PhysConst::alpha, |
||
| double | eps = 1.0e-14, |
||
| const DiracSpinor *const | VxFa = nullptr, |
||
| const DiracSpinor *const | Fa0 = nullptr, |
||
| double | zion = 1, |
||
| double | mass = 1.0 |
||
| ) |
Solves bound-state problem for local potential (en < 0).
Solves \( (H_0 + v - \epsilon_a)F_a = 0 \) for the bound state. en0 is the initial energy guess (must be reasonably good). eps is the convergence target for the energy.
v is the local potential (e.g., v = v_dir + v_nuc)H_off_diag is an optional off-diagonal potentialalpha: \( \alpha = \lambda\alpha_0 \) is the effective fine-structure constant | void DiracODE::regularAtOrigin | ( | DiracSpinor & | Fa, |
| const double | en, | ||
| const std::vector< double > & | v, | ||
| const std::vector< double > & | H_mag, | ||
| const double | alpha, | ||
| const DiracSpinor *const | VxFa, | ||
| const DiracSpinor *const | Fa0, | ||
| double | zion, | ||
| double | mass | ||
| ) |
For given energy en, solves DE with correct boundary conditions at the origin.
| void DiracODE::regularAtInfinity | ( | DiracSpinor & | Fa, |
| const double | en, | ||
| const std::vector< double > & | v, | ||
| const std::vector< double > & | H_mag, | ||
| const double | alpha, | ||
| const DiracSpinor *const | VxFa, | ||
| const DiracSpinor *const | Fa0, | ||
| double | zion, | ||
| double | mass | ||
| ) |
For given energy en, solves (local) DE with correct boundary conditions at infinity.
|
inline |
Factory overload: constructs a DiracSpinor(n, kappa, gr) and calls boundState().
| void DiracODE::regularAtOrigin_C | ( | DiracSpinor & | FaR, |
| DiracSpinor & | FaI, | ||
| const std::complex< double > | en, | ||
| const std::vector< double > & | v, | ||
| const std::vector< double > & | H_mag, | ||
| const double | alpha | ||
| ) |
For given complex energy en, solves Dirac equation with correct boundary conditions at the origin.
| void DiracODE::regularAtInfinity_C | ( | DiracSpinor & | FaR, |
| DiracSpinor & | FaI, | ||
| const std::complex< double > | en, | ||
| const std::vector< double > & | v, | ||
| const std::vector< double > & | H_mag, | ||
| const double | alpha | ||
| ) |
For given complex energy en, solves Dirac equation with correct boundary conditions at infinity.
| void DiracODE::solveContinuum | ( | DiracSpinor & | Fa, |
| double | en, | ||
| const std::vector< double > & | v, | ||
| double | alpha, | ||
| const DiracSpinor *const | VxFa = nullptr, |
||
| const DiracSpinor *const | Fa0 = nullptr |
||
| ) |
Solves Dirac equation for a continuum state (en > 0) with energy normalisation.
Normalisation is achieved by continuing the ODE integration to very large r and comparing the asymptotic amplitude to that of the analytic solution. Only the solution on the regular grid is kept; the extended part is discarded.
| Fa | Output spinor (result stored here). |
| en | Continuum energy (must be > 0). |
| v | Local potential v(r). |
| alpha | Fine-structure constant. |
| VxFa | Optional exchange potential. If nullptr, ignored. |
| Fa0 | Optional inhomogeneous source spinor. If nullptr, ignored. |
| std::pair< double, double > DiracODE::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 and phase of f(r) for a continuum Dirac solution at large r.
Continues ODE integration beyond the regular grid until both the wavelength and amplitude become constant. Assumes an H-like potential (-Zeff/r) and a linearly-spaced extension grid with step dr.
| en | Continuum energy. |
| kappa | Orbital kappa quantum number. |
| alpha | Fine-structure constant. |
| Zeff | Effective nuclear charge. |
| f_final | Value of f at the end of the regular grid. |
| g_final | Value of g at the end of the regular grid. |
| r_final | Radial position at the end of the regular grid. |
| dr | Step size for the extended linear grid. |
| double DiracODE::analytic_f_amplitude | ( | double | en, |
| double | alpha | ||
| ) |
Analytic amplitude of f(r) at very large r for an H-like Dirac continuum state.
| en | Continuum energy. |
| alpha | Fine-structure constant. |
| double DiracODE::fitQuadratic | ( | double | x1, |
| double | x2, | ||
| double | x3, | ||
| double | y1, | ||
| double | y2, | ||
| double | y3 | ||
| ) |
Fits a quadratic to three points and returns the interpolated maximum.
Assumes |y2| = max(|y1|, |y2|, |y3|); used to find the amplitude of a sinusoidal oscillation. The three points must be close to the maximum.
| x1,x2,x3 | x-coordinates of the three points. |
| y1,y2,y3 | y-coordinates of the three points. |
| DiracSpinor DiracODE::solve_inhomog | ( | const int | kappa, |
| const double | en, | ||
| const std::vector< double > & | v, | ||
| const std::vector< double > & | H_mag, | ||
| const double | alpha, | ||
| const DiracSpinor & | source, | ||
| const DiracSpinor *const | VxFa = nullptr, |
||
| const DiracSpinor *const | Fa0 = nullptr, |
||
| double | zion = 1, |
||
| double | mass = 1.0 |
||
| ) |
Solves the inhomogeneous Dirac equation, returning the solution spinor.
Solves \( (H_0 + v - \epsilon_a) F_a = S \) for \( \psi_\kappa \) using Green's method (see Methods documentation). Note the sign convention for S.
| kappa | Angular momentum kappa of the solution. |
| en | Orbital energy \( \epsilon \). |
| v | Local potential v(r). |
| H_mag | Off-diagonal (magnetic) potential. |
| alpha | Fine-structure constant. |
| source | Inhomogeneous source term S. |
| VxFa | Optional exchange potential. If nullptr, ignored. |
| Fa0 | Optional inhomogeneous source spinor. If nullptr, ignored. |
| zion | Effective ionic charge (default 1). |
| mass | Effective particle mass in atomic units (default 1 = m_e). |
| void DiracODE::solve_inhomog | ( | DiracSpinor & | Fa, |
| const double | en, | ||
| const std::vector< double > & | v, | ||
| const std::vector< double > & | H_mag, | ||
| const double | alpha, | ||
| const DiracSpinor & | source, | ||
| const DiracSpinor *const | VxFa = nullptr, |
||
| const DiracSpinor *const | Fa0 = nullptr, |
||
| double | zion = 1, |
||
| double | mass = 1.0 |
||
| ) |
Solves the inhomogeneous Dirac equation, overwriting Fa.
As above; kappa is taken from Fa.
| void DiracODE::solve_inhomog | ( | DiracSpinor & | Fa, |
| DiracSpinor & | Fzero, | ||
| DiracSpinor & | Finf, | ||
| const double | en, | ||
| const std::vector< double > & | v, | ||
| const std::vector< double > & | H_mag, | ||
| const double | alpha, | ||
| const DiracSpinor & | source, | ||
| const DiracSpinor *const | VxFa = nullptr, |
||
| const DiracSpinor *const | Fa0 = nullptr, |
||
| double | zion = 1, |
||
| double | mass = 1.0 |
||
| ) |
Solves the inhomogeneous Dirac equation, overwriting Fa and exposing the homogeneous solutions.
As above, but also returns the homogeneous solutions Fzero (regular at origin) and Finf (regular at infinity), which satisfy \( (H_0 + v - \epsilon)F = 0 \). The first two overloads discard these; this one keeps them for potential reuse. Fzero and Finf are out parameters – they are overwritten internally and do not need to be initialised before calling.