mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
added error checking
This commit is contained in:
@ -2560,7 +2560,7 @@ Foam::triSurface Foam::triSurfaceTools::delaunay2D(const List<vector2D>& pts)
|
|||||||
|
|
||||||
// Triangulate
|
// Triangulate
|
||||||
int nTris = 0;
|
int nTris = 0;
|
||||||
dtris2
|
int err = dtris2
|
||||||
(
|
(
|
||||||
pts.size(),
|
pts.size(),
|
||||||
geompackVertices.begin(),
|
geompackVertices.begin(),
|
||||||
@ -2569,6 +2569,13 @@ Foam::triSurface Foam::triSurfaceTools::delaunay2D(const List<vector2D>& pts)
|
|||||||
triangle_neighbor.begin()
|
triangle_neighbor.begin()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (err != 0)
|
||||||
|
{
|
||||||
|
FatalErrorIn("triSurfaceTools::delaunay2D(const List<vector2D>&)")
|
||||||
|
<< "Failed dtris2 with vertices:" << pts.size()
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
// Trim
|
// Trim
|
||||||
triangle_node.setSize(3*nTris);
|
triangle_node.setSize(3*nTris);
|
||||||
triangle_neighbor.setSize(3*nTris);
|
triangle_neighbor.setSize(3*nTris);
|
||||||
|
|||||||
Reference in New Issue
Block a user