diff --git a/src/dynamicMesh/attachDetach/attachInterface.C b/src/dynamicMesh/attachDetach/attachInterface.C index 11332a6257631a98b9773147f49b207adfcb7bd9..40c68cb8453c246bfa9bded9b2db6883bddf2caa 100644 --- a/src/dynamicMesh/attachDetach/attachInterface.C +++ b/src/dynamicMesh/attachDetach/attachInterface.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -83,6 +83,10 @@ void Foam::attachDetach::attachInterface forAll(removedPoints, pointI) { + //Pout<< "Removing point:" << removedPoints[pointI] + // << " currently at:" << ref.points()[removedPoints[pointI]] + // << endl; + ref.setAction(polyRemovePoint(removedPoints[pointI])); } @@ -90,8 +94,16 @@ void Foam::attachDetach::attachInterface // Remove all faces from the slave patch forAll(slavePatch, i) { + //Pout<< "Removing face " << i + slavePatchStart + // << " with verts:" << ref.faces()[i + slavePatchStart] + // << " at:" + // << UIndirectList<point> + // ( + // ref.points(), + // ref.faces()[i + slavePatchStart] + // ) + // << endl; ref.setAction(polyRemoveFace(i + slavePatchStart)); -// Pout<< "Removing face " << i + slavePatchStart << endl; } // Modify the faces from the master patch diff --git a/src/dynamicMesh/layerAdditionRemoval/addCellLayer.C b/src/dynamicMesh/layerAdditionRemoval/addCellLayer.C index fdcc41b6cb445690e4dd56a6c624334e19720809..2fe428d45c0c071b1de0c1aed58607d68d712b92 100644 --- a/src/dynamicMesh/layerAdditionRemoval/addCellLayer.C +++ b/src/dynamicMesh/layerAdditionRemoval/addCellLayer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -203,8 +203,8 @@ void Foam::layerAdditionRemoval::addCellLayer // Flip the face as necessary if ( - mc[faceI] == nei[mf[faceI]] - || !mesh.isInternalFace(mf[faceI]) + !mesh.isInternalFace(mf[faceI]) + || mc[faceI] == nei[mf[faceI]] ) { flipFaceFlux = true; diff --git a/src/dynamicMesh/layerAdditionRemoval/removeCellLayer.C b/src/dynamicMesh/layerAdditionRemoval/removeCellLayer.C index c6348af363460a07fac9a3e88470b761e605525a..1edaf10735c298436ac4d2bffba2ea53a0237b27 100644 --- a/src/dynamicMesh/layerAdditionRemoval/removeCellLayer.C +++ b/src/dynamicMesh/layerAdditionRemoval/removeCellLayer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -275,7 +275,7 @@ void Foam::layerAdditionRemoval::removeCellLayer // of the cell to be removed label masterSideCell = own[mf[faceI]]; - if (masterSideCell == mc[faceI]) + if (mesh.isInternalFace(mf[faceI]) && masterSideCell == mc[faceI]) { // Owner cell of the face is being removed. // Grab the neighbour instead @@ -284,7 +284,7 @@ void Foam::layerAdditionRemoval::removeCellLayer label slaveSideCell = own[ftc[faceI]]; - if (slaveSideCell == mc[faceI]) + if (mesh.isInternalFace(ftc[faceI]) && slaveSideCell == mc[faceI]) { // Owner cell of the face is being removed. // Grab the neighbour instead