From b0ddf92e7829b6cba5335e0996f2999a1f8abaf3 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 16 May 2018 10:14:45 +0100 Subject: [PATCH 1/4] ENH: polyMesh: fixed warning message. Fixes #828. --- src/OpenFOAM/meshes/polyMesh/polyMeshIO.C | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C b/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C index a88f5b12f3..9724bea724 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshIO.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) 2015 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2015-2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -207,6 +207,7 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate() if (boundaryChanged) { WarningInFunction + << "Number of patches has changed. This may have " << "unexpected consequences. Proceed with care." << endl; boundary_.clear(); From 1275c71e506482bffddc33a578b54d596f14cd59 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 16 May 2018 11:38:24 +0100 Subject: [PATCH 2/4] ENH: snappyHexMeshDict: description of gapMode --- .../mesh/generation/snappyHexMesh/snappyHexMeshDict | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict index 28ba5c3bb8..d2c3a1a690 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict @@ -268,6 +268,12 @@ castellatedMeshControls // // All three settings can be overridden on a surface by // // surface basis in the refinementSurfaces section. // gapLevel ( ); + // // Optional: when doing the gapLevel refinement directly remove + // // based on orientation w.r.t. gap. This limits the + // // amount of cells before doing the 'locationInMesh' + // // cell selection. Default is 'mixed' i.e. keep cells + // // whilst doing the gap-level refinement. + // //gapMode inside; // inside/outside/mixed //} } From 447ee9e02746d7e1a7399ecabbc1cd33c092cd80 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 21 May 2018 09:45:55 +0100 Subject: [PATCH 3/4] ENH: processorField: added etc/caseDicts file. Fixes #807. --- .../postProcessing/fields/processorField | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 etc/caseDicts/postProcessing/fields/processorField diff --git a/etc/caseDicts/postProcessing/fields/processorField b/etc/caseDicts/postProcessing/fields/processorField new file mode 100644 index 0000000000..575d287baf --- /dev/null +++ b/etc/caseDicts/postProcessing/fields/processorField @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Web: www.OpenFOAM.com + \\/ M anipulation | +------------------------------------------------------------------------------- +Description + Writes a volScalarField with processor number. Useful for postprocessing. + +\*---------------------------------------------------------------------------*/ + +type processorField; +libs ("libfieldFunctionObjects.so"); + +executeControl writeTime; +writeControl writeTime; + +// ************************************************************************* // From 7fe700a8dc359e282209eaeda5dae12e2c6bdb7a Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 21 May 2018 09:50:22 +0100 Subject: [PATCH 4/4] COMP: HashPtrTableI.H: inlined functions --- .../HashTables/HashPtrTable/HashPtrTableI.H | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTableI.H diff --git a/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTableI.H b/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTableI.H new file mode 100644 index 0000000000..9d5a4ad0b2 --- /dev/null +++ b/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTableI.H @@ -0,0 +1,113 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "autoPtr.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +inline Foam::HashPtrTable::HashPtrTable() +: + parent_type() +{} + + +template +inline Foam::HashPtrTable::HashPtrTable(const label size) +: + parent_type(size) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +inline bool Foam::HashPtrTable::insert +( + const Key& key, + autoPtr& aptr +) +{ + if (parent_type::insert(key, aptr.get())) + { + aptr.release(); // Now owned by HashPtrTable + return true; + } + + return false; +} + + +template +inline bool Foam::HashPtrTable::insert +( + const Key& key, + autoPtr&& aptr +) +{ + if (parent_type::insert(key, aptr.get())) + { + aptr.release(); // Now owned by HashPtrTable + return true; + } + + return false; +} + + +template +inline bool Foam::HashPtrTable::set +( + const Key& key, + T* ptr +) +{ + return this->parent_type::set(key, ptr); +} + + +template +inline bool Foam::HashPtrTable::set +( + const Key& key, + autoPtr& aptr +) +{ + return this->set(key, aptr.release()); +} + + +template +inline bool Foam::HashPtrTable::set +( + const Key& key, + autoPtr&& aptr +) +{ + return this->set(key, aptr.release()); +} + + +// ************************************************************************* //