Commit c918021a authored by Dave Moxey's avatar Dave Moxey
Browse files

Add fix for periodic boundary condition edge alignment

parent 1de9470d
......@@ -1325,6 +1325,7 @@ namespace Nektar
* in all other elements.
*/
cnt = 0;
// Loop over all the elements in the domain
for(i = 0; i < locExpVector.size(); ++i)
{
......@@ -1491,6 +1492,33 @@ namespace Nektar
edgeOrient = (bndCondFaceExp->GetGeom2D())->GetEorient(k);
meshEdgeId = (bndCondFaceExp->GetGeom2D())->GetEid(k);
pIt = periodicEdges.find(meshEdgeId);
// See if this edge is periodic. If it is, then we map
// all edges to the one with lowest ID, and align all
// coefficients to this edge orientation.
if (pIt != periodicEdges.end())
{
int minId = pIt->second[0].id;
int minIdL = 0;
for (l = 1; l < pIt->second.size(); ++l)
{
if (pIt->second[l].id < minId)
{
minId = min(minId, pIt->second[l].id);
minIdL = l;
}
}
if (pIt->second[minIdL].orient == StdRegions::eBackwards &&
meshEdgeId != min(minId, meshEdgeId))
{
edgeOrient = edgeOrient == StdRegions::eForwards ?
StdRegions::eBackwards :
StdRegions::eForwards;
}
}
bndCondFaceExp->GetEdgeInteriorMap(
k,edgeOrient,edgeInteriorMap,edgeInteriorSign);
......
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