Loading...
Searching...
No Matches
q3::Preconditioner Class Referenceabstract

Abstract base class for all SCF residual preconditioners. More...

#include <init.hpp>

+ Inheritance diagram for q3::Preconditioner:

Public Member Functions

virtual ~Preconditioner ()=default
 
virtual void apply (std::vector< Complex > &residual_g) const =0
 
virtual std::string name () const =0
 
virtual void update (const std::vector< Real > &)
 

Detailed Description

Abstract base class for all SCF residual preconditioners.

Definition at line 26 of file init.hpp.

Constructor & Destructor Documentation

◆ ~Preconditioner()

virtual q3::Preconditioner::~Preconditioner ( )
virtualdefault

Member Function Documentation

◆ apply()

virtual void q3::Preconditioner::apply ( std::vector< Complex > &  residual_g) const
pure virtual

Apply the preconditioner to one G-space residual channel, in place.

Callers pass the TOTAL charge channel only: the magnetization channel has no Coulomb kernel to screen, and damping its long-wavelength components would freeze slow moment relaxation. The G = 0 component must be left untouched — it is fixed by charge conservation, and the mixing metric excludes it for the same reason.

Parameters
residual_gresidual in reciprocal space; overwritten with the preconditioned residual.

Implemented in q3::NoPreconditioner, q3::KerkerPreconditioner, and q3::LocalThomasFermiPreconditioner.

◆ name()

virtual std::string q3::Preconditioner::name ( ) const
pure virtual

◆ update()

virtual void q3::Preconditioner::update ( const std::vector< Real > &  )
inlinevirtual

Supply the current real-space input density, summed over spin channels, before the next apply().

Density-independent preconditioners (identity, Kerker) ignore it. One built from the local density recomputes its screening from it, which is why this is a separate call: the mixer knows when the density is current, and apply() may run more than once per SCF step.

Reimplemented in q3::LocalThomasFermiPreconditioner.

Definition at line 55 of file init.hpp.


The documentation for this class was generated from the following file: