diff --git a/dumux/discretization/cellcentered/mpfa/localassembler.hh b/dumux/discretization/cellcentered/mpfa/localassembler.hh index c3247c6b440c8befb1d8c8000e02a9a92c19289d..8c644aecb578c00f8852135842c6b87240dc1039 100644 --- a/dumux/discretization/cellcentered/mpfa/localassembler.hh +++ b/dumux/discretization/cellcentered/mpfa/localassembler.hh @@ -182,7 +182,6 @@ class InteractionVolumeAssemblerBase FaceVector sum_alphas; resizeVector_(sum_alphas, iv.numUnknowns()); sum_alphas = 0.0; - std::fill(g.begin(), g.end(), 0.0); for (LocalIndexType faceIdx = 0; faceIdx < iv.numFaces(); ++faceIdx) { // gravitational acceleration on this face @@ -207,10 +206,7 @@ class InteractionVolumeAssemblerBase Scalar rho; if (isSurfaceGrid) - { resizeVector_(outsideG[faceIdx], numOutsideFaces); - std::fill(outsideG[faceIdx].begin(), outsideG[faceIdx].end(), 0.0); - } if (!curLocalScvf.isDirichlet()) { @@ -249,13 +245,13 @@ class InteractionVolumeAssemblerBase rho = getRho(elemVolVars()[curGlobalScvf.outsideScvIdx()]); // add "inside" & "outside" alphas to gravity containers - g[faceIdx] += alpha_inside*rho*curGlobalScvf.area(); + g[faceIdx] = alpha_inside*rho*curGlobalScvf.area(); if (isSurfaceGrid) { unsigned int i = 0; for (const auto& alpha : alpha_outside) - outsideG[faceIdx][i++] += alpha*rho*curGlobalScvf.area(); + outsideG[faceIdx][i++] = alpha*rho*curGlobalScvf.area(); } }