High-precision calculations for one- and two-valence atomic systems
MixedStates.hpp
1#pragma once
2#include <vector>
3class Wavefunction;
4class DiracSpinor;
5class Grid;
6namespace MBPT {
7class CorrelationPotential;
8}
9namespace HF {
10class HartreeFock;
11class Breit;
12} // namespace HF
13
14//! External field: Mixed-states + Core Polarisation
15namespace ExternalField {
16
17constexpr bool print_final_eps = false;
18constexpr bool print_each_eps = false;
19
20/*!
21 @brief Solves the inhomogeneous TDHF (mixed-states) equation for perturbed orbital dF.
22 @details
23 Solves
24 \f[
25 (h_{\rm HF} - \en_a \mp \omega)\delta F + F_S = 0
26 \f]
27 for \f$ \delta F \f$, where \f$ F_S \f$ is the source term. Typically
28 \f[
29 F_S = (t_\pm + \delta V_\pm - \delta\en^a_\pm)\phi_a.
30 \f]
31
32 - The angular momentum \f$ \kappa \f$ of the solution is that of @p Fs.
33 - \f$ t \f$: Extenral field operator
34 - \f$ \delta V_\pm \f$: core polarisation correction (see @ref CorePolarisation)
35 - Solved iteratively using the Green's function method.
36
37 @param Fa Unperturbed orbital \f$ \phi_a \f$.
38 @param omega External-field frequency \f$ \omega \f$.
39 @param vl Local potential (nuclear + direct).
40 @param alpha Fine-structure constant.
41 @param core Core electrons (for exchange).
42 @param Fs Source term \f$ F_S \f$ (note sign: this is \f$ h\phi_a \f$,
43 not \f$ -h\phi_a \f$).
44 @param eps_target Convergence goal for the inhomogeneous ODE solver.
45 @param Sigma Optional correlation potential.
46 @param VBr Optional Breit interaction.
47 @param H_mag Magnetic part of QED radiative potential (electric part
48 should be included in @p vl).
49
50 @return Perturbed orbital \f$ \delta F \f$.
51*/
53 const DiracSpinor &Fa, double omega, const std::vector<double> &vl,
54 double alpha, const std::vector<DiracSpinor> &core, const DiracSpinor &Fs,
55 double eps_target = 1.0e-9,
56 const MBPT::CorrelationPotential *const Sigma = nullptr,
57 const HF::Breit *const VBr = nullptr, const std::vector<double> &H_mag = {});
58
59/*!
60 @brief As solveMixedState(), but updates an existing solution @p dF in place.
61 @details
62 Starts from @p dF as an initial guess rather than zero; converges faster if
63 @p dF is already an approximate solution (e.g., from a nearby frequency).
64
65 @note Near-resonant channels are handled automatically: \f$ (h_{\rm HF} -
66 \en_a \mp \omega) \f$ is (near-)singular for components along any same-kappa
67 bound state with \f$ \en_m \approx \en_a \pm \omega \f$ (the diagonal @p Fa,
68 fine-structure partners, etc.). These are projected out of the source,
69 the solution is forced orthogonal to them, and the off-diagonal components are
70 restored analytically. The caller need not pre-condition @p Fs.
71*/
72void solveMixedState(DiracSpinor &dF, const DiracSpinor &Fa, double omega,
73 const std::vector<double> &vl, double alpha,
74 const std::vector<DiracSpinor> &core,
75 const DiracSpinor &Fs, double eps_target = 1.0e-9,
76 const MBPT::CorrelationPotential *const Sigma = nullptr,
77 const HF::Breit *const VBr = nullptr,
78 const std::vector<double> &H_mag = {});
79
80//! Solves Mixed States (TDHF) equation. Overload; takes hf object
82solveMixedState(const DiracSpinor &Fa, double omega, const DiracSpinor &Fs,
83 const HF::HartreeFock *const hf, double eps_target = 1.0e-9,
84 const MBPT::CorrelationPotential *const Sigma = nullptr);
85
86//! Solves Mixed States (TDHF) equation. Overload; takes hf object
87void solveMixedState(DiracSpinor &dF, const DiracSpinor &Fa, double omega,
88 const DiracSpinor &Fs, const HF::HartreeFock *const hf,
89 double eps_target = 1.0e-9,
90 const MBPT::CorrelationPotential *const Sigma = nullptr);
91
92/*!
93 @brief Bound mixed-state solve with Anderson acceleration; the core
94 channels of @ref TDHF, and the bound channels of @ref TDHFcntm.
95 @details
96 Same physics and conditioning as @ref solveMixedState (in-place overload),
97 but the linear equation \f$ (h_{\rm HF} - \en_0)\,\delta F = -F_S \f$ is
98 solved by Anderson mixing (@ref anderson_coefficients) of the preconditioned
99 fixed-point map instead of damped iteration. At the high frequencies of
100 ionisation a bound channel's \f$ \en_0 = \en_a + \omega \f$ can sit near a
101 spurious eigenvalue of the local preconditioner
102 \f$ (h_{\rm local} + U_x - \en_0) \f$, where damped iteration diverges
103 although \f$ (h_{\rm HF} - \en_0) \f$ is non-singular; Anderson mixing
104 converges on the conditioning of the true operator. The iteration also
105 ends when the residual stops improving (the round-off floor of the solve,
106 which can lie above a tight @p eps_target): the best iterate is then
107 returned, with its residual in dF.eps(). Parameters as
108 @ref solveMixedState.
109*/
111 double omega, const std::vector<double> &vl,
112 double alpha,
113 const std::vector<DiracSpinor> &core,
114 const DiracSpinor &Fs, double eps_target = 1.0e-9,
115 const HF::Breit *const VBr = nullptr,
116 const std::vector<double> &H_mag = {});
117
118/*!
119 @brief Solves for dF via explicit sum over basis; mainly for tests.
120 @details
121 \f[
122 \delta F = \sum_n \frac{\ket{n}\matel{n}{F_S}{a}}{\en_a - \en_n \pm \omega}
123 \f]
124 where @p hFa is the already-evaluated source spinor \f$ F_S \f$.
125*/
127 double omega,
128 const std::vector<DiracSpinor> &basis);
129
130/*!
131 @brief Find bound states of the solve channel that make (h_l - e0) near-singular.
132 @details
133 For the channel of kappa @p kappa and energy \f$ e_0 = \en_a \pm \omega \f$,
134 the radial operator \f$ (h_l - e_0) \f$ is (near-)singular for components
135 along any bound core state \f$ \phi_m \f$ of the same kappa with
136 \f$ \en_m \approx e_0 \f$: exactly singular for the diagonal (\f$ \phi_a \f$,
137 \f$ \omega = 0 \f$) case, near-singular for e.g. fine-structure partners.
138 Those components cannot be resolved reliably by the Green's-function solve, so
139 they are projected out of the source (forces the solution orthogonal
140 to them), they should be restore the off-diagonal ones analytically afterwards.
141
142 The set is the same-kappa core states satisfying a relative nearness criterion
143 \f$ |e_0 - \en_m| < \eta\,|e_0 + \en_m| \f$ (\f$ \eta = 0.2 \f$), plus @p Fa
144 itself when it shares the channel kappa (the \f$ \matel{a}{\delta F}{} = 0 \f$
145 / left-orthogonality constraint).
146*/
147std::vector<const DiracSpinor *>
148conditioning_states(const std::vector<DiracSpinor> &core, const DiracSpinor &Fa,
149 int kappa, double e0);
150
151} // namespace ExternalField
Stores radial Dirac spinor: F_nk = (f, g)
Definition DiracSpinor.hpp:55
Non-uniform radial grid with Jacobian, suitable for atomic structure calculations.
Definition Grid.hpp:85
Breit potentials for one- (Hartree-Fock Breit) and two-body Breit integrals.
Definition Breit.hpp:88
Solves relativistic Hartree-Fock equations for core and valence. Optionally includes Breit and QED ef...
Definition HartreeFock.hpp:114
Correlation potential, Sigma, for valence states.
Definition CorrelationPotential.hpp:108
Stores Wavefunction (set of valence orbitals, grid, HF etc.)
Definition Wavefunction.hpp:48
Core-polarisation (RPA) corrections to matrix elements of an external field.
Definition MatrixElements.hpp:9
void solveMixedState_Anderson(DiracSpinor &dF, const DiracSpinor &Fa, const double omega, const std::vector< double > &vl, const double alpha, const std::vector< DiracSpinor > &core, const DiracSpinor &hFa, const double eps_target, const HF::Breit *const VBr, const std::vector< double > &H_mag)
Bound mixed-state solve with Anderson acceleration; the core channels of TDHF, and the bound channels...
Definition MixedStates.cpp:186
std::vector< const DiracSpinor * > conditioning_states(const std::vector< DiracSpinor > &core, const DiracSpinor &Fa, int kappa, double e0)
Find bound states of the solve channel that make (h_l - e0) near-singular.
Definition MixedStates.cpp:21
DiracSpinor solveMixedState(const DiracSpinor &Fa, double omega, const std::vector< double > &vl, double alpha, const std::vector< DiracSpinor > &core, const DiracSpinor &hFa, double eps_target, const MBPT::CorrelationPotential *const Sigma, const HF::Breit *const VBr, const std::vector< double > &H_mag)
Solves the inhomogeneous TDHF (mixed-states) equation for perturbed orbital dF.
Definition MixedStates.cpp:43
DiracSpinor solveMixedState_basis(const DiracSpinor &Fa, const DiracSpinor &hFa, double omega, const std::vector< DiracSpinor > &basis)
Solves for dF via explicit sum over basis; mainly for tests.
Definition MixedStates.cpp:294
Functions and classes for Hartree-Fock.
Definition CI_Integrals.hpp:16
Many-body perturbation theory.
Definition MatrixElements.hpp:12
void Breit(const IO::InputBlock &input, const Wavefunction &wf)
Breit corrections to HF energies.
Definition Breit.cpp:44