From 87532b27b069f73a6d7ba228938e93e506d50ab0 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 28 Aug 2015 20:26:23 +0100 Subject: [PATCH] blockMesh: Avoid test failure for lambda == 1 --- src/mesh/blockMesh/curvedEdges/arcEdge.C | 4 ++-- src/mesh/blockMesh/curvedEdges/lineEdge.C | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mesh/blockMesh/curvedEdges/arcEdge.C b/src/mesh/blockMesh/curvedEdges/arcEdge.C index 1f42125f98..512eab4a20 100644 --- a/src/mesh/blockMesh/curvedEdges/arcEdge.C +++ b/src/mesh/blockMesh/curvedEdges/arcEdge.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -133,7 +133,7 @@ Foam::arcEdge::arcEdge(const pointField& points, Istream& is) Foam::point Foam::arcEdge::position(const scalar lambda) const { - if (lambda < 0 || lambda > 1) + if (lambda < -SMALL || lambda > 1 + SMALL) { FatalErrorIn("arcEdge::position(const scalar lambda) const") << "Parameter out of range, lambda = " << lambda diff --git a/src/mesh/blockMesh/curvedEdges/lineEdge.C b/src/mesh/blockMesh/curvedEdges/lineEdge.C index f5bd3348ea..a00243e584 100644 --- a/src/mesh/blockMesh/curvedEdges/lineEdge.C +++ b/src/mesh/blockMesh/curvedEdges/lineEdge.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -54,16 +54,18 @@ Foam::lineEdge::lineEdge(const pointField& points, Istream& is) curvedEdge(points, is) {} + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * // Foam::lineEdge::~lineEdge() {} + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Foam::point Foam::lineEdge::position(const scalar lambda) const { - if (lambda < 0 || lambda > 1) + if (lambda < -SMALL || lambda > 1+SMALL) { FatalErrorIn("lineEdge::position(const scalar)") << "Parameter out of range, lambda = " << lambda