File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -475,12 +475,21 @@ void PW_Basis::get_ig2isz_is2ixy(
475475 int * st_length2D // the stick on (x, y) consists of st_length[x*ny+y] planewaves.
476476)
477477{
478+ if (this ->npw == 0 )
479+ {
480+ this ->ig2isz = new int [1 ]; // map ig to the z coordinate of this planewave.
481+ this ->ig2isz [0 ] = 0 ;
482+ this ->is2ixy = new int [1 ]; // map is (index of sticks) to ixy (ix + iy * nx).
483+ this ->is2ixy [0 ] = -1 ;
484+ return ;
485+ }
486+
478487 this ->ig2isz = new int [this ->npw ]; // map ig to the z coordinate of this planewave.
479488 ModuleBase::GlobalFunc::ZEROS (this ->ig2isz , this ->npw );
480489 this ->is2ixy = new int [this ->nst ]; // map is (index of sticks) to ixy (ix + iy * nx).
481490 for (int is = 0 ; is < this ->nst ; ++is)
482491 {
483- is2ixy[is] = -1 ;
492+ this -> is2ixy [is] = -1 ;
484493 }
485494
486495 int st_move = 0 ; // this is the st_move^th stick on current core.
You can’t perform that action at this time.
0 commit comments