diff --git a/source/module_rdmft/rdmft_tools.cpp b/source/module_rdmft/rdmft_tools.cpp index fa19e39a8f..b3cdf58e3e 100644 --- a/source/module_rdmft/rdmft_tools.cpp +++ b/source/module_rdmft/rdmft_tools.cpp @@ -2,7 +2,6 @@ // Author: Jingang Han // DATE : 2024-03-11 //========================================================== - #include "module_rdmft/rdmft_tools.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" // used by class Veff_rdmft @@ -21,17 +20,17 @@ #include #include - namespace rdmft { - template <> void conj_psi(psi::Psi& wfc) {} - template <> -void HkPsi(const Parallel_Orbitals* ParaV, const double& HK, const double& wfc, double& H_wfc) +void HkPsi(const Parallel_Orbitals* ParaV, + const double& HK, + const double& wfc, + double& H_wfc) { const int one_int = 1; const double one_double = 1.0; @@ -52,8 +51,11 @@ void HkPsi(const Parallel_Orbitals* ParaV, const double& HK, const doubl template <> -void cal_bra_op_ket(const Parallel_Orbitals* ParaV, const Parallel_2D& para_Eij_in, - const double& wfc, const double& H_wfc, std::vector& Dmn) +void cal_bra_op_ket(const Parallel_Orbitals* ParaV, + const Parallel_2D& para_Eij_in, + const double& wfc, + const double& H_wfc, + std::vector& Dmn) { const int one_int = 1; const double one_double = 1.0; @@ -85,8 +87,10 @@ void occNum_Mul_wfcHwfc(const ModuleBase::matrix& occ_number, { for(int ir=0; ir; template class Veff_rdmft, double>; @@ -185,7 +193,7 @@ template class Veff_rdmft, std::complex>; // initialize_HR() template void Veff_rdmft::initialize_HR(const UnitCell* ucell_in, - Grid_Driver* GridD) + Grid_Driver* GridD) { ModuleBase::TITLE("Veff", "initialize_HR"); ModuleBase::timer::tick("Veff", "initialize_HR"); @@ -304,7 +312,10 @@ void Veff_rdmft::contributeHR() // this->GK->transfer_pvpR(this->hR); this->GK->transfer_pvpR(this->hR,this->ucell,this->gd); - if(this->nspin == 2) { this->current_spin = 1 - this->current_spin; } + if(this->nspin == 2) + { + this->current_spin = 1 - this->current_spin; + } ModuleBase::timer::tick("Veff", "contributeHR"); return; @@ -387,13 +398,14 @@ void Veff_rdmft::contributeHR() this->new_e_iteration = false; - if(this->nspin == 2) this->current_spin = 1 - this->current_spin; + if(this->nspin == 2) + { + this->current_spin = 1 - this->current_spin; + } return; } - - }