ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
chg_drho.h
Go to the documentation of this file.
1#ifndef CHG_DRHO_H
2#define CHG_DRHO_H
3
4// Stateless residual kernels extracted from Charge_Mixing. Every input
5// (grid, geometry, mixing config) is passed explicitly; the functions do
6// not read Charge_Mixing members or PARAM/GlobalV.
7
8#include <complex>
9
10#include "chg_mix_cfg.h"
11
12namespace ModulePW
13{
14class PW_Basis;
15}
16
17class Charge;
18
19namespace module_charge
20{
21
33double cal_drho(Charge* chr,
34 const double nelec,
35 const ModulePW::PW_Basis& rhopw,
36 const MixingConfig& cfg,
37 const double omega,
38 const double tpiba);
39
50double cal_dkin(Charge* chr,
51 const double nelec,
52 const ModulePW::PW_Basis& rhopw,
53 const MixingConfig& cfg,
54 const double omega);
55
65double inner_product_real(const double* rho1,
66 const double* rho2,
67 const ModulePW::PW_Basis& rhopw,
68 const MixingConfig& cfg);
69
81double inner_product_recip_hartree(const std::complex<double>* rhog1,
82 const std::complex<double>* rhog2,
83 const ModulePW::PW_Basis& rhopw,
84 const MixingConfig& cfg,
85 const double omega,
86 const double tpiba);
87
88} // namespace module_charge
89
90#endif // CHG_DRHO_H
Definition charge.h:24
A class which can convert a function of "r" to the corresponding linear superposition of plane waves ...
Definition pw_basis.h:60
Definition pw_op.cpp:3
Charge-density symmetrization free functions.
Definition charge.h:18
double inner_product_real(const double *rho1, const double *rho2, const ModulePW::PW_Basis &rhopw, const MixingConfig &cfg)
Inner product of two real-space vectors used in real-space mixing.
Definition chg_drho.cpp:132
double cal_dkin(Charge *chr, const double nelec, const ModulePW::PW_Basis &rhopw, const MixingConfig &cfg, const double omega)
Kinetic-energy-density residual between chr->kin_r and chr->kin_r_save.
Definition chg_drho.cpp:89
double inner_product_recip_hartree(const std::complex< double > *rhog1, const std::complex< double > *rhog2, const ModulePW::PW_Basis &rhopw, const MixingConfig &cfg, const double omega, const double tpiba)
Hartree-like reciprocal inner product used in charge mixing.
Definition chg_drho_inner.cpp:388
double cal_drho(Charge *chr, const double nelec, const ModulePW::PW_Basis &rhopw, const MixingConfig &cfg, const double omega, const double tpiba)
Charge residual between chr->rho and chr->rho_save, normalized per electron.
Definition chg_drho.cpp:14