Skip to content

Commit 9571597

Browse files
[pre-commit.ci lite] apply automatic fixes
1 parent 98d63e1 commit 9571597

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

source/module_hamilt_lcao/module_dftu/dftu_occup.cpp

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ void DFTU::copy_locale(const UnitCell& ucell)
3636

3737
for (int T = 0; T < ucell.ntype; T++)
3838
{
39-
if (orbital_corr[T] == -1)
39+
if (orbital_corr[T] == -1) {
4040
continue;
41+
}
4142

4243
for (int I = 0; I < ucell.atoms[T].na; I++)
4344
{
@@ -72,7 +73,8 @@ void DFTU::zero_locale(const UnitCell& ucell)
7273

7374
for (int T = 0; T < ucell.ntype; T++)
7475
{
75-
if (orbital_corr[T] == -1) continue;
76+
if (orbital_corr[T] == -1) { continue;
77+
}
7678

7779
for (int I = 0; I < ucell.atoms[T].na; I++)
7880
{
@@ -110,8 +112,9 @@ void DFTU::mix_locale(const UnitCell& ucell,
110112

111113
for (int T = 0; T < ucell.ntype; T++)
112114
{
113-
if (orbital_corr[T] == -1)
115+
if (orbital_corr[T] == -1) {
114116
continue;
117+
}
115118

116119
for (int I = 0; I < ucell.atoms[T].na; I++)
117120
{
@@ -203,25 +206,28 @@ void DFTU::cal_occup_m_k(const int iter,
203206
const int NL = ucell.atoms[it].nwl + 1;
204207
const int LC = orbital_corr[it];
205208

206-
if (LC == -1)
209+
if (LC == -1) {
207210
continue;
211+
}
208212

209213
for (int ia = 0; ia < ucell.atoms[it].na; ia++)
210214
{
211215
const int iat = ucell.itia2iat(it, ia);
212216

213217
for (int l = 0; l < NL; l++)
214218
{
215-
if (l != orbital_corr[it])
219+
if (l != orbital_corr[it]) {
216220
continue;
221+
}
217222

218223
const int N = ucell.atoms[it].l_nchi[l];
219224

220225
for (int n = 0; n < N; n++)
221226
{
222227
// if(!Yukawa && n!=0) continue;
223-
if (n != 0)
228+
if (n != 0) {
224229
continue;
230+
}
225231

226232
// Calculate the local occupation number matrix
227233
for (int m0 = 0; m0 < 2 * l + 1; m0++)
@@ -267,25 +273,28 @@ void DFTU::cal_occup_m_k(const int iter,
267273
const int NL = ucell.atoms[it].nwl + 1;
268274
const int LC = orbital_corr[it];
269275

270-
if (LC == -1)
276+
if (LC == -1) {
271277
continue;
278+
}
272279

273280
for (int ia = 0; ia < ucell.atoms[it].na; ia++)
274281
{
275282
const int iat = ucell.itia2iat(it, ia);
276283

277284
for (int l = 0; l < NL; l++)
278285
{
279-
if (l != orbital_corr[it])
286+
if (l != orbital_corr[it]) {
280287
continue;
288+
}
281289

282290
const int N = ucell.atoms[it].l_nchi[l];
283291

284292
for (int n = 0; n < N; n++)
285293
{
286294
// if(!Yukawa && n!=0) continue;
287-
if (n != 0)
295+
if (n != 0) {
288296
continue;
297+
}
289298
// set the local occupation mumber matrix of spin up and down zeros
290299

291300
#ifdef __MPI
@@ -405,23 +414,26 @@ void DFTU::cal_occup_m_gamma(const int iter,
405414
for (int it = 0; it < ucell.ntype; it++)
406415
{
407416
const int NL = ucell.atoms[it].nwl + 1;
408-
if (orbital_corr[it] == -1)
417+
if (orbital_corr[it] == -1) {
409418
continue;
419+
}
410420
for (int ia = 0; ia < ucell.atoms[it].na; ia++)
411421
{
412422
const int iat = ucell.itia2iat(it, ia);
413423

414424
for (int l = 0; l < NL; l++)
415425
{
416-
if (l != orbital_corr[it])
426+
if (l != orbital_corr[it]) {
417427
continue;
428+
}
418429

419430
const int N = ucell.atoms[it].l_nchi[l];
420431

421432
for (int n = 0; n < N; n++)
422433
{
423-
if (n != 0)
434+
if (n != 0) {
424435
continue;
436+
}
425437

426438
// Calculate the local occupation number matrix
427439
for (int m0 = 0; m0 < 2 * l + 1; m0++)

0 commit comments

Comments
 (0)