From de75fda5fee0c534d544b3ad119978d06e1f18e0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Thu, 23 Jan 2025 14:58:10 +0000 Subject: [PATCH] [pre-commit.ci lite] apply automatic fixes --- source/module_elecstate/occupy.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/module_elecstate/occupy.cpp b/source/module_elecstate/occupy.cpp index a86532c1f7..eedf1466ce 100644 --- a/source/module_elecstate/occupy.cpp +++ b/source/module_elecstate/occupy.cpp @@ -141,10 +141,12 @@ void Occupy::iweights( { assert(is < 2); double degspin = 2.0; - if (PARAM.inp.nspin == 4) + if (PARAM.inp.nspin == 4) { degspin = 1.0; - if (is != -1) +} + if (is != -1) { degspin = 1.0; +} double ib_mind = nelec / degspin; int ib_min = std::ceil(ib_mind); @@ -224,8 +226,9 @@ void Occupy::gweights(const int nks, for (int ik = 0; ik < nks; ik++) { // mohan add 2011-04-03 - if (is != -1 && is != isk[ik]) + if (is != -1 && is != isk[ik]) { continue; +} for (int ib = 0; ib < PARAM.inp.nbands; ib++) { @@ -399,8 +402,9 @@ double Occupy::sumkg(const ModuleBase::matrix& ekb, double sum2 = 0.0; for (int ik = 0; ik < nks; ik++) { - if (is != -1 && is != isk[ik]) + if (is != -1 && is != isk[ik]) { continue; +} double sum1 = 0.0; for (int ib = 0; ib < nband; ib++)