From a6a46d23b8d17cd6863fa1e34e66f9ed828f4399 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 7 Jan 2019 17:51:47 +0000 Subject: [PATCH 1/2] BUG: polyMesh: set AUTO_WRITE flag. See #1147. --- .../decomposePar/domainDecomposition.C | 10 +++++++--- .../redistributePar/loadOrCreateMesh.C | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C index 1d34f53a5a..ad7979c9e1 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -346,7 +346,9 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) ( this->polyMesh::name(), // region of undecomposed mesh facesInstance(), - processorDb + processorDb, + IOobject::NO_READ, + IOobject::AUTO_WRITE ), std::move(facesInstancePoints), std::move(procFaces), @@ -361,7 +363,9 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) ( this->polyMesh::name(), // region of undecomposed mesh facesInstance(), - processorDb + processorDb, + IOobject::NO_READ, + IOobject::AUTO_WRITE ), std::move(procPoints), std::move(procFaces), diff --git a/applications/utilities/parallelProcessing/redistributePar/loadOrCreateMesh.C b/applications/utilities/parallelProcessing/redistributePar/loadOrCreateMesh.C index 7103a44f94..cb0e01891d 100644 --- a/applications/utilities/parallelProcessing/redistributePar/loadOrCreateMesh.C +++ b/applications/utilities/parallelProcessing/redistributePar/loadOrCreateMesh.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2015-2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -166,6 +166,7 @@ Foam::autoPtr Foam::loadOrCreateMesh // Create dummy mesh. Only used on procs that don't have mesh. IOobject noReadIO(io); noReadIO.readOpt() = IOobject::NO_READ; + noReadIO.writeOpt() = IOobject::AUTO_WRITE; fvMesh dummyMesh(noReadIO, Zero, false); // Add patches From 7339d6427e38cef8bd0b2222ea71f2a346dc1b5a Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 7 Jan 2019 17:53:26 +0000 Subject: [PATCH 2/2] ENH: setToFaceZone: improved messages --- .../setToFaceZone/setToFaceZone.C | 11 +++++++++-- .../setsToFaceZone/setsToFaceZone.C | 16 +++++++++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/meshTools/sets/faceZoneSources/setToFaceZone/setToFaceZone.C b/src/meshTools/sets/faceZoneSources/setToFaceZone/setToFaceZone.C index 04228b9f43..fbade3b022 100644 --- a/src/meshTools/sets/faceZoneSources/setToFaceZone/setToFaceZone.C +++ b/src/meshTools/sets/faceZoneSources/setToFaceZone/setToFaceZone.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2018-2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -68,7 +68,14 @@ Foam::setToFaceZone::setToFaceZone : topoSetSource(mesh), setName_(dict.get("faceSet")) -{} +{ + if (dict.found("cellSet")) + { + IOWarningInFunction(dict) + << "Ignoring entry 'cellSet' - maybe use setsToFaceZone instead ?" + << endl; + } +} Foam::setToFaceZone::setToFaceZone diff --git a/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C b/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C index 0942e4474b..5721ce483a 100644 --- a/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C +++ b/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2018-2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -112,8 +112,18 @@ void Foam::setsToFaceZone::applyToSet { if (verbose_) { - Info<< " Adding all faces from faceSet " << faceSetName_ - << " ..." << endl; + if (flip_) + { + Info<< " Adding all faces from faceSet " << faceSetName_ + << "; orientation pointing into cellSet " + << cellSetName_ << " ..." << endl; + } + else + { + Info<< " Adding all faces from faceSet " << faceSetName_ + << "; orientation pointing away from cellSet " + << cellSetName_ << " ..." << endl; + } } // Load the sets