Commit 72adeba9 authored by mattijs's avatar mattijs Committed by Mark Olesen

ENH: globalMeshData - added else branch so that in the case of a cyclic baffle

edge it sets the globalEdgeOrientation

See #1367
parent a7abf63d
......@@ -1188,35 +1188,37 @@ void Foam::globalMeshData::calcGlobalEdgeOrientation() const
forAll(coupledPatch().edges(), edgeI)
{
if (masterEdgeVerts[edgeI] == labelPair(labelMax, labelMax))
// Test that edge is not single edge on cyclic baffle
if (masterEdgeVerts[edgeI] != labelPair(labelMax, labelMax))
{
// Skip single edge on cyclic baffle
continue;
}
const edge& e = coupledPatch().edges()[edgeI];
const labelPair masterE
(
masterPoint[e[0]],
masterPoint[e[1]]
);
const edge& e = coupledPatch().edges()[edgeI];
const labelPair masterE
(
masterPoint[e[0]],
masterPoint[e[1]]
);
const int stat = labelPair::compare
(
masterE,
masterEdgeVerts[edgeI]
);
if (stat == 0)
{
FatalErrorInFunction
<< "problem : my edge:" << e
<< " in master points:" << masterE
<< " v.s. masterEdgeVerts:" << masterEdgeVerts[edgeI]
<< exit(FatalError);
const int stat = labelPair::compare
(
masterE,
masterEdgeVerts[edgeI]
);
if (stat == 0)
{
FatalErrorInFunction
<< "problem : my edge:" << e
<< " in master points:" << masterE
<< " v.s. masterEdgeVerts:" << masterEdgeVerts[edgeI]
<< exit(FatalError);
}
else
{
globalEdgeOrientation.set(edgeI, (stat == 1));
}
}
else
{
globalEdgeOrientation.set(edgeI, (stat == 1));
globalEdgeOrientation.set(edgeI, true);
}
}
}
......
Markdown is supported
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