Commit edd7cf0b authored by mattijs's avatar mattijs Committed by Andrew Heather

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

edge it sets the globalEdgeOrientation

See #1367
parent b6a41c3c
......@@ -1185,35 +1185,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