ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
Charge Class Reference

#include <charge.h>

Collaboration diagram for Charge:

Public Member Functions

 Charge ()
 
 ~Charge ()
 
void set_rhopw (ModulePW::PW_Basis *rhopw_in)
 
void init_rho (elecstate::efermi &eferm_iout, const UnitCell &ucell, const Parallel_Grid &pgrid, const ModuleBase::ComplexMatrix &strucFac, ModuleSymmetry::Symmetry &symm, const void *klist=nullptr, const void *wfcpw=nullptr)
 Init charge density from file or atomic pseudo-wave-functions.
 
void allocate (const int &nspin_in)
 
void atomic_rho (const int spin_number_need, const double &omega, double **rho_in, const ModuleBase::ComplexMatrix &strucFac, const UnitCell &ucell) const
 
void set_rho_core (const UnitCell &ucell, const ModuleBase::ComplexMatrix &structure_factor, const bool *numeric)
 
void set_rho_core_paw ()
 
void renormalize_rho ()
 
double sum_rho () const
 
void save_rho_before_sum_band ()
 
void non_linear_core_correction (const bool &numeric, const double omega, const double tpiba2, const int mesh, const double *r, const double *rab, const double *rhoc, double *rhocg) const
 
double cal_rho2ne (const double *rho_in) const
 
void check_rho ()
 
void init_final_scf ()
 
void init_chgmpi ()
 init some arrays for mpi_inter_pools, rho_mpi
 
void rho_mpi ()
 Sum rho at different pools (k-point parallelism). Only used when GlobalV::KPAR > 1.
 
void reduce_diff_pools (double *array_rho) const
 Reduce among different pools If NPROC_IN_POOLs are all the same, use GlobalV::KP_WORLD else, gather rho in a POOL, and then reduce among different POOLs.
 
void set_omega (double *omega_in)
 

Public Attributes

double ** rho = nullptr
 
double ** rho_save = nullptr
 
std::complex< double > ** rhog = nullptr
 
std::complex< double > ** rhog_save = nullptr
 
double ** kin_r = nullptr
 
double ** kin_r_save = nullptr
 
const Parallel_Gridpgrid = nullptr
 
double ** nhat = nullptr
 
double ** nhat_save = nullptr
 
double * rho_core = nullptr
 
std::complex< double > * rhog_core = nullptr
 
int prenspin = 1
 
int nrxx =0
 
int nxyz = 0
 
int ngmc =0
 
int nspin =0
 
ModulePW::PW_Basisrhopw = nullptr
 
bool cal_elf = false
 

Private Member Functions

void destroy ()
 

Private Attributes

double * _space_rho = nullptr
 
double * _space_rho_save = nullptr
 
std::complex< double > * _space_rhog = nullptr
 
std::complex< double > * _space_rhog_save = nullptr
 
double * _space_kin_r = nullptr
 
double * _space_kin_r_save = nullptr
 
double * omega_ = nullptr
 
bool allocate_rho
 
bool allocate_rho_final_scf
 
int * rec = nullptr
 
int * dis = nullptr
 

Constructor & Destructor Documentation

◆ Charge()

Charge::Charge ( )

◆ ~Charge()

Charge::~Charge ( )
Here is the call graph for this function:

Member Function Documentation

◆ allocate()

void Charge::allocate ( const int &  nspin_in)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atomic_rho()

void Charge::atomic_rho ( const int  spin_number_need,
const double &  omega,
double **  rho_in,
const ModuleBase::ComplexMatrix strucFac,
const UnitCell ucell 
) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_rho2ne()

double Charge::cal_rho2ne ( const double *  rho_in) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_rho()

void Charge::check_rho ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ destroy()

void Charge::destroy ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_chgmpi()

void Charge::init_chgmpi ( )

init some arrays for mpi_inter_pools, rho_mpi

Here is the caller graph for this function:

◆ init_final_scf()

void Charge::init_final_scf ( )
Here is the call graph for this function:

◆ init_rho()

void Charge::init_rho ( elecstate::efermi eferm_iout,
const UnitCell ucell,
const Parallel_Grid pgrid,
const ModuleBase::ComplexMatrix strucFac,
ModuleSymmetry::Symmetry symm,
const void *  klist = nullptr,
const void *  wfcpw = nullptr 
)

Init charge density from file or atomic pseudo-wave-functions.

Parameters
eferm_iout[out] fermi energy to be initialized
ucell[in] unit cell
strucFac[in] structure factor
symm[in] symmetry
klist[in] k points list if needed
wfcpw[in] PW basis for wave function if needed
Here is the call graph for this function:
Here is the caller graph for this function:

◆ non_linear_core_correction()

void Charge::non_linear_core_correction ( const bool &  numeric,
const double  omega,
const double  tpiba2,
const int  mesh,
const double *  r,
const double *  rab,
const double *  rhoc,
double *  rhocg 
) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduce_diff_pools()

void Charge::reduce_diff_pools ( double *  array_rho) const

Reduce among different pools If NPROC_IN_POOLs are all the same, use GlobalV::KP_WORLD else, gather rho in a POOL, and then reduce among different POOLs.

Parameters
array_rhof(rho): an array [nrxx]
Here is the call graph for this function:
Here is the caller graph for this function:

◆ renormalize_rho()

void Charge::renormalize_rho ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rho_mpi()

void Charge::rho_mpi ( )

Sum rho at different pools (k-point parallelism). Only used when GlobalV::KPAR > 1.

Here is the call graph for this function:

◆ save_rho_before_sum_band()

void Charge::save_rho_before_sum_band ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_omega()

void Charge::set_omega ( double *  omega_in)
inline
Here is the caller graph for this function:

◆ set_rho_core()

void Charge::set_rho_core ( const UnitCell ucell,
const ModuleBase::ComplexMatrix structure_factor,
const bool *  numeric 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_rho_core_paw()

void Charge::set_rho_core_paw ( )
Here is the call graph for this function:

◆ set_rhopw()

void Charge::set_rhopw ( ModulePW::PW_Basis rhopw_in)
Here is the caller graph for this function:

◆ sum_rho()

double Charge::sum_rho ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _space_kin_r

double* Charge::_space_kin_r = nullptr
private

◆ _space_kin_r_save

double* Charge::_space_kin_r_save = nullptr
private

◆ _space_rho

double* Charge::_space_rho = nullptr
private

◆ _space_rho_save

double* Charge::_space_rho_save = nullptr
private

◆ _space_rhog

std::complex<double>* Charge::_space_rhog = nullptr
private

◆ _space_rhog_save

std::complex<double>* Charge::_space_rhog_save = nullptr
private

◆ allocate_rho

bool Charge::allocate_rho
private

◆ allocate_rho_final_scf

bool Charge::allocate_rho_final_scf
private

◆ cal_elf

bool Charge::cal_elf = false

◆ dis

int* Charge::dis = nullptr
private

◆ kin_r

double** Charge::kin_r = nullptr

◆ kin_r_save

double** Charge::kin_r_save = nullptr

◆ ngmc

int Charge::ngmc =0

◆ nhat

double** Charge::nhat = nullptr

◆ nhat_save

double** Charge::nhat_save = nullptr

◆ nrxx

int Charge::nrxx =0

◆ nspin

int Charge::nspin =0

◆ nxyz

int Charge::nxyz = 0

◆ omega_

double* Charge::omega_ = nullptr
private

◆ pgrid

const Parallel_Grid* Charge::pgrid = nullptr

◆ prenspin

int Charge::prenspin = 1

◆ rec

int* Charge::rec = nullptr
private

◆ rho

double** Charge::rho = nullptr

◆ rho_core

double* Charge::rho_core = nullptr

◆ rho_save

double** Charge::rho_save = nullptr

◆ rhog

std::complex<double>** Charge::rhog = nullptr

◆ rhog_core

std::complex<double>* Charge::rhog_core = nullptr

◆ rhog_save

std::complex<double>** Charge::rhog_save = nullptr

◆ rhopw

ModulePW::PW_Basis* Charge::rhopw = nullptr

The documentation for this class was generated from the following files: