ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
pot_local.h
Go to the documentation of this file.
1#ifndef POTLOCAL_H
2#define POTLOCAL_H
3
5#include "pot_base.h"
6
7namespace elecstate
8{
9
10class PotLocal : public PotBase
11{
12 public:
13 PotLocal(const ModuleBase::matrix* vloc_in, // local pseduopotentials
14 const ModuleBase::ComplexMatrix* sf_in,
15 const ModulePW::PW_Basis* rho_basis_in,
16 double& vl_of_0)
17 : vloc_(vloc_in), sf_(sf_in), vl_of_0_(&vl_of_0)
18 {
19 assert(this->vloc_->nr == this->sf_->nr);
20 this->rho_basis_ = rho_basis_in;
21 this->ntype_ = this->vloc_->nr;
22 this->fixed_mode = true;
23 this->dynamic_mode = false;
24 }
25
26 void cal_fixed_v(double* vl_pseudo) override;
27
28 private:
29
31 double* vl_of_0_ = nullptr;
32
33 // std::vector<double> vltot;
34
35 const ModuleBase::matrix* vloc_ = nullptr; // local pseduopotentials
36 const ModuleBase::ComplexMatrix* sf_ = nullptr; // structure factors
37 int ntype_ = 0;
38};
39
40} // namespace elecstate
41
42#endif
Definition complexmatrix.h:14
Definition matrix.h:19
int nr
Definition matrix.h:23
A class which can convert a function of "r" to the corresponding linear superposition of plane waves ...
Definition pw_basis.h:56
Definition pot_base.h:22
const ModulePW::PW_Basis * rho_basis_
Definition pot_base.h:35
bool dynamic_mode
Definition pot_base.h:32
bool fixed_mode
Definition pot_base.h:31
Definition pot_local.h:11
double * vl_of_0_
save the value of vloc at G=0; this is a static member because there is only one vl(0) for all instan...
Definition pot_local.h:31
const ModuleBase::matrix * vloc_
Definition pot_local.h:35
void cal_fixed_v(double *vl_pseudo) override
Definition pot_local.cpp:14
PotLocal(const ModuleBase::matrix *vloc_in, const ModuleBase::ComplexMatrix *sf_in, const ModulePW::PW_Basis *rho_basis_in, double &vl_of_0)
Definition pot_local.h:13
int ntype_
Definition pot_local.h:37
const ModuleBase::ComplexMatrix * sf_
Definition pot_local.h:36
Definition cal_dm.h:10