Skip to content
Snippets Groups Projects
Commit eca9fefa authored by sergio's avatar sergio Committed by Mark OLESEN
Browse files

ENH: Modification of the start point for ray shooting to avoid self-hit in distorted meshes

parent 64c91f2a
No related merge requests found
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -264,15 +264,13 @@ void Foam::faceShading::calculate()
{
includeAllFacesPerPatch[patchI].insert
(
faceI //pp.start()
faceI
);
}
}
}
}
labelList triSurfaceToAgglom(5*nFaces);
triSurface localSurface = triangulate
(
includePatches,
......@@ -294,9 +292,10 @@ void Foam::faceShading::calculate()
dict
);
surfacesMesh.searchableSurface::write();
triSurfaceToAgglom.resize(surfacesMesh.size());
if (debug)
{
surfacesMesh.searchableSurface::write();
}
scalar maxBounding = 5.0*mag(mesh_.bounds().max() - mesh_.bounds().min());
......@@ -324,7 +323,7 @@ void Foam::faceShading::calculate()
const vector d(direction_*maxBounding);
start.append(fc - SMALL*d);
start.append(fc - 0.001*d);
startIndex.append(myFaceId);
......@@ -355,7 +354,7 @@ void Foam::faceShading::calculate()
(
mesh_.time().path()/"allVisibleFaces.obj",
end,
Cfs
start
);
}
......
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