Commit 42fd492b authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[mpfa][darcys law] fix density averaging

parent 9162ce22
......@@ -131,14 +131,10 @@ private:
// use arithmetic mean of the densities around the scvf
if (!scvf.boundary())
{
const auto& outsideScvIndices = scvf.outsideScvIndices();
Scalar rho = elemVolVars[scvf.insideScvIdx()].density(phaseIdx);
for (auto outsideIdx : outsideScvIndices)
for (auto outsideIdx : scvf.outsideScvIndices())
rho += elemVolVars[outsideIdx].density(phaseIdx);
rho /= outsideScvIndices.size();
return rho;
return rho/(scvf.outsideScvIndices().size()+1);
}
else
return elemVolVars[scvf.outsideScvIdx()].density(phaseIdx);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment