From bb04aec00261999cdea76775024eae637fcfead1 Mon Sep 17 00:00:00 2001 From: pedro <pedro@aceler15.ciemat.es> Date: Thu, 6 Mar 2025 13:59:41 +0100 Subject: [PATCH] fix if statement --- src/Solvers/MGPoissonSolver.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Solvers/MGPoissonSolver.cpp b/src/Solvers/MGPoissonSolver.cpp index 5e90eab44..7af57a494 100644 --- a/src/Solvers/MGPoissonSolver.cpp +++ b/src/Solvers/MGPoissonSolver.cpp @@ -354,10 +354,11 @@ void MGPoissonSolver::computePotential(Field_t &rho, Vector_t hr) { for (int idy = localId[1].first(); idy <= localId[1].last(); idy++) { for (int idx = localId[0].first(); idx <= localId[0].last(); idx++) { NDIndex<3> l(Index(idx, idx), Index(idy, idy), Index(idz, idz)); - if (bp_m->isInside(idx, idy, idz)) - id++ + if (bp_m->isInside(idx, idy, idz)) { + id++; RHS->replaceGlobalValue(bp_m->getIdx(idx, idy, idz), 4.0 * M_PI * rho.localElement(l) / scaleFactor); + } } } } -- GitLab