Commit c7c7553e authored by mattijs's avatar mattijs
Browse files

BUG: attachDetach: accessing outside neighbour size

parent dd017458
......@@ -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
......
......@@ -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;
......
......@@ -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
......
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