47 const std::vector<int>* l_channel,
48 const std::vector<int>* flat_index,
93 std::vector<double>&
uom() {
return uom_; }
100 const std::vector<int>*
index_ =
nullptr;
std::vector< double > uom_
new / mixed flat occupation matrix
Definition occ_mixer.h:98
int flat_size() const
Total flat-buffer size (== Charge_Mixing::allocate_mixing_uom argument).
Definition occ_mixer.h:90
void seed_save(const OccupationMatrix &occmat)
Seed uom_save from an occupation matrix loaded from file.
Definition occ_mixer.cpp:17
void begin_iter(OccupationMatrix &occmat)
Begin an SCF iteration: flatten the saved occ into uom_save_.
Definition occ_mixer.cpp:23
std::vector< double > & uom_save()
Mutable access to the previous flat buffer (fed to mix_uom).
Definition occ_mixer.h:95
void collect(const OccupationMatrix &occmat)
Flatten the freshly-computed occupation matrix into uom_.
Definition occ_mixer.cpp:32
std::vector< double > uom_save_
previous flat occupation matrix
Definition occ_mixer.h:99
const UnitCell * cell_
borrowed unit cell
Definition occ_mixer.h:101
const std::vector< int > * index_
borrowed uterm_mat_index
Definition occ_mixer.h:100
void mix_plain(OccupationMatrix &occmat, double beta)
Plain linear mixing for the nested-matrix (LCAO) path: occ = beta * occ + (1 - beta) * occ_save.
Definition occ_mixer.cpp:44
std::vector< double > & uom()
Mutable access to the new / mixed flat buffer (fed to mix_uom).
Definition occ_mixer.h:93
void write_back(OccupationMatrix &occmat)
Write the (already mixed) uom_ buffer back into the occupation matrix. Called after the caller has ru...
Definition occ_mixer.cpp:38
void init(const UnitCell *cell, const std::vector< int > *l_channel, const std::vector< int > *flat_index, int nspin, int total_size)
Allocate the flat buffers and bind the layout table.
Definition occ_mixer.cpp:3
const std::vector< int > * l_channel_
borrowed l_channel table
Definition occ_mixer.h:102
int nspin_
Definition occ_mixer.h:103
On-site occupation matrices for DFT+U.
Definition occ_matrix.h:23
Provide the basic information about unitcell.
Definition unitcell.h:16