Mixer operating on real-space charge density vectors. More...
#include <init.hpp>
Inheritance diagram for q3::RealSpaceMixer:Public Types | |
| using | Preconditioner = std::function< void(std::vector< Real > &)> |
Public Member Functions | |
| void | initialize (const MixerEnvironment &environment) override |
| Supply the representation context the mixer needs before the first mix(). | |
| void | mix (const std::vector< std::vector< Real > > &input_density, std::vector< std::vector< Real > > &output_density, int number_of_spin_components) override |
| virtual std::vector< Real > | mix_one_component (const std::vector< Real > &input_density, const std::vector< Real > &output_density)=0 |
| Mixer (Real mixing_parameter, int history_depth) | |
| void | set_global_reduce (std::function< void(std::vector< Real > &)> global_reduce) |
| void | set_preconditioner (Preconditioner preconditioner) |
Public Member Functions inherited from q3::Mixer | |
| Mixer (Real mixing_parameter, int history_depth) | |
| virtual | ~Mixer ()=default |
| int | history_depth () const |
| Real | last_residual_norm () const |
| Real | mixing_parameter () const |
| virtual std::string | name () const =0 |
| virtual void | reset () |
Protected Attributes | |
| std::function< void(std::vector< Real > &)> | global_reduce_ |
| Preconditioner | preconditioner_ |
Protected Attributes inherited from q3::Mixer | |
| int | history_depth_ |
| Real | last_residual_norm_ {-1.0} |
| Real | mixing_parameter_ |
| using q3::RealSpaceMixer::Preconditioner = std::function<void(std::vector<Real>&)> |
|
inlineoverridevirtual |
Supply the representation context the mixer needs before the first mix().
Reimplemented from q3::Mixer.
Definition at line 22 of file init.hpp.
References q3::MixerEnvironment::global_reduce, and global_reduce_.
|
inlineoverridevirtual |
Mix one self-consistent field step using real-space densities.
| input_density | density used to build the potential (rho_in), per spin. |
| output_density | density from the bands (rho_out) on entry; overwritten with the mixed next-iteration density on exit, per spin. |
| number_of_spin_components | number of spin channels. |
Each mixer performs whatever internal transforms it needs (e.g. FFT to reciprocal space) so callers never branch on the mixer's space.
Implements q3::Mixer.
Definition at line 26 of file init.hpp.
References mix_one_component().
|
pure virtual |
Mix one spin component to produce the next input density.
| input_density | density used to build the potential (rho_in). |
| output_density | density from diagonalization/sum_band (rho_out). |
Implemented in q3::AndersonMixer.
Referenced by mix().
|
inline |
|
inline |
Definition at line 48 of file init.hpp.
References global_reduce_.
|
inline |
Definition at line 45 of file init.hpp.
References preconditioner_.
|
protected |
Definition at line 54 of file init.hpp.
Referenced by initialize(), q3::AndersonMixer::mix_one_component(), and set_global_reduce().
|
protected |
Definition at line 53 of file init.hpp.
Referenced by q3::AndersonMixer::mix_one_component(), and set_preconditioner().