From a33fbc12b21b2ee584dd795ead57ec36a23dd5db Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 28 Aug 2009 12:35:39 +0100 Subject: [PATCH] added error checking --- .../triSurface/triSurfaceTools/triSurfaceTools.C | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C index b406fb0467..0e97a63316 100644 --- a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C +++ b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C @@ -2560,7 +2560,7 @@ Foam::triSurface Foam::triSurfaceTools::delaunay2D(const List& pts) // Triangulate int nTris = 0; - dtris2 + int err = dtris2 ( pts.size(), geompackVertices.begin(), @@ -2569,6 +2569,13 @@ Foam::triSurface Foam::triSurfaceTools::delaunay2D(const List& pts) triangle_neighbor.begin() ); + if (err != 0) + { + FatalErrorIn("triSurfaceTools::delaunay2D(const List&)") + << "Failed dtris2 with vertices:" << pts.size() + << abort(FatalError); + } + // Trim triangle_node.setSize(3*nTris); triangle_neighbor.setSize(3*nTris);