mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: foamyHexMesh: Move variable construction outside of loop
This commit is contained in:
@ -328,7 +328,7 @@ Foam::searchableSurfaceControl::searchableSurfaceControl
|
|||||||
|
|
||||||
cellSizeFunctions_.reorder(invertedFunctionPriorities);
|
cellSizeFunctions_.reorder(invertedFunctionPriorities);
|
||||||
|
|
||||||
Info<< nl << "There are " << cellSizeFunctions_.size()
|
Info<< nl << indent << "There are " << cellSizeFunctions_.size()
|
||||||
<< " region control functions" << endl;
|
<< " region control functions" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -487,24 +487,25 @@ void Foam::searchableSurfaceControl::cellSizeFunctionVertices
|
|||||||
|
|
||||||
const scalar nearFeatDistSqrCoeff = 1e-8;
|
const scalar nearFeatDistSqrCoeff = 1e-8;
|
||||||
|
|
||||||
|
pointField ptField(1, vector::min);
|
||||||
|
scalarField distField(1, nearFeatDistSqrCoeff);
|
||||||
|
List<pointIndexHit> infoList(1, pointIndexHit());
|
||||||
|
|
||||||
|
vectorField normals(1);
|
||||||
|
labelList region(1, -1);
|
||||||
|
|
||||||
forAll(points, pI)
|
forAll(points, pI)
|
||||||
{
|
{
|
||||||
// Is the point in the extendedFeatureEdgeMesh? If so get the
|
// Is the point in the extendedFeatureEdgeMesh? If so get the
|
||||||
// point normal, otherwise get the surface normal from
|
// point normal, otherwise get the surface normal from
|
||||||
// searchableSurface
|
// searchableSurface
|
||||||
|
ptField[0] = points[pI];
|
||||||
pointField ptField(1, points[pI]);
|
|
||||||
scalarField distField(1, nearFeatDistSqrCoeff);
|
|
||||||
List<pointIndexHit> infoList(1, pointIndexHit());
|
|
||||||
|
|
||||||
searchableSurface_.findNearest(ptField, distField, infoList);
|
searchableSurface_.findNearest(ptField, distField, infoList);
|
||||||
|
|
||||||
if (infoList[0].hit())
|
if (infoList[0].hit())
|
||||||
{
|
{
|
||||||
vectorField normals(1);
|
|
||||||
searchableSurface_.getNormal(infoList, normals);
|
searchableSurface_.getNormal(infoList, normals);
|
||||||
|
|
||||||
labelList region(1, -1);
|
|
||||||
searchableSurface_.getRegion(infoList, region);
|
searchableSurface_.getRegion(infoList, region);
|
||||||
|
|
||||||
const cellSizeFunction& sizeFunc =
|
const cellSizeFunction& sizeFunc =
|
||||||
|
|||||||
Reference in New Issue
Block a user