File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ void PW_Basis_K::setupIndGk()
6969 // count npwk
7070 this ->npwk_max = 0 ;
7171 delete[] this ->npwk ; this ->npwk = new int [this ->nks ];
72+ // minimun npw, only for check
73+ int npwk_min = this ->npw ;
7274 for (int ik = 0 ; ik < this ->nks ; ik++)
7375 {
7476 int ng = 0 ;
@@ -80,7 +82,6 @@ void PW_Basis_K::setupIndGk()
8082 ++ng;
8183 }
8284 }
83- ModuleBase::CHECK_WARNING_QUIT ((ng==0 ), " PW_Basis_K::setupIndGk" , " some cores have no plane waves!" );
8485 this ->npwk [ik] = ng;
8586 if (ng == 0 )
8687 {
@@ -90,7 +91,12 @@ void PW_Basis_K::setupIndGk()
9091 {
9192 this ->npwk_max = ng;
9293 }
94+ if ( npwk_min > ng)
95+ {
96+ npwk_min = ng;
97+ }
9398 }
99+ ModuleBase::CHECK_WARNING_QUIT ((npwk_min==0 ), " PW_Basis_K::setupIndGk" , " some cores have no plane waves!" );
94100
95101 // get igl2isz_k and igl2ig_k
96102 delete[] igl2isz_k; this ->igl2isz_k = new int [this ->nks * this ->npwk_max ];
You can’t perform that action at this time.
0 commit comments