diff --git a/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C b/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C index 686c0dc33e..87deafe8ac 100644 --- a/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C +++ b/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C @@ -160,6 +160,23 @@ int main(int argc, char *argv[]) Pstream::scatterList(meshBb); } + + + // Temporarily: override master-only checking + regIOobject::fileCheckTypes oldCheckType = + regIOobject::fileModificationChecking; + + if (oldCheckType == regIOobject::timeStampMaster) + { + regIOobject::fileModificationChecking = regIOobject::timeStamp; + } + else if (oldCheckType == regIOobject::inotifyMaster) + { + regIOobject::fileModificationChecking = regIOobject::inotify; + } + + + IOobject io ( surfFileName, // name @@ -284,6 +301,10 @@ int main(int argc, char *argv[]) Info<< "Writing surface." << nl << endl; surfMesh.objectRegistry::write(); + + regIOobject::fileModificationChecking = oldCheckType; + + Info<< "End\n" << endl; return 0; diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index 5df8ef5fd7..3e54a37e62 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -997,7 +997,7 @@ bool Foam::polyMesh::upToDatePoints(const regIOobject& io) const void Foam::polyMesh::setUpToDatePoints(regIOobject& io) const { - io.eventNo() = points_.eventNo(); + io.eventNo() = points_.eventNo()+1; } diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C index d7daba5486..a3f38112c8 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C @@ -860,16 +860,62 @@ Foam::labelList Foam::dynamicRefineFvMesh::selectUnrefinePoints // All points that can be unrefined const labelList splitPoints(meshCutter_.getSplitPoints()); + + const labelListList& pointCells = this->pointCells(); + + // If we have any protected cells make sure they also are not being + // unrefined + + PackedBoolList protectedPoint(nPoints()); + + if (protectedCell_.size()) + { + // Get all points on a protected cell + forAll(pointCells, pointI) + { + const labelList& pCells = pointCells[pointI]; + + forAll(pCells, pCellI) + { + label cellI = pCells[pCellI]; + + if (protectedCell_[cellI]) + { + protectedPoint[pointI] = true; + break; + } + } + } + + syncTools::syncPointList + ( + *this, + protectedPoint, + orEqOp(), + 0U + ); + + if (debug) + { + Info<< "From " + << returnReduce(protectedCell_.count(), sumOp