ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
charge_extra.h
Go to the documentation of this file.
1#ifndef CHARGE_EXTRA_H
2#define CHARGE_EXTRA_H
3
4#include "charge.h"
7#ifdef __MPI
9#endif
10
33{
34 public:
35
38
53 void Init_CE(const int& nspin, const int& natom, const int& nrxx, const std::string chg_extrap);
54
66 Parallel_Grid* Pgrid,
67 UnitCell& ucell,
68 Charge* chr,
70 std::ofstream& ofs_running,
71 std::ofstream& ofs_warning);
72
81 void update_all_dis(const UnitCell& ucell);
82
90 void update_delta_rho(const UnitCell& ucell, const Charge* chr, const Structure_Factor* sf);
91
92 private:
93 int istep = 0;
96 int nspin;
97
101
102 std::vector<std::vector<double>> delta_rho1;
103 std::vector<std::vector<double>> delta_rho2;
104 std::vector<std::vector<double>> delta_rho3;
105
106 double alpha;
107 double beta;
108
116 void find_alpha_and_beta(const int& natom, std::ofstream& ofs_running, std::ofstream& ofs_warning);
117};
118
119#endif
charge extrapolation method
Definition charge_extra.h:33
int rho_extr
the actually used method
Definition charge_extra.h:95
ModuleBase::Vector3< double > * dis_now
dis_now = pos_next - pos_now
Definition charge_extra.h:100
~Charge_Extra()
Definition charge_extra.cpp:13
void find_alpha_and_beta(const int &natom, std::ofstream &ofs_running, std::ofstream &ofs_warning)
determine alpha and beta
Definition charge_extra.cpp:200
std::vector< std::vector< double > > delta_rho3
the third last step difference of rho and atomic_rho
Definition charge_extra.h:104
std::vector< std::vector< double > > delta_rho1
the last step difference of rho and atomic_rho
Definition charge_extra.h:102
std::vector< std::vector< double > > delta_rho2
the second last step difference of rho and atomic_rho
Definition charge_extra.h:103
void update_all_dis(const UnitCell &ucell)
update displacements
Definition charge_extra.cpp:260
int istep
the current step
Definition charge_extra.h:93
void Init_CE(const int &nspin, const int &natom, const int &nrxx, const std::string chg_extrap)
Initialization of viriables used in charge extrapolation methods.
Definition charge_extra.cpp:23
Charge_Extra()
Definition charge_extra.cpp:9
void update_delta_rho(const UnitCell &ucell, const Charge *chr, const Structure_Factor *sf)
update the difference of charge density
Definition charge_extra.cpp:282
ModuleBase::Vector3< double > * dis_old2
dis_old1 = pos_now - pos_old1
Definition charge_extra.h:99
double alpha
parameter used in the second order extrapolation
Definition charge_extra.h:106
void extrapolate_charge(Parallel_Grid *Pgrid, UnitCell &ucell, Charge *chr, Structure_Factor *sf, std::ofstream &ofs_running, std::ofstream &ofs_warning)
charge extrapolation method
Definition charge_extra.cpp:77
ModuleBase::Vector3< double > * dis_old1
dis_old2 = pos_old1 - pos_old2
Definition charge_extra.h:98
int pot_order
the specified charge extrapolation method
Definition charge_extra.h:94
double beta
parameter used in the second order extrapolation
Definition charge_extra.h:107
int nspin
the number of spins
Definition charge_extra.h:96
Definition charge.h:20
3 elements vector
Definition vector3.h:22
Definition parallel_grid.h:8
Definition structure_factor.h:11
Definition unitcell.h:16