Commit 0ebecd2d authored by mattijs's avatar mattijs
Browse files

BUG: autoLayerDriver : update numbering of baffled faces

parent 7f030f79
......@@ -3116,11 +3116,12 @@ void Foam::autoLayerDriver::addLayers
);
// Update numbering of baffles
List<labelPair> newMeshBaffles(baffles.size());
forAll(baffles, i)
{
labelPair& p = baffles[i];
p[0] = map().reverseFaceMap()[p[0]];
p[1] = map().reverseFaceMap()[p[1]];
const labelPair& p = baffles[i];
newMeshBaffles[i][0] = map().reverseFaceMap()[p[0]];
newMeshBaffles[i][1] = map().reverseFaceMap()[p[1]];
}
// Collect layer faces and cells for outside loop.
......@@ -3167,7 +3168,7 @@ void Foam::autoLayerDriver::addLayers
(
addLayer,
meshQualityDict,
baffles,
newMeshBaffles,
pp(),
newMesh,
......@@ -3235,6 +3236,16 @@ void Foam::autoLayerDriver::addLayers
meshRefiner_.updateMesh(map, labelList(0));
// Update numbering on baffles
forAll(baffles, i)
{
labelPair& p = baffles[i];
p[0] = map().reverseFaceMap()[p[0]];
p[1] = map().reverseFaceMap()[p[1]];
}
label nBaffles = returnReduce(baffles.size(), sumOp<label>());
if (nBaffles > 0)
{
......
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