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
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -1425,8 +1425,6 @@ int main(int argc, char *argv[])
|
|||||||
const scalar searchDistance =
|
const scalar searchDistance =
|
||||||
readScalar(surfaceDict.lookup("maxFeatureProximity"));
|
readScalar(surfaceDict.lookup("maxFeatureProximity"));
|
||||||
|
|
||||||
const scalar radiusSqr = sqr(searchDistance);
|
|
||||||
|
|
||||||
scalarField featureProximity(surf.size(), searchDistance);
|
scalarField featureProximity(surf.size(), searchDistance);
|
||||||
|
|
||||||
forAll(surf, fI)
|
forAll(surf, fI)
|
||||||
@ -1434,6 +1432,12 @@ int main(int argc, char *argv[])
|
|||||||
const triPointRef& tri = surf[fI].tri(surf.points());
|
const triPointRef& tri = surf[fI].tri(surf.points());
|
||||||
const point& triCentre = tri.circumCentre();
|
const point& triCentre = tri.circumCentre();
|
||||||
|
|
||||||
|
const scalar radiusSqr = min
|
||||||
|
(
|
||||||
|
sqr(4*tri.circumRadius()),
|
||||||
|
sqr(searchDistance)
|
||||||
|
);
|
||||||
|
|
||||||
List<pointIndexHit> hitList;
|
List<pointIndexHit> hitList;
|
||||||
|
|
||||||
feMesh.allNearestFeatureEdges(triCentre, radiusSqr, hitList);
|
feMesh.allNearestFeatureEdges(triCentre, radiusSqr, hitList);
|
||||||
@ -1493,6 +1497,10 @@ int main(int argc, char *argv[])
|
|||||||
Info<< endl;
|
Info<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
|
<< nl << endl;
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user