Commit b264b92a authored by mattijs's avatar mattijs
Browse files

Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

parents 179085af aa68f5f2
...@@ -22,7 +22,7 @@ License ...@@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application Application
buoyantSimpleRadiationFoam buoyantSimpleFoam
Description Description
Steady-state solver for buoyant, turbulent flow of compressible fluids, Steady-state solver for buoyant, turbulent flow of compressible fluids,
......
...@@ -77,10 +77,12 @@ Foam::PatchTools::sortedEdgeFaces ...@@ -77,10 +77,12 @@ Foam::PatchTools::sortedEdgeFaces
{ {
if (f0[fpI] != e.start()) if (f0[fpI] != e.start())
{ {
const vector faceEdgeDir = localPoints[f0[fpI]] - edgePt; vector faceEdgeDir = localPoints[f0[fpI]] - edgePt;
const scalar angle = faceEdgeDir & e2; faceEdgeDir /= mag(faceEdgeDir) + VSMALL;
if (angle < maxAngle) const scalar angle = e2 & faceEdgeDir;
if (mag(angle) < maxAngle)
{ {
maxAngle = angle; maxAngle = angle;
maxAngleEdgeDir = faceEdgeDir; maxAngleEdgeDir = faceEdgeDir;
...@@ -114,10 +116,12 @@ Foam::PatchTools::sortedEdgeFaces ...@@ -114,10 +116,12 @@ Foam::PatchTools::sortedEdgeFaces
{ {
if (f[fpI] != e.start()) if (f[fpI] != e.start())
{ {
const vector faceEdgeDir = localPoints[f[fpI]] - edgePt; vector faceEdgeDir = localPoints[f[fpI]] - edgePt;
const scalar angle = faceEdgeDir & e2; faceEdgeDir /= mag(faceEdgeDir) + VSMALL;
const scalar angle = e2 & faceEdgeDir;
if (angle < maxAngle) if (mag(angle) < maxAngle)
{ {
maxAngle = angle; maxAngle = angle;
maxAngleEdgeDir = faceEdgeDir; maxAngleEdgeDir = faceEdgeDir;
......
Supports Markdown
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