diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C index ac8e28a81cbc82ef86de18dec320ae7ba81ed0ee..7ee72d6142ba2ae90d37b8f164387a25e64ecef9 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C @@ -369,6 +369,24 @@ void Foam::processorPolyPatch::updateMesh(PstreamBuffers& pBufs) >> nbrPointIndex >> nbrEdgeFace >> nbrEdgeIndex; + + if + ( + nbrPointIndex.size() != nPoints() + || nbrEdgeIndex.size() != nEdges() + ) + { + FatalErrorIn + ( + "processorPolyPatch::updateMesh(PstreamBuffers&)" + ) << "Size of data from processor " << neighbProcNo() + << " does not match size of data on processor " + << Pstream::myProcNo() << "." << nl + << " Neighbour has " << nbrPointFace.size() + << " points and " << nbrEdgeFace.size() << " edges." << nl + << " This proc has " << nPoints() << " points and " + << nEdges() << " edges." << exit(FatalError); + } } // Convert neighbour faces and indices into face back into