ENH: primitiveMesh: correct cellCentre if neg vol

This commit is contained in:
mattijs 2014-01-22 10:41:26 +00:00
parent 4f9fbd62da
commit 0421009856

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -141,7 +141,7 @@ void Foam::primitiveMesh::makeCellCentresAndVols
forAll(cellCtrs, celli) forAll(cellCtrs, celli)
{ {
if (cellVols[celli] > VSMALL) if (mag(cellVols[celli]) > VSMALL)
{ {
cellCtrs[celli] /= cellVols[celli]; cellCtrs[celli] /= cellVols[celli];
} }