pub struct Scba {
pub hk: Vec<CMat>,
pub mean_field: CMat,
pub vertices: Vec<(f64, CMat)>,
}Expand description
SCBA problem: H(k) on a k grid, mean field ⟨V⟩ and second-order vertices.
Fields§
§hk: Vec<CMat>H(k) at each point of the k grid (orbitals of a unit cell): ⟨G⟩ averages over them.
mean_field: CMatMean field Σ_MF = ⟨V⟩.
vertices: Vec<(f64, CMat)>Vertices (w_t, V_t) of the second cumulant: Σ₂ = Σ_t w_t V_t ⟨G⟩ V_t.
Implementations§
Source§impl Scba
impl Scba
Sourcepub fn local_green(&self, z: c64, sigma: &CMat) -> CMat
pub fn local_green(&self, z: c64, sigma: &CMat) -> CMat
⟨G⟩(z) = (1/N_k) Σ_k [z − H(k) − Σ_MF − Σ₂]⁻¹. Large grids are summed in parallel, in
fixed chunks added in order, so the result does not depend on the number of threads.
Source§impl Scba
impl Scba
Sourcepub fn solve_anderson(
&self,
z: c64,
guess: &CMat,
depth: usize,
tol: f64,
max_iter: usize,
) -> Solution
pub fn solve_anderson( &self, z: c64, guess: &CMat, depth: usize, tol: f64, max_iter: usize, ) -> Solution
Fixed point Σ₂ = F(Σ₂) by Anderson acceleration (Anderson mixing, also known as DIIS)
on the residual F(Σ) − Σ with the last depth iterates, from guess, until the
largest change of an element is below tol. It needs far fewer k sums than
Self::solve. When the extrapolation misbehaves (non-finite values, a residual that
grows tenfold), the history is dropped and a plain step taken.
Source§impl Scba
impl Scba
Sourcepub fn from_model(model: &Model, grid: &[usize], disorder: Disorder) -> Self
pub fn from_model(model: &Model, grid: &[usize], disorder: Disorder) -> Self
The SCBA of model with disorder, H(k) sampled on a uniform grid of the Brillouin
zone with grid[a] points along reciprocal direction a (one size per lattice
direction; the 2D grid is k_grid). The unit cell holds every sublattice, so the
matrices of disorder act on all the orbitals of a cell.
Sourcepub fn self_energy(&self, energy: f64, eta: f64) -> Solution
pub fn self_energy(&self, energy: f64, eta: f64) -> Solution
Second-order self-energy Σ₂ at energy + iη, from zero, by Anderson acceleration to a
largest change of 1e-11 (at most 500 k sums).
Sourcepub fn sweep(&self, energies: &[f64], eta: f64) -> Vec<Solution>
pub fn sweep(&self, energies: &[f64], eta: f64) -> Vec<Solution>
Self::self_energy at each energy, each solution starting from the previous one.
Sourcepub fn total_self_energy(&self, sigma: &CMat) -> CMat
pub fn total_self_energy(&self, sigma: &CMat) -> CMat
The whole self-energy Σ_MF + Σ₂.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scba
impl RefUnwindSafe for Scba
impl Send for Scba
impl Sync for Scba
impl Unpin for Scba
impl UnsafeUnpin for Scba
impl UnwindSafe for Scba
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more