ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
chg_dmr.h
Go to the documentation of this file.
1#ifndef CHG_DMR_H
2#define CHG_DMR_H
3
4// Stateless real-space density-matrix (DMR) mixing kernels extracted from
5// Charge_Mixing. The mixing history (Mixing_Data) and the Mixing strategy
6// object remain owned by Charge_Mixing and are passed in explicitly; the
7// functions do not read Charge_Mixing members or PARAM/GlobalV. The kernels
8// work on raw contiguous double buffers (one per spin channel) and do not
9// depend on DensityMatrix or HContainer; the caller extracts those buffers
10// from its LCAO containers.
11
12#include <vector>
13
14#include "chg_mix_cfg.h"
15
16namespace Base_Mixing
17{
18class Mixing;
19class Mixing_Data;
20} // namespace Base_Mixing
21
22namespace module_charge
23{
24
38void init_mixing_dmr(Base_Mixing::Mixing* mixing,
39 Base_Mixing::Mixing_Data& mdata,
40 const int nnr,
41 const MixingConfig& cfg);
42
59void mix_dmr(const std::vector<double*>& dmr_out,
60 const std::vector<const double*>& dmr_in,
61 const int nnr,
62 Base_Mixing::Mixing* mixing,
63 Base_Mixing::Mixing_Data& mdata,
64 const MixingConfig& cfg);
65
66} // namespace module_charge
67
68#endif // CHG_DMR_H
data for Mixing class
Definition mixing_data.h:14
Mixing class can mixing different steps of data to solver the iteration problem. For equation x = f(x...
Definition mixing.h:19
Definition broyden_mixing.cpp:8
Charge-density symmetrization free functions.
Definition charge.h:18
void mix_dmr(const std::vector< double * > &dmr_out, const std::vector< const double * > &dmr_in, const int nnr, Base_Mixing::Mixing *mixing, Base_Mixing::Mixing_Data &mdata, const MixingConfig &cfg)
Mix the real-space density matrix (LCAO calculations only).
Definition chg_dmr.cpp:130
void init_mixing_dmr(Base_Mixing::Mixing *mixing, Base_Mixing::Mixing_Data &mdata, const int nnr, const MixingConfig &cfg)
Allocate the mixing buffer for the real-space density matrix and clear its history.
Definition chg_dmr.cpp:95