mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: surfaceFeatures: special case for minCos=1
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 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -217,6 +217,9 @@ void Foam::surfaceFeatures::classifyFeatureAngles
|
|||||||
const vectorField& faceNormals = surf_.faceNormals();
|
const vectorField& faceNormals = surf_.faceNormals();
|
||||||
const pointField& points = surf_.points();
|
const pointField& points = surf_.points();
|
||||||
|
|
||||||
|
// Special case: minCos=1
|
||||||
|
bool selectAll = (mag(minCos-1.0) < SMALL);
|
||||||
|
|
||||||
forAll(edgeFaces, edgeI)
|
forAll(edgeFaces, edgeI)
|
||||||
{
|
{
|
||||||
const labelList& eFaces = edgeFaces[edgeI];
|
const labelList& eFaces = edgeFaces[edgeI];
|
||||||
@ -235,18 +238,19 @@ void Foam::surfaceFeatures::classifyFeatureAngles
|
|||||||
{
|
{
|
||||||
edgeStat[edgeI] = REGION;
|
edgeStat[edgeI] = REGION;
|
||||||
}
|
}
|
||||||
else
|
else if
|
||||||
|
(
|
||||||
|
selectAll
|
||||||
|
|| ((faceNormals[face0] & faceNormals[face1]) < minCos)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if ((faceNormals[face0] & faceNormals[face1]) < minCos)
|
|
||||||
{
|
|
||||||
|
|
||||||
// Check if convex or concave by looking at angle
|
// Check if convex or concave by looking at angle
|
||||||
// between face centres and normal
|
// between face centres and normal
|
||||||
vector f0Tof1 =
|
vector f0Tof1 =
|
||||||
surf_[face1].centre(points)
|
surf_[face1].centre(points)
|
||||||
- surf_[face0].centre(points);
|
- surf_[face0].centre(points);
|
||||||
|
|
||||||
if ((f0Tof1 & faceNormals[face0]) > 0.0)
|
if ((f0Tof1 & faceNormals[face0]) >= 0.0)
|
||||||
{
|
{
|
||||||
edgeStat[edgeI] = INTERNAL;
|
edgeStat[edgeI] = INTERNAL;
|
||||||
}
|
}
|
||||||
@ -257,7 +261,6 @@ void Foam::surfaceFeatures::classifyFeatureAngles
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user