Skip to content
Snippets Groups Projects
Commit cd45f3c9 authored by mattijs's avatar mattijs
Browse files

BUG: searchableSurfaceWithGaps: scale of perturb vectors

parent aaa432bd
Branches
Tags
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -72,14 +72,14 @@ Foam::Pair<Foam::vector> Foam::searchableSurfaceWithGaps::offsetVecs
}
offsets[0][minCmpt] = 1.0;
// Orthogonalise
// Orthonormalise
offsets[0] -= n[minCmpt]*n;
// Scale
offsets[0] *= gap_/mag(offsets[0]);
offsets[0] /= mag(offsets[0]);
// Do second offset vector perp to original edge and first offset vector
offsets[1] = n ^ offsets[0];
// Scale
offsets[0] *= gap_;
offsets[1] *= gap_;
}
......@@ -240,7 +240,7 @@ void Foam::searchableSurfaceWithGaps::findLine
// test in pairs: only if both perturbations hit something
// do we accept the hit.
const vectorField smallVec(SMALL*(compactEnd-compactStart));
const vectorField smallVec(1E-6*(compactEnd-compactStart));
List<pointIndexHit> plusInfo;
surface().findLine
......@@ -294,7 +294,7 @@ void Foam::searchableSurfaceWithGaps::findLine
offset0.setSize(plusMissMap.size());
offset1.setSize(plusMissMap.size());
const vectorField smallVec(SMALL*(compactEnd-compactStart));
const vectorField smallVec(1E-6*(compactEnd-compactStart));
surface().findLine
(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment