Skip to content

Commit 3f8666c

Browse files
rootroot
authored andcommitted
modify gamma_rho_mock.h
1 parent 0e31316 commit 3f8666c

File tree

1 file changed

+0
-79
lines changed

1 file changed

+0
-79
lines changed

source/src_lcao/test/gamma_rho_mock.h

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,54 +1101,6 @@ void Local_Orbital_Charge::cal_dm(const ModuleBase::matrix& wg,
11011101
return;
11021102
}
11031103

1104-
void Local_Orbital_Charge::cal_dk_gamma_from_2D_pub(void)
1105-
{
1106-
cal_dk_gamma_from_2D();
1107-
}
1108-
1109-
void Local_Orbital_Charge::cal_dk_gamma_from_2D(void)
1110-
{
1111-
for(int is=0; is<GlobalV::NSPIN; ++is)
1112-
{
1113-
// put data from dm_gamma[is] to sender index
1114-
int nNONZERO=0;
1115-
for(int i=0; i<sender_size; ++i)
1116-
{
1117-
const int idx=sender_2D_index[i];
1118-
const int icol=idx%GlobalV::NLOCAL;
1119-
const int irow=(idx-icol)/GlobalV::NLOCAL;
1120-
// sender_buffer[i]=wfc_dm_2d.dm_gamma[is](irow,icol);
1121-
sender_buffer[i]=this->dm_gamma[is](icol,irow); // sender_buffer is clomun major,
1122-
// so the row and column index should be switched
1123-
if(sender_buffer[i]!=0) ++nNONZERO;
1124-
}
1125-
1126-
// put data from receiver buffer to this->DM[is]
1127-
nNONZERO=0;
1128-
// init DM[is]
1129-
/*for(int i=0; i<lgd_now; ++i)
1130-
{
1131-
for(int j=0; j<lgd_now; ++j)
1132-
{
1133-
DM[is][i][j]=0;
1134-
}
1135-
}*/
1136-
for(int i=0; i<receiver_size; ++i)
1137-
{
1138-
const int idx=receiver_local_index[i];
1139-
const int icol=idx%lgd_now;
1140-
const int irow=(idx-icol)/lgd_now;
1141-
DM[is][irow][icol]=receiver_buffer[i];
1142-
//DM[is][icol][irow]=receiver_buffer[i];
1143-
if(receiver_buffer[i]!=0) ++nNONZERO;
1144-
}
1145-
1146-
1147-
1148-
}
1149-
return;
1150-
}
1151-
11521104
void Local_Orbital_Charge::read_dm(const int &is, const std::string &fn)
11531105
{
11541106
std::ifstream ifs;
@@ -2469,10 +2421,6 @@ int Pseudopot_upf::average_p(const double& lambda)
24692421
}
24702422

24712423
this->dion = dion_new;
2472-
// this->dion.create(this->nbeta, this->nbeta);
2473-
// for(int i=0;i<this->nbeta; i++)
2474-
// for(int j=0;j<this->nbeta;j++)
2475-
// this->dion(i,j) = dion_new(i,j);
24762424

24772425
int new_nwfc = 0;
24782426
for(int nb=0; nb<this->nwfc; nb++)
@@ -2645,9 +2593,6 @@ void Pseudopot_upf::set_empty_element(void)
26452593
//====================================================
26462594
//mock of module_cell/read_pp_upf201_mock.cpp
26472595
#include "module_cell/read_pp.h"
2648-
//int Number[2]; // added by zhangwenshuai
2649-
2650-
//qianrui rewrite it 2021-5-10
26512596
int Pseudopot_upf::read_pseudo_upf201(std::ifstream &ifs)
26522597
{
26532598

@@ -3020,7 +2965,6 @@ int Pseudopot_upf::read_pseudo_upf201(std::ifstream &ifs)
30202965
else if(round==0)
30212966
{
30222967
this->has_so = 0;
3023-
// std::cout<<"ignore SPIN_ORB part!"<<std::endl;
30242968
break;
30252969
}
30262970
}
@@ -3089,7 +3033,6 @@ void Pseudopot_upf:: getnameval(std::ifstream& ifs,int &n, std::string * name, s
30893033
}
30903034
ll=pos2-pos;
30913035
name[i] = txt.substr(pos,ll);
3092-
//std::cout<<i<<" "<<name[i]<<std::endl;
30933036
std::string mark;
30943037
bool findmark=false;
30953038
for(int j = 0; j < 100; ++j)//The mark can be ' or " or .
@@ -3118,32 +3061,10 @@ void Pseudopot_upf:: getnameval(std::ifstream& ifs,int &n, std::string * name, s
31183061
else
31193062
break;
31203063
}
3121-
//std::cout<<name[i]<<"=\""<<val[i]<<"\""<<std::endl;
31223064
}
31233065
return;
31243066
}
31253067

3126-
/*void Pseudopot_upf::get_char( std::string ss)
3127-
{
3128-
int i, q;
3129-
//char b[1]; //LiuXh 20171109
3130-
char b='\"'; //LiuXh 20171109
3131-
q =0;
3132-
//strcpy(b,"\""); //LiuXh 20171109
3133-
3134-
for(i=0;i<200;i++)
3135-
{
3136-
//if(ss[i]== b[0]) //LiuXh 20171109
3137-
if(ss[i]== b) //LiuXh 20171109
3138-
{
3139-
Number[q] = i;
3140-
q++;
3141-
}
3142-
3143-
}
3144-
3145-
return;
3146-
}*/
31473068
void Pseudopot_upf::read_pseudo_upf201_r(std::ifstream &ifs)
31483069
{
31493070
delete[] r;

0 commit comments

Comments
 (0)