From 28b3d2ec777ca62ef59c88278b386cd061e3b460 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 9 Dec 2015 09:27:34 +0000 Subject: [PATCH 1/5] ENH: fieldCoordinateSystemTransform: corrected header and dictionary. Fixes #21. --- .../fieldCoordinateSystemTransform.H | 9 ++++++--- .../fieldCoordinateSystemTransform/postProcessingDict | 6 ++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H index f18e90ca05..3dcf6fcead 100644 --- a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H +++ b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H @@ -45,9 +45,11 @@ Description UMean UPrime2Mean ); - coordinateSystem + origin (0.001 0 0); + + coordinateRotation { - origin (0.001 0 0); + type axesRotation; e1 (1 0.15 0); e3 (0 0 -1); } @@ -59,7 +61,8 @@ Description Property | Description | Required | Default value type | type name: fieldCoordinateSystemTransform | yes | fields | list of fields to be transformed |yes | - coordinateSystem | local co-ordinate system | yes | + origin | origin of local co-ordinate system | yes | + coordinateRotation | orientation of local co-ordinate system | yes | log | Log to standard output | no | yes \endtable diff --git a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/postProcessingDict b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/postProcessingDict index 4522612dbf..3ec7bb927d 100644 --- a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/postProcessingDict +++ b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/postProcessingDict @@ -38,9 +38,11 @@ functions UPrime2Mean ); - coordinateSystem + origin (0.001 0 0); + + coordinateRotation { - origin (0.001 0 0); + type axesRotation; e1 (1 0.15 0); e3 (0 0 -1); } From 6510e5ce49a613c333c9b74a7a126d13a15df800 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 9 Dec 2015 10:53:17 +0000 Subject: [PATCH 2/5] ENH: surfaceRedistributePar: switch off file modification checking. --- .../surfaceRedistributePar.C | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C b/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C index 001745fbca..0ed8db6dad 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; From 4fef4992982f65c3eb315ff98a1e1d9e5de84eb6 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 9 Dec 2015 17:03:15 +0000 Subject: [PATCH 3/5] BUG: polyMesh: test for up-to-date data w.r.t. points --- src/OpenFOAM/meshes/polyMesh/polyMesh.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } From e2cefb1a10d97f07ccbc57aa853122dc5dcb0aea Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 9 Dec 2015 17:05:30 +0000 Subject: [PATCH 4/5] BUG: dynamic refinement: unrefinement was not looking at protectedCell cells that are protected should neither be refined nor unrefined. Fixed the logic: if any of the cells to-be-merged (=unrefined) is protected do not unrefine. --- .../dynamicRefineFvMesh/dynamicRefineFvMesh.C | 50 ++++++++++++++++++- 1 file changed, 48 insertions(+), 2 deletions(-) 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