@@ -84,14 +84,16 @@ void Parallel_Grid::init(
8484
8585 this ->nproc_in_pool = new int [GlobalV::KPAR];
8686 int nprocgroup;
87- if (PARAM.inp .esolver_type == " sdft" ) nprocgroup = GlobalV::NPROC_IN_STOGROUP;
88- else nprocgroup = GlobalV::NPROC;
87+ if (PARAM.inp .esolver_type == " sdft" ) { nprocgroup = GlobalV::NPROC_IN_STOGROUP;
88+ } else { nprocgroup = GlobalV::NPROC;
89+ }
8990
9091 const int remain_pro = nprocgroup%GlobalV::KPAR;
9192 for (int i=0 ; i<GlobalV::KPAR; i++)
9293 {
9394 nproc_in_pool[i] = nprocgroup/GlobalV::KPAR;
94- if (i<remain_pro) this ->nproc_in_pool [i]++;
95+ if (i<remain_pro) { this ->nproc_in_pool [i]++;
96+ }
9597 }
9698
9799 this ->numz = new int *[GlobalV::KPAR];
@@ -115,7 +117,7 @@ void Parallel_Grid::init(
115117 return ;
116118}
117119
118- void Parallel_Grid::z_distribution (void )
120+ void Parallel_Grid::z_distribution ()
119121{
120122 assert (allocate);
121123
@@ -126,7 +128,8 @@ void Parallel_Grid::z_distribution(void)
126128// GlobalV::ofs_running << "\n now POOL=" << ip;
127129 const int nproc = nproc_in_pool[ip];
128130
129- if (ip>0 ) startp[ip] = startp[ip-1 ] + nproc_in_pool[ip-1 ];
131+ if (ip>0 ) { startp[ip] = startp[ip-1 ] + nproc_in_pool[ip-1 ];
132+ }
130133
131134 // (1) how many z on each 'proc' in each 'pool'
132135 for (int iz=0 ; iz<nbz; iz++)
@@ -429,7 +432,8 @@ const int &nrxx_in, const int &nbz_in, const int &bz_in)
429432 for (int i=0 ; i<GlobalV::KPAR; i++)
430433 {
431434 nproc_in_pool[i] = GlobalV::NPROC/GlobalV::KPAR;
432- if (i<remain_pro) this ->nproc_in_pool [i]++;
435+ if (i<remain_pro) { this ->nproc_in_pool [i]++;
436+ }
433437 }
434438
435439 this ->numz = new int *[GlobalV::KPAR];
0 commit comments