mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: surfaceFeatureExtract: Fix the search distance for feature proximity
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -1425,8 +1425,6 @@ int main(int argc, char *argv[])
|
||||
const scalar searchDistance =
|
||||
readScalar(surfaceDict.lookup("maxFeatureProximity"));
|
||||
|
||||
const scalar radiusSqr = sqr(searchDistance);
|
||||
|
||||
scalarField featureProximity(surf.size(), searchDistance);
|
||||
|
||||
forAll(surf, fI)
|
||||
@ -1434,6 +1432,12 @@ int main(int argc, char *argv[])
|
||||
const triPointRef& tri = surf[fI].tri(surf.points());
|
||||
const point& triCentre = tri.circumCentre();
|
||||
|
||||
const scalar radiusSqr = min
|
||||
(
|
||||
sqr(4*tri.circumRadius()),
|
||||
sqr(searchDistance)
|
||||
);
|
||||
|
||||
List<pointIndexHit> hitList;
|
||||
|
||||
feMesh.allNearestFeatureEdges(triCentre, radiusSqr, hitList);
|
||||
@ -1493,6 +1497,10 @@ int main(int argc, char *argv[])
|
||||
Info<< endl;
|
||||
}
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user