CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Bugs (
-   -   checkMesh Floating Exception (

shildenbrand August 7, 2009 06:56

checkMesh Floating Exception
I get following error using checkMesh

Checking geometry...
Overall domain bounding box (-1.9e-16 -0.00338 -0.00202402) (0.0039 1.587e-06 0.00015)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (-2.11307e-16 -9.23555e-17 -2.76505e-17) OK.
Max cell openness = 3.16403e-15 OK.
Max aspect ratio = 166.046 OK.
***Zero or negative face area detected. Minimum area: 0
<<Writing 1 zero area faces to set zeroAreaFaces
Min volume = 7.265e-22. Max volume = 5.9482e-13. Total volume = 1.4099e-08. Cell volumes OK.
Mesh non-orthogonality Max: 159.907 average: 19.5137
*Number of severely non-orthogonal faces: 12217.
***Number of non-orthogonality errors: 204.
<<Writing 12421 non-orthogonal faces to set nonOrthoFaces
***Error in face pyramids: 2 faces are incorrectly oriented.
<<Writing 2 faces with incorrect orientation to set wrongOrientedFaces
#0 Foam::error::printStack(Foam::Ostream&) in "/soft/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/"
#1 Foam::sigFpe::sigFpeHandler(int) in "/soft/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/"
#2 ?? in "/lib/"
#3 Foam::primitiveMesh::checkFaceSkewness(bool, Foam::HashSet<int, Foam::Hash<int> >*) const in "/soft/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/"
#4 Foam::checkGeometry(Foam::polyMesh const&, bool) in "/soft/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/checkMesh"
#5 main in "/soft/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/checkMesh"
#6 __libc_start_main in "/lib/"
#7 _start at /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116
Floating exception

After removing the zero-area face, checkMesh works. So maybe there's a division by zero at some point, don't know. But I think you guys want to throw an error message and exit cleanly, so possibly this is of interest.

mattijs August 7, 2009 08:55

Do you have a testcase? My 1x1x1 simple testcase with a zero-area face (face collapsed to edge) does not give a sigfpe.

hjasak August 8, 2009 10:19

Hi Mattijs,

Have a look at primitiveMeshCheck.C, in primitiveMesh::checkFaceSkewness. It has got a division by face area when capculating the skewness vector - you need stabilisation on all of them:

// Skewness vector
vector sv =
Cpf - ((fAreas[faceI] & Cpf)/((fAreas[faceI] & d) + SMALL))*d;
vector svHat = sv/(mag(sv) + VSMALL);

// Normalisation distance calculated as the approximate distance
// from the face centre to the edge of the face in the direction of
// the skewness
scalar fd = 0.2*mag(d) + VSMALL;
const face& f = fcs[faceI];
forAll(f, pi)
fd = max(fd, mag(svHat & (p[f[pi]] - faceCtrs[faceI])));

// Normalised skewness
scalar skewness = mag(sv)/fd;

Check for SMALL/VSMALL - you need all of them.


shildenbrand August 10, 2009 02:27

Hi Mattijs,

my testcase is rather big -- to big to upload I guess (>200MB).
Could you track the problem with Hrvojes hint? If not we have to arrange how I can give you my testcase.


mattijs August 10, 2009 06:31

Thanks both. I pushed that fix to 1.6.x.

All times are GMT -4. The time now is 02:27.