Commit 8b52119b authored by mattijs's avatar mattijs Committed by Andrew Heather
Browse files

BUG: smappyHexMesh: report correct layerFaces

parent fbee36db
...@@ -2463,8 +2463,14 @@ void Foam::autoLayerDriver::getLayerCellsFaces ...@@ -2463,8 +2463,14 @@ void Foam::autoLayerDriver::getLayerCellsFaces
if (layer.size()) if (layer.size())
{ {
// Layer contains both original boundary face and new boundary // Layer contains both original boundary face and new boundary
// face so is nLayers+1 // face so is nLayers+1. Leave out old internal face.
forAll(layer, i) if (!mesh.isInternalFace(layer[0]))
{
FatalErrorIn("autoLayerDriver::getLayerCellsFaces()")
<< "problem." << layer[0] << exit(FatalError);
}
for (label i = 1; i < layer.size(); i++)
{ {
faceRealThickness[layer[i]] = realThickness; faceRealThickness[layer[i]] = realThickness;
} }
...@@ -2608,7 +2614,7 @@ bool Foam::autoLayerDriver::writeLayerData ...@@ -2608,7 +2614,7 @@ bool Foam::autoLayerDriver::writeLayerData
} }
{ {
label nAdded = 0; label nAdded = 0;
forAll(faceRealThickness, faceI) for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++)
{ {
if (faceRealThickness[faceI] > 0) if (faceRealThickness[faceI] > 0)
{ {
...@@ -2617,7 +2623,7 @@ bool Foam::autoLayerDriver::writeLayerData ...@@ -2617,7 +2623,7 @@ bool Foam::autoLayerDriver::writeLayerData
} }
faceSet layerFacesSet(mesh, "layerFaces", nAdded); faceSet layerFacesSet(mesh, "layerFaces", nAdded);
forAll(faceRealThickness, faceI) for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++)
{ {
if (faceRealThickness[faceI] > 0) if (faceRealThickness[faceI] > 0)
{ {
...@@ -3405,7 +3411,7 @@ void Foam::autoLayerDriver::addLayers ...@@ -3405,7 +3411,7 @@ void Foam::autoLayerDriver::addLayers
addedCellSet.write(); addedCellSet.write();
faceSet layerFacesSet(newMesh, "layerFaces", newMesh.nFaces()/100); faceSet layerFacesSet(newMesh, "layerFaces", newMesh.nFaces()/100);
forAll(faceRealThickness, faceI) for (label faceI = 0; faceI < newMesh.nInternalFaces(); faceI++)
{ {
if (faceRealThickness[faceI] > 0) if (faceRealThickness[faceI] > 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