From 3e7a5b230fdd07dab43dbc1471d0f00639dae613 Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 14 Aug 2008 09:26:47 +0100 Subject: [PATCH] nondim tolerance --- .../triSurface/triangleFuncs/triangleFuncs.C | 11 +++-------- .../triSurface/triangleFuncs/triangleFuncs.H | 5 ----- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/meshTools/triSurface/triangleFuncs/triangleFuncs.C b/src/meshTools/triSurface/triangleFuncs/triangleFuncs.C index f7d4b6d1c8..56f8799aec 100644 --- a/src/meshTools/triSurface/triangleFuncs/triangleFuncs.C +++ b/src/meshTools/triSurface/triangleFuncs/triangleFuncs.C @@ -34,12 +34,6 @@ Description #include "scalar.H" -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//- Not VSMALL - but smaller than SMALL -const Foam::scalar Foam::triangleFuncs::NVSMALL = Foam::sqrt(Foam::VSMALL); - - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void Foam::triangleFuncs::setIntersection @@ -120,7 +114,8 @@ bool Foam::triangleFuncs::intersectAxesBundle scalar det = v2*u1 - u2*v1; - if (Foam::mag(det) < SMALL) + // Fix for V0:(-31.71428 0 -15.10714) V10:(-1.285715 8.99165e-16 -1.142858) V20:(0 0 -1.678573) i0:0 + if (Foam::mag(det)/max(max(mag(V10),mag(V20)),1) < SMALL) { // Triangle parallel to dir return false; @@ -522,7 +517,7 @@ bool Foam::triangleFuncs::classify bool hit = false; - if (Foam::mag(u1) < NVSMALL) + if (Foam::mag(u1) < ROOTVSMALL) { beta = u0/u2; diff --git a/src/meshTools/triSurface/triangleFuncs/triangleFuncs.H b/src/meshTools/triSurface/triangleFuncs/triangleFuncs.H index 4b4d202172..9ebc5c6731 100644 --- a/src/meshTools/triSurface/triangleFuncs/triangleFuncs.H +++ b/src/meshTools/triSurface/triangleFuncs/triangleFuncs.H @@ -71,11 +71,6 @@ public: private: - // Private data - - //- Not VSMALL - but smaller than SMALL - static const scalar NVSMALL; - // Private Member Functions //- Helper function for intersect. Sets pt to be anywhere on the edge