mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: primitiveMeshTools: handle zero/neg volume cells
This commit is contained in:
@ -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) 2012-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -315,10 +315,12 @@ void Foam::primitiveMeshTools::cellClosedness
|
|||||||
scalar aspectRatio = maxCmpt/(minCmpt + VSMALL);
|
scalar aspectRatio = maxCmpt/(minCmpt + VSMALL);
|
||||||
if (nDims == 3)
|
if (nDims == 3)
|
||||||
{
|
{
|
||||||
|
scalar v = max(VSMALL, vols[cellI]);
|
||||||
|
|
||||||
aspectRatio = max
|
aspectRatio = max
|
||||||
(
|
(
|
||||||
aspectRatio,
|
aspectRatio,
|
||||||
1.0/6.0*cmptSum(sumMagClosed[cellI])/pow(vols[cellI], 2.0/3.0)
|
1.0/6.0*cmptSum(sumMagClosed[cellI])/pow(v, 2.0/3.0)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user