From 9b638f9a7106c765e54048b133e2c02b3b295014 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 30 Oct 2018 12:01:36 +0000 Subject: [PATCH] ENH: distinguish between cell/face/point topoSetSource (#1060) - add intermediate classes topoSetCellSource, topoSetFaceSource, topoSetPointSource and corresponding New() factories --- .../badQualityToCell/badQualityToCell.C | 43 +++--- .../badQualityToCell/badQualityToCell.H | 27 +--- .../badQualityToFace/badQualityToFace.C | 43 +++--- .../badQualityToFace/badQualityToFace.H | 15 +- ...irectionalPressureGradientExplicitSource.H | 4 +- .../meanVelocityForce/meanVelocityForce.H | 2 - src/meshTools/Make/files | 56 ++++---- .../sets/cellSources/boxToCell/boxToCell.C | 35 ++++- .../sets/cellSources/boxToCell/boxToCell.H | 22 ++- .../sets/cellSources/cellToCell/cellToCell.C | 13 +- .../sets/cellSources/cellToCell/cellToCell.H | 17 +-- .../cylinderAnnulusToCell.C | 43 +++++- .../cylinderAnnulusToCell.H | 13 +- .../cylinderToCell/cylinderToCell.C | 31 +++- .../cylinderToCell/cylinderToCell.H | 11 +- .../sets/cellSources/faceToCell/faceToCell.C | 15 +- .../sets/cellSources/faceToCell/faceToCell.H | 11 +- .../faceZoneToCell/faceZoneToCell.C | 8 +- .../faceZoneToCell/faceZoneToCell.H | 11 +- .../cellSources/fieldToCell/fieldToCell.C | 31 +++- .../cellSources/fieldToCell/fieldToCell.H | 11 +- .../cellSources/labelToCell/labelToCell.C | 34 ++++- .../cellSources/labelToCell/labelToCell.H | 22 ++- .../sets/cellSources/nbrToCell/nbrToCell.C | 23 ++- .../sets/cellSources/nbrToCell/nbrToCell.H | 17 +-- .../cellSources/nearestToCell/nearestToCell.C | 38 ++++- .../cellSources/nearestToCell/nearestToCell.H | 22 ++- .../cellSources/pointToCell/pointToCell.C | 15 +- .../cellSources/pointToCell/pointToCell.H | 11 +- .../cellSources/regionToCell/regionToCell.C | 8 +- .../cellSources/regionToCell/regionToCell.H | 21 ++- .../rotatedBoxToCell/rotatedBoxToCell.C | 33 ++++- .../rotatedBoxToCell/rotatedBoxToCell.H | 11 +- .../cellSources/shapeToCell/shapeToCell.C | 17 +-- .../cellSources/shapeToCell/shapeToCell.H | 17 +-- .../cellSources/sphereToCell/sphereToCell.C | 20 ++- .../cellSources/sphereToCell/sphereToCell.H | 11 +- .../cellSources/surfaceToCell/surfaceToCell.C | 34 +++-- .../cellSources/surfaceToCell/surfaceToCell.H | 11 +- .../targetVolumeToCell/targetVolumeToCell.C | 40 ++++-- .../targetVolumeToCell/targetVolumeToCell.H | 14 +- .../topoSetCellSource/topoSetCellSource.C | 95 +++++++++++++ .../topoSetCellSource/topoSetCellSource.H | 133 ++++++++++++++++++ .../sets/cellSources/zoneToCell/zoneToCell.C | 22 ++- .../sets/cellSources/zoneToCell/zoneToCell.H | 11 +- .../setToCellZone/setToCellZone.C | 4 +- .../setToCellZone/setToCellZone.H | 6 +- .../boundaryToFace/boundaryToFace.C | 22 ++- .../boundaryToFace/boundaryToFace.H | 11 +- .../sets/faceSources/boxToFace/boxToFace.C | 35 ++++- .../sets/faceSources/boxToFace/boxToFace.H | 22 ++- .../sets/faceSources/cellToFace/cellToFace.C | 15 +- .../sets/faceSources/cellToFace/cellToFace.H | 11 +- .../cylinderAnnulusToFace.C | 43 +++++- .../cylinderAnnulusToFace.H | 11 +- .../cylinderToFace/cylinderToFace.C | 31 +++- .../cylinderToFace/cylinderToFace.H | 11 +- .../sets/faceSources/faceToFace/faceToFace.C | 13 +- .../sets/faceSources/faceToFace/faceToFace.H | 17 +-- .../faceSources/labelToFace/labelToFace.C | 38 ++++- .../faceSources/labelToFace/labelToFace.H | 22 ++- .../faceSources/normalToFace/normalToFace.C | 33 +++-- .../faceSources/normalToFace/normalToFace.H | 11 +- .../faceSources/patchToFace/patchToFace.C | 22 ++- .../faceSources/patchToFace/patchToFace.H | 11 +- .../faceSources/pointToFace/pointToFace.C | 29 +++- .../faceSources/pointToFace/pointToFace.H | 11 +- .../faceSources/regionToFace/regionToFace.C | 22 ++- .../faceSources/regionToFace/regionToFace.H | 13 +- .../topoSetFaceSource/topoSetFaceSource.C | 95 +++++++++++++ .../topoSetFaceSource/topoSetFaceSource.H | 133 ++++++++++++++++++ .../sets/faceSources/zoneToFace/zoneToFace.C | 22 ++- .../sets/faceSources/zoneToFace/zoneToFace.H | 11 +- .../setToFaceZone/setToFaceZone.H | 4 +- .../setsToFaceZone/setsToFaceZone.H | 8 +- .../sets/pointSources/boxToPoint/boxToPoint.C | 35 ++++- .../sets/pointSources/boxToPoint/boxToPoint.H | 22 ++- .../pointSources/cellToPoint/cellToPoint.C | 15 +- .../pointSources/cellToPoint/cellToPoint.H | 11 +- .../pointSources/faceToPoint/faceToPoint.C | 15 +- .../pointSources/faceToPoint/faceToPoint.H | 11 +- .../pointSources/labelToPoint/labelToPoint.C | 34 ++++- .../pointSources/labelToPoint/labelToPoint.H | 22 ++- .../nearestToPoint/nearestToPoint.C | 34 ++++- .../nearestToPoint/nearestToPoint.H | 22 ++- .../pointSources/pointToPoint/pointToPoint.C | 9 +- .../pointSources/pointToPoint/pointToPoint.H | 11 +- .../surfaceToPoint/surfaceToPoint.C | 8 +- .../surfaceToPoint/surfaceToPoint.H | 11 +- .../topoSetPointSource/topoSetPointSource.C | 95 +++++++++++++ .../topoSetPointSource/topoSetPointSource.H | 133 ++++++++++++++++++ .../pointSources/zoneToPoint/zoneToPoint.C | 22 ++- .../pointSources/zoneToPoint/zoneToPoint.H | 11 +- .../sets/topoSetSource/topoSetSource.H | 3 +- src/overset/regionsToCell/regionsToCell.C | 57 ++++---- src/overset/regionsToCell/regionsToCell.H | 35 ++--- .../foamyHexMesh/flange/system/faceSetDict | 2 +- 97 files changed, 1756 insertions(+), 741 deletions(-) create mode 100644 src/meshTools/sets/cellSources/topoSetCellSource/topoSetCellSource.C create mode 100644 src/meshTools/sets/cellSources/topoSetCellSource/topoSetCellSource.H create mode 100644 src/meshTools/sets/faceSources/topoSetFaceSource/topoSetFaceSource.C create mode 100644 src/meshTools/sets/faceSources/topoSetFaceSource/topoSetFaceSource.H create mode 100644 src/meshTools/sets/pointSources/topoSetPointSource/topoSetPointSource.C create mode 100644 src/meshTools/sets/pointSources/topoSetPointSource/topoSetPointSource.H diff --git a/src/dynamicMesh/motionSmoother/badQualityToCell/badQualityToCell.C b/src/dynamicMesh/motionSmoother/badQualityToCell/badQualityToCell.C index c31e2606b9..81788a5703 100644 --- a/src/dynamicMesh/motionSmoother/badQualityToCell/badQualityToCell.C +++ b/src/dynamicMesh/motionSmoother/badQualityToCell/badQualityToCell.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -33,13 +33,25 @@ License namespace Foam { - -defineTypeNameAndDebug(badQualityToCell, 0); - -addToRunTimeSelectionTable(topoSetSource, badQualityToCell, word); - -addToRunTimeSelectionTable(topoSetSource, badQualityToCell, istream); - + defineTypeNameAndDebug(badQualityToCell, 0); + addToRunTimeSelectionTable(topoSetSource, badQualityToCell, word); + addToRunTimeSelectionTable(topoSetSource, badQualityToCell, istream); + addToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word); + addToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, istream); + addNamedToRunTimeSelectionTable + ( + topoSetCellSource, + badQualityToCell, + word, + badQuality + ); + addNamedToRunTimeSelectionTable + ( + topoSetCellSource, + badQualityToCell, + istream, + badQuality + ); } @@ -59,9 +71,8 @@ void Foam::badQualityToCell::combine(topoSet& set, const bool add) const motionSmoother::checkMesh(false, mesh_, dict_, faces); faces.sync(mesh_); - forAllConstIter(faceSet, faces, iter) + for (const label facei : faces) { - label facei = iter.key(); addOrDelete(set, mesh_.faceOwner()[facei], add); if (mesh_.isInternalFace(facei)) { @@ -73,36 +84,28 @@ void Foam::badQualityToCell::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from dictionary Foam::badQualityToCell::badQualityToCell ( const polyMesh& mesh, const dictionary& dict ) : - topoSetSource(mesh), + topoSetCellSource(mesh), dict_(dict) {} -// Construct from Istream Foam::badQualityToCell::badQualityToCell ( const polyMesh& mesh, Istream& is ) : - topoSetSource(mesh), + topoSetCellSource(mesh), dict_(is) {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::badQualityToCell::~badQualityToCell() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void Foam::badQualityToCell::applyToSet diff --git a/src/dynamicMesh/motionSmoother/badQualityToCell/badQualityToCell.H b/src/dynamicMesh/motionSmoother/badQualityToCell/badQualityToCell.H index 98f6be7a19..942ace2c4a 100644 --- a/src/dynamicMesh/motionSmoother/badQualityToCell/badQualityToCell.H +++ b/src/dynamicMesh/motionSmoother/badQualityToCell/badQualityToCell.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -35,7 +35,7 @@ SourceFiles #ifndef badQualityToCell_H #define badQualityToCell_H -#include "topoSetSource.H" +#include "topoSetCellSource.H" #include "bitSet.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,7 +49,7 @@ namespace Foam class badQualityToCell : - public topoSetSource + public topoSetCellSource { // Private data @@ -74,35 +74,22 @@ public: // Constructors //- Construct from dictionary - badQualityToCell - ( - const polyMesh& mesh, - const dictionary& dict - ); + badQualityToCell(const polyMesh& mesh, const dictionary& dict); //- Construct from Istream - badQualityToCell - ( - const polyMesh& mesh, - Istream& - ); + badQualityToCell(const polyMesh& mesh, Istream& is); //- Destructor - virtual ~badQualityToCell(); + virtual ~badQualityToCell() = default; // Member Functions - virtual sourceType setType() const - { - return CELLSETSOURCE; - } - virtual void applyToSet ( const topoSetSource::setAction action, - topoSet& + topoSet& set ) const; }; diff --git a/src/dynamicMesh/motionSmoother/badQualityToFace/badQualityToFace.C b/src/dynamicMesh/motionSmoother/badQualityToFace/badQualityToFace.C index dd76d0b0c8..d98621d524 100644 --- a/src/dynamicMesh/motionSmoother/badQualityToFace/badQualityToFace.C +++ b/src/dynamicMesh/motionSmoother/badQualityToFace/badQualityToFace.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -33,13 +33,25 @@ License namespace Foam { - -defineTypeNameAndDebug(badQualityToFace, 0); - -addToRunTimeSelectionTable(topoSetSource, badQualityToFace, word); - -addToRunTimeSelectionTable(topoSetSource, badQualityToFace, istream); - + defineTypeNameAndDebug(badQualityToFace, 0); + addToRunTimeSelectionTable(topoSetSource, badQualityToFace, word); + addToRunTimeSelectionTable(topoSetSource, badQualityToFace, istream); + addToRunTimeSelectionTable(topoSetFaceSource, badQualityToFace, word); + addToRunTimeSelectionTable(topoSetFaceSource, badQualityToFace, istream); + addNamedToRunTimeSelectionTable + ( + topoSetFaceSource, + badQualityToFace, + word, + badQuality + ); + addNamedToRunTimeSelectionTable + ( + topoSetFaceSource, + badQualityToFace, + istream, + badQuality + ); } @@ -59,9 +71,8 @@ void Foam::badQualityToFace::combine(topoSet& set, const bool add) const motionSmoother::checkMesh(false, mesh_, dict_, faces); faces.sync(mesh_); - forAllConstIter(faceSet, faces, iter) + for (const label facei : faces) { - label facei = iter.key(); addOrDelete(set, facei, add); } } @@ -69,36 +80,28 @@ void Foam::badQualityToFace::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from dictionary Foam::badQualityToFace::badQualityToFace ( const polyMesh& mesh, const dictionary& dict ) : - topoSetSource(mesh), + topoSetFaceSource(mesh), dict_(dict) {} -// Construct from Istream Foam::badQualityToFace::badQualityToFace ( const polyMesh& mesh, Istream& is ) : - topoSetSource(mesh), + topoSetFaceSource(mesh), dict_(is) {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::badQualityToFace::~badQualityToFace() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void Foam::badQualityToFace::applyToSet diff --git a/src/dynamicMesh/motionSmoother/badQualityToFace/badQualityToFace.H b/src/dynamicMesh/motionSmoother/badQualityToFace/badQualityToFace.H index e48fe2e030..92ce3a058a 100644 --- a/src/dynamicMesh/motionSmoother/badQualityToFace/badQualityToFace.H +++ b/src/dynamicMesh/motionSmoother/badQualityToFace/badQualityToFace.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -35,7 +35,7 @@ SourceFiles #ifndef badQualityToFace_H #define badQualityToFace_H -#include "topoSetSource.H" +#include "topoSetFaceSource.H" #include "bitSet.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,7 +49,7 @@ namespace Foam class badQualityToFace : - public topoSetSource + public topoSetFaceSource { // Private data @@ -89,20 +89,15 @@ public: //- Destructor - virtual ~badQualityToFace(); + virtual ~badQualityToFace() = default; // Member Functions - virtual sourceType setType() const - { - return CELLSETSOURCE; - } - virtual void applyToSet ( const topoSetSource::setAction action, - topoSet& + topoSet& set ) const; }; diff --git a/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.H b/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.H index e5831682df..8741de56d1 100644 --- a/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.H +++ b/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.H @@ -84,13 +84,11 @@ SourceFiles #ifndef directionalPressureGradientExplicitSource_H #define directionalPressureGradientExplicitSource_H -#include "cellSetOption.H" #include "autoPtr.H" -#include "topoSetSource.H" -#include "cellSet.H" #include "fvMesh.H" #include "volFields.H" #include "fvOption.H" +#include "cellSetOption.H" #include "interpolationTable.H" diff --git a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.H b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.H index fac0740aed..051888aa9b 100644 --- a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.H +++ b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.H @@ -51,8 +51,6 @@ SourceFiles #define meanVelocityForce_H #include "autoPtr.H" -#include "topoSetSource.H" -#include "cellSet.H" #include "fvMesh.H" #include "volFields.H" #include "cellSetOption.H" diff --git a/src/meshTools/Make/files b/src/meshTools/Make/files index 58c3fa156f..4fcdeafb7a 100644 --- a/src/meshTools/Make/files +++ b/src/meshTools/Make/files @@ -144,49 +144,55 @@ $(topoSets)/pointZoneSet.C sets/topoSetSource/topoSetSource.C -cellSources = sets/cellSources -$(cellSources)/faceToCell/faceToCell.C -$(cellSources)/fieldToCell/fieldToCell.C -$(cellSources)/pointToCell/pointToCell.C -$(cellSources)/shapeToCell/shapeToCell.C +cellSources = sets/cellSources +$(cellSources)/topoSetCellSource/topoSetCellSource.C $(cellSources)/boxToCell/boxToCell.C +$(cellSources)/cellToCell/cellToCell.C +$(cellSources)/cylinderAnnulusToCell/cylinderAnnulusToCell.C +$(cellSources)/cylinderToCell/cylinderToCell.C +$(cellSources)/faceToCell/faceToCell.C +$(cellSources)/faceZoneToCell/faceZoneToCell.C +$(cellSources)/fieldToCell/fieldToCell.C +$(cellSources)/labelToCell/labelToCell.C +$(cellSources)/nbrToCell/nbrToCell.C +$(cellSources)/nearestToCell/nearestToCell.C +$(cellSources)/noneToCell/noneToCell.C +$(cellSources)/pointToCell/pointToCell.C $(cellSources)/regionToCell/regionToCell.C $(cellSources)/rotatedBoxToCell/rotatedBoxToCell.C -$(cellSources)/labelToCell/labelToCell.C -$(cellSources)/surfaceToCell/surfaceToCell.C -$(cellSources)/cellToCell/cellToCell.C -$(cellSources)/nearestToCell/nearestToCell.C -$(cellSources)/nbrToCell/nbrToCell.C -$(cellSources)/zoneToCell/zoneToCell.C +$(cellSources)/shapeToCell/shapeToCell.C $(cellSources)/sphereToCell/sphereToCell.C -$(cellSources)/cylinderToCell/cylinderToCell.C -$(cellSources)/faceZoneToCell/faceZoneToCell.C -$(cellSources)/cylinderAnnulusToCell/cylinderAnnulusToCell.C +$(cellSources)/surfaceToCell/surfaceToCell.C $(cellSources)/targetVolumeToCell/targetVolumeToCell.C +$(cellSources)/zoneToCell/zoneToCell.C faceSources = sets/faceSources +$(faceSources)/topoSetFaceSource/topoSetFaceSource.C +$(faceSources)/boundaryToFace/boundaryToFace.C +$(faceSources)/boxToFace/boxToFace.C +$(faceSources)/cellToFace/cellToFace.C +$(faceSources)/cylinderAnnulusToFace/cylinderAnnulusToFace.C +$(faceSources)/cylinderToFace/cylinderToFace.C $(faceSources)/faceToFace/faceToFace.C $(faceSources)/labelToFace/labelToFace.C -$(faceSources)/cellToFace/cellToFace.C +$(faceSources)/noneToFace/noneToFace.C $(faceSources)/normalToFace/normalToFace.C -$(faceSources)/pointToFace/pointToFace.C $(faceSources)/patchToFace/patchToFace.C -$(faceSources)/boundaryToFace/boundaryToFace.C -$(faceSources)/zoneToFace/zoneToFace.C -$(faceSources)/boxToFace/boxToFace.C +$(faceSources)/pointToFace/pointToFace.C $(faceSources)/regionToFace/regionToFace.C -$(faceSources)/cylinderToFace/cylinderToFace.C -$(faceSources)/cylinderAnnulusToFace/cylinderAnnulusToFace.C +$(faceSources)/zoneToFace/zoneToFace.C pointSources = sets/pointSources -$(pointSources)/labelToPoint/labelToPoint.C -$(pointSources)/pointToPoint/pointToPoint.C +$(pointSources)/topoSetPointSource/topoSetPointSource.C +$(pointSources)/boxToPoint/boxToPoint.C $(pointSources)/cellToPoint/cellToPoint.C $(pointSources)/faceToPoint/faceToPoint.C -$(pointSources)/boxToPoint/boxToPoint.C +$(pointSources)/labelToPoint/labelToPoint.C +$(pointSources)/nearestToPoint/nearestToPoint.C +$(pointSources)/noneToPoint/noneToPoint.C +$(pointSources)/pointToPoint/pointToPoint.C $(pointSources)/surfaceToPoint/surfaceToPoint.C $(pointSources)/zoneToPoint/zoneToPoint.C -$(pointSources)/nearestToPoint/nearestToPoint.C faceZoneSources = sets/faceZoneSources $(faceZoneSources)/faceZoneToFaceZone/faceZoneToFaceZone.C diff --git a/src/meshTools/sets/cellSources/boxToCell/boxToCell.C b/src/meshTools/sets/cellSources/boxToCell/boxToCell.C index 377a36d455..5d4b7bcd4c 100644 --- a/src/meshTools/sets/cellSources/boxToCell/boxToCell.C +++ b/src/meshTools/sets/cellSources/boxToCell/boxToCell.C @@ -34,6 +34,22 @@ namespace Foam defineTypeNameAndDebug(boxToCell, 0); addToRunTimeSelectionTable(topoSetSource, boxToCell, word); addToRunTimeSelectionTable(topoSetSource, boxToCell, istream); + addToRunTimeSelectionTable(topoSetCellSource, boxToCell, word); + addToRunTimeSelectionTable(topoSetCellSource, boxToCell, istream); + addNamedToRunTimeSelectionTable + ( + topoSetCellSource, + boxToCell, + word, + box + ); + addNamedToRunTimeSelectionTable + ( + topoSetCellSource, + boxToCell, + istream, + box + ); } @@ -73,18 +89,29 @@ Foam::boxToCell::boxToCell const treeBoundBoxList& bbs ) : - topoSetSource(mesh), + topoSetCellSource(mesh), bbs_(bbs) {} +Foam::boxToCell::boxToCell +( + const polyMesh& mesh, + treeBoundBoxList&& bbs +) +: + topoSetCellSource(mesh), + bbs_(std::move(bbs)) +{} + + Foam::boxToCell::boxToCell ( const polyMesh& mesh, const dictionary& dict ) : - topoSetSource(mesh), + topoSetCellSource(mesh), bbs_() { // Look for 'boxes' or 'box' @@ -102,8 +129,8 @@ Foam::boxToCell::boxToCell Istream& is ) : - topoSetSource(mesh), - bbs_(1, treeBoundBox(checkIs(is))) + topoSetCellSource(mesh), + bbs_(one(), treeBoundBox(checkIs(is))) {} diff --git a/src/meshTools/sets/cellSources/boxToCell/boxToCell.H b/src/meshTools/sets/cellSources/boxToCell/boxToCell.H index ce69cda4eb..09a7920f11 100644 --- a/src/meshTools/sets/cellSources/boxToCell/boxToCell.H +++ b/src/meshTools/sets/cellSources/boxToCell/boxToCell.H @@ -25,7 +25,7 @@ Class Foam::boxToCell Description - A topoSetSource to select cells based on cell centres inside box(es). + A topoSetCellSource to select cells based on cell centres inside box(es). \heading Dictionary parameters \table @@ -46,7 +46,7 @@ SourceFiles #ifndef boxToCell_H #define boxToCell_H -#include "topoSetSource.H" +#include "topoSetCellSource.H" #include "treeBoundBoxList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -60,7 +60,7 @@ namespace Foam class boxToCell : - public topoSetSource + public topoSetCellSource { // Private data @@ -83,12 +83,11 @@ public: // Constructors - //- Construct from components - boxToCell - ( - const polyMesh& mesh, - const treeBoundBoxList& bbs - ); + //- Construct from components, copying bounding boxes + boxToCell(const polyMesh& mesh, const treeBoundBoxList& bbs); + + //- Construct from components, moving bounding boxes + boxToCell(const polyMesh& mesh, treeBoundBoxList&& bbs); //- Construct from dictionary boxToCell(const polyMesh& mesh, const dictionary& dict); @@ -103,11 +102,6 @@ public: // Member Functions - virtual sourceType setType() const - { - return CELLSETSOURCE; - } - virtual void applyToSet ( const topoSetSource::setAction action, diff --git a/src/meshTools/sets/cellSources/cellToCell/cellToCell.C b/src/meshTools/sets/cellSources/cellToCell/cellToCell.C index 6761dab811..565ad65e34 100644 --- a/src/meshTools/sets/cellSources/cellToCell/cellToCell.C +++ b/src/meshTools/sets/cellSources/cellToCell/cellToCell.C @@ -35,6 +35,8 @@ namespace Foam defineTypeNameAndDebug(cellToCell, 0); addToRunTimeSelectionTable(topoSetSource, cellToCell, word); addToRunTimeSelectionTable(topoSetSource, cellToCell, istream); + addToRunTimeSelectionTable(topoSetCellSource, cellToCell, word); + addToRunTimeSelectionTable(topoSetCellSource, cellToCell, istream); } @@ -54,7 +56,7 @@ Foam::cellToCell::cellToCell const word& setName ) : - topoSetSource(mesh), + topoSetCellSource(mesh), setName_(setName) {} @@ -65,8 +67,11 @@ Foam::cellToCell::cellToCell const dictionary& dict ) : - topoSetSource(mesh), - setName_(dict.get("set")) + cellToCell + ( + mesh, + dict.get("set") + ) {} @@ -76,7 +81,7 @@ Foam::cellToCell::cellToCell Istream& is ) : - topoSetSource(mesh), + topoSetCellSource(mesh), setName_(checkIs(is)) {} diff --git a/src/meshTools/sets/cellSources/cellToCell/cellToCell.H b/src/meshTools/sets/cellSources/cellToCell/cellToCell.H index 23fb8be3d8..2b619f12f0 100644 --- a/src/meshTools/sets/cellSources/cellToCell/cellToCell.H +++ b/src/meshTools/sets/cellSources/cellToCell/cellToCell.H @@ -25,7 +25,7 @@ Class Foam::cellToCell Description - A topoSetSource to select the cells from another cellSet. + A topoSetCellSource to select the cells from another cellSet. \heading Dictionary parameters \table @@ -41,7 +41,7 @@ SourceFiles #ifndef cellToCell_H #define cellToCell_H -#include "topoSetSource.H" +#include "topoSetCellSource.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -54,7 +54,7 @@ namespace Foam class cellToCell : - public topoSetSource + public topoSetCellSource { // Private data @@ -72,11 +72,7 @@ public: // Constructors //- Construct from components - cellToCell - ( - const polyMesh& mesh, - const word& setName - ); + cellToCell(const polyMesh& mesh, const word& setName); //- Construct from dictionary cellToCell(const polyMesh& mesh, const dictionary& dict); @@ -91,11 +87,6 @@ public: // Member Functions - virtual sourceType setType() const - { - return CELLSETSOURCE; - } - virtual void applyToSet ( const topoSetSource::setAction action, diff --git a/src/meshTools/sets/cellSources/cylinderAnnulusToCell/cylinderAnnulusToCell.C b/src/meshTools/sets/cellSources/cylinderAnnulusToCell/cylinderAnnulusToCell.C index 6a88cfb80e..033b7602ce 100644 --- a/src/meshTools/sets/cellSources/cylinderAnnulusToCell/cylinderAnnulusToCell.C +++ b/src/meshTools/sets/cellSources/cylinderAnnulusToCell/cylinderAnnulusToCell.C @@ -34,6 +34,32 @@ namespace Foam defineTypeNameAndDebug(cylinderAnnulusToCell, 0); addToRunTimeSelectionTable(topoSetSource, cylinderAnnulusToCell, word); addToRunTimeSelectionTable(topoSetSource, cylinderAnnulusToCell, istream); + addToRunTimeSelectionTable + ( + topoSetCellSource, + cylinderAnnulusToCell, + word + ); + addToRunTimeSelectionTable + ( + topoSetCellSource, + cylinderAnnulusToCell, + istream + ); + addNamedToRunTimeSelectionTable + ( + topoSetCellSource, + cylinderAnnulusToCell, + word, + cylinderAnnulus + ); + addNamedToRunTimeSelectionTable + ( + topoSetCellSource, + cylinderAnnulusToCell, + istream, + cylinderAnnulus + ); } @@ -85,7 +111,7 @@ Foam::cylinderAnnulusToCell::cylinderAnnulusToCell const scalar innerRadius ) : - topoSetSource(mesh), + topoSetCellSource(mesh), point1_(point1), point2_(point2), outerRadius_(outerRadius), @@ -99,11 +125,14 @@ Foam::cylinderAnnulusToCell::cylinderAnnulusToCell const dictionary& dict ) : - topoSetSource(mesh), - point1_(dict.get("p1")), - point2_(dict.get("p2")), - outerRadius_(dict.get("outerRadius")), - innerRadius_(dict.get("innerRadius")) + cylinderAnnulusToCell + ( + mesh, + dict.get("p1"), + dict.get("p2"), + dict.get("outerRadius"), + dict.get("innerRadius") + ) {} @@ -113,7 +142,7 @@ Foam::cylinderAnnulusToCell::cylinderAnnulusToCell Istream& is ) : - topoSetSource(mesh), + topoSetCellSource(mesh), point1_(checkIs(is)), point2_(checkIs(is)), outerRadius_(readScalar(checkIs(is))), diff --git a/src/meshTools/sets/cellSources/cylinderAnnulusToCell/cylinderAnnulusToCell.H b/src/meshTools/sets/cellSources/cylinderAnnulusToCell/cylinderAnnulusToCell.H index af8bd0bad2..9c02f64dfd 100644 --- a/src/meshTools/sets/cellSources/cylinderAnnulusToCell/cylinderAnnulusToCell.H +++ b/src/meshTools/sets/cellSources/cylinderAnnulusToCell/cylinderAnnulusToCell.H @@ -25,7 +25,7 @@ Class Foam::cylinderAnnulusToCell Description - A topoSetSource to select cells based on cell centres inside a + A topoSetCellSource to select cells based on cell centres inside a cylinder annulus. \heading Dictionary parameters @@ -45,7 +45,7 @@ SourceFiles #ifndef cylinderAnnulusToCell_H #define cylinderAnnulusToCell_H -#include "topoSetSource.H" +#include "topoSetCellSource.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -58,7 +58,7 @@ namespace Foam class cylinderAnnulusToCell : - public topoSetSource + public topoSetCellSource { // Private data @@ -99,7 +99,7 @@ public: const point& point1, const point& point2, const scalar outerRadius, - const scalar innerRadius + const scalar innerRadius = 0 ); //- Construct from dictionary @@ -115,11 +115,6 @@ public: // Member Functions - virtual sourceType setType() const - { - return CELLSETSOURCE; - } - virtual void applyToSet ( const topoSetSource::setAction action, diff --git a/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C b/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C index a8ceeb408b..910868d171 100644 --- a/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C +++ b/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C @@ -34,6 +34,22 @@ namespace Foam defineTypeNameAndDebug(cylinderToCell, 0); addToRunTimeSelectionTable(topoSetSource, cylinderToCell, word); addToRunTimeSelectionTable(topoSetSource, cylinderToCell, istream); + addToRunTimeSelectionTable(topoSetCellSource, cylinderToCell, word); + addToRunTimeSelectionTable(topoSetCellSource, cylinderToCell, istream); + addNamedToRunTimeSelectionTable + ( + topoSetCellSource, + cylinderToCell, + word, + cylinder + ); + addNamedToRunTimeSelectionTable + ( + topoSetCellSource, + cylinderToCell, + istream, + cylinder + ); } @@ -82,7 +98,7 @@ Foam::cylinderToCell::cylinderToCell const scalar radius ) : - topoSetSource(mesh), + topoSetCellSource(mesh), point1_(point1), point2_(point2), radius_(radius) @@ -95,10 +111,13 @@ Foam::cylinderToCell::cylinderToCell const dictionary& dict ) : - topoSetSource(mesh), - point1_(dict.get("p1")), - point2_(dict.get("p2")), - radius_(dict.get("radius")) + cylinderToCell + ( + mesh, + dict.get("p1"), + dict.get("p2"), + dict.get("radius") + ) {} @@ -108,7 +127,7 @@ Foam::cylinderToCell::cylinderToCell Istream& is ) : - topoSetSource(mesh), + topoSetCellSource(mesh), point1_(checkIs(is)), point2_(checkIs(is)), radius_(readScalar(checkIs(is))) diff --git a/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.H b/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.H index 0d3db7640a..f87bd7dbdc 100644 --- a/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.H +++ b/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.H @@ -25,7 +25,7 @@ Class Foam::cylinderToCell Description - A topoSetSource to select cells based on cell centres inside a cylinder. + A topoSetCellSource to select cells with their centres inside a cylinder. \heading Dictionary parameters \table @@ -43,7 +43,7 @@ SourceFiles #ifndef cylinderToCell_H #define cylinderToCell_H -#include "topoSetSource.H" +#include "topoSetCellSource.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -56,7 +56,7 @@ namespace Foam class cylinderToCell : - public topoSetSource + public topoSetCellSource { // Private data @@ -109,11 +109,6 @@ public: // Member Functions - virtual sourceType setType() const - { - return CELLSETSOURCE; - } - virtual void applyToSet ( const topoSetSource::setAction action, diff --git a/src/meshTools/sets/cellSources/faceToCell/faceToCell.C b/src/meshTools/sets/cellSources/faceToCell/faceToCell.C index 5499aaa963..5966d80fa2 100644 --- a/src/meshTools/sets/cellSources/faceToCell/faceToCell.C +++ b/src/meshTools/sets/cellSources/faceToCell/faceToCell.C @@ -35,6 +35,8 @@ namespace Foam defineTypeNameAndDebug(faceToCell, 0); addToRunTimeSelectionTable(topoSetSource, faceToCell, word); addToRunTimeSelectionTable(topoSetSource, faceToCell, istream); + addToRunTimeSelectionTable(topoSetCellSource, faceToCell, word); + addToRunTimeSelectionTable(topoSetCellSource, faceToCell, istream); } @@ -133,7 +135,7 @@ Foam::faceToCell::faceToCell const faceAction option ) : - topoSetSource(mesh), + topoSetCellSource(mesh), setName_(setName), option_(option) {} @@ -145,9 +147,12 @@ Foam::faceToCell::faceToCell const dictionary& dict ) : - topoSetSource(mesh), - setName_(dict.get("set")), - option_(faceActionNames_.get("option", dict)) + faceToCell + ( + mesh, + dict.get("set"), + faceActionNames_.get("option", dict) + ) {} @@ -157,7 +162,7 @@ Foam::faceToCell::faceToCell Istream& is ) : - topoSetSource(mesh), + topoSetCellSource(mesh), setName_(checkIs(is)), option_(faceActionNames_.read(checkIs(is))) {} diff --git a/src/meshTools/sets/cellSources/faceToCell/faceToCell.H b/src/meshTools/sets/cellSources/faceToCell/faceToCell.H index ced05a8f4e..64e85b3817 100644 --- a/src/meshTools/sets/cellSources/faceToCell/faceToCell.H +++ b/src/meshTools/sets/cellSources/faceToCell/faceToCell.H @@ -25,7 +25,7 @@ Class Foam::faceToCell Description - A topoSetSource to select cells based on usage in a face set. + A topoSetCellSource to select cells based on usage in a face set. \heading Dictionary parameters \table @@ -42,7 +42,7 @@ SourceFiles #ifndef faceToCell_H #define faceToCell_H -#include "topoSetSource.H" +#include "topoSetCellSource.H" #include "Enum.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -56,7 +56,7 @@ namespace Foam class faceToCell : - public topoSetSource + public topoSetCellSource { public: //- Enumeration defining the valid options @@ -118,11 +118,6 @@ public: // Member Functions - virtual sourceType setType() const - { - return CELLSETSOURCE; - } - virtual void applyToSet ( const topoSetSource::setAction action, diff --git a/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C b/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C index 68c81f2267..8079cd72d0 100644 --- a/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C +++ b/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C @@ -34,6 +34,8 @@ namespace Foam defineTypeNameAndDebug(faceZoneToCell, 0); addToRunTimeSelectionTable(topoSetSource, faceZoneToCell, word); addToRunTimeSelectionTable(topoSetSource, faceZoneToCell, istream); + addToRunTimeSelectionTable(topoSetCellSource, faceZoneToCell, word); + addToRunTimeSelectionTable(topoSetCellSource, faceZoneToCell, istream); } @@ -111,7 +113,7 @@ Foam::faceZoneToCell::faceZoneToCell const faceAction option ) : - topoSetSource(mesh), + topoSetCellSource(mesh), selectedZones_(one(), zoneName), option_(option) {} @@ -123,7 +125,7 @@ Foam::faceZoneToCell::faceZoneToCell const dictionary& dict ) : - topoSetSource(mesh), + topoSetCellSource(mesh), selectedZones_(), option_(faceActionNames_.get("option", dict)) { @@ -143,7 +145,7 @@ Foam::faceZoneToCell::faceZoneToCell Istream& is ) : - topoSetSource(mesh), + topoSetCellSource(mesh), selectedZones_(one(), wordRe(checkIs(is))), option_(faceActionNames_.read(checkIs(is))) {} diff --git a/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.H b/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.H index 33f24e706b..e082198271 100644 --- a/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.H +++ b/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.H @@ -25,7 +25,7 @@ Class Foam::faceZoneToCell Description - A topoSetSource to select cells based on side of faceZone. + A topoSetCellSource to select cells based on side of faceZone. \heading Dictionary parameters \table @@ -47,7 +47,7 @@ SourceFiles #ifndef faceZoneToCell_H #define faceZoneToCell_H -#include "topoSetSource.H" +#include "topoSetCellSource.H" #include "wordRes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -61,7 +61,7 @@ namespace Foam class faceZoneToCell : - public topoSetSource + public topoSetCellSource { public: //- Enumeration defining the valid options @@ -120,11 +120,6 @@ public: // Member Functions - virtual topoSetSource::sourceType setType() const - { - return CELLSETSOURCE; - } - virtual void applyToSet ( const topoSetSource::setAction action, diff --git a/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.C b/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.C index 150eeb2ab9..c12bbab2c4 100644 --- a/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.C +++ b/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.C @@ -38,6 +38,22 @@ namespace Foam defineTypeNameAndDebug(fieldToCell, 0); addToRunTimeSelectionTable(topoSetSource, fieldToCell, word); addToRunTimeSelectionTable(topoSetSource, fieldToCell, istream); + addToRunTimeSelectionTable(topoSetCellSource, fieldToCell, word); + addToRunTimeSelectionTable(topoSetCellSource, fieldToCell, istream); + addNamedToRunTimeSelectionTable + ( + topoSetCellSource, + fieldToCell, + word, + field + ); + addNamedToRunTimeSelectionTable + ( + topoSetCellSource, + fieldToCell, + istream, + field + ); } @@ -100,7 +116,7 @@ Foam::fieldToCell::fieldToCell const scalar max ) : - topoSetSource(mesh), + topoSetCellSource(mesh), fieldName_(fieldName), min_(min), max_(max) @@ -113,10 +129,13 @@ Foam::fieldToCell::fieldToCell const dictionary& dict ) : - topoSetSource(mesh), - fieldName_(dict.get("field")), - min_(dict.get("min")), - max_(dict.get("max")) + fieldToCell + ( + mesh, + dict.get("field"), + dict.get("min"), + dict.get("max") + ) {} @@ -126,7 +145,7 @@ Foam::fieldToCell::fieldToCell Istream& is ) : - topoSetSource(mesh), + topoSetCellSource(mesh), fieldName_(checkIs(is)), min_(readScalar(checkIs(is))), max_(readScalar(checkIs(is))) diff --git a/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.H b/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.H index c09e2773c8..6b596f166e 100644 --- a/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.H +++ b/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.H @@ -25,7 +25,7 @@ Class Foam::fieldToCell Description - A topoSetSource to select cells based on field values. + A topoSetCellSource to select cells based on field values. \heading Dictionary parameters \table @@ -43,7 +43,7 @@ SourceFiles #ifndef fieldToCell_H #define fieldToCell_H -#include "topoSetSource.H" +#include "topoSetCellSource.H" #include "scalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -57,7 +57,7 @@ namespace Foam class fieldToCell : - public topoSetSource + public topoSetCellSource { // Private data @@ -115,11 +115,6 @@ public: // Member Functions - virtual sourceType setType() const - { - return CELLSETSOURCE; - } - virtual void applyToSet ( const topoSetSource::setAction action, diff --git a/src/meshTools/sets/cellSources/labelToCell/labelToCell.C b/src/meshTools/sets/cellSources/labelToCell/labelToCell.C index 13fda7b6d9..a314644f5e 100644 --- a/src/meshTools/sets/cellSources/labelToCell/labelToCell.C +++ b/src/meshTools/sets/cellSources/labelToCell/labelToCell.C @@ -34,6 +34,22 @@ namespace Foam defineTypeNameAndDebug(labelToCell, 0); addToRunTimeSelectionTable(topoSetSource, labelToCell, word); addToRunTimeSelectionTable(topoSetSource, labelToCell, istream); + addToRunTimeSelectionTable(topoSetCellSource, labelToCell, word); + addToRunTimeSelectionTable(topoSetCellSource, labelToCell, istream); + addNamedToRunTimeSelectionTable + ( + topoSetCellSource, + labelToCell, + word, + label + ); + addNamedToRunTimeSelectionTable + ( + topoSetCellSource, + labelToCell, + istream, + label + ); } @@ -53,19 +69,29 @@ Foam::labelToCell::labelToCell const labelList& labels ) : - topoSetSource(mesh), + topoSetCellSource(mesh), labels_(labels) {} +Foam::labelToCell::labelToCell +( + const polyMesh& mesh, + labelList&& labels +) +: + topoSetCellSource(mesh), + labels_(std::move(labels)) +{} + + Foam::labelToCell::labelToCell ( const polyMesh& mesh, const dictionary& dict ) : - topoSetSource(mesh), - labels_(dict.get("value")) + labelToCell(mesh, dict.get("value")) {} @@ -75,7 +101,7 @@ Foam::labelToCell::labelToCell Istream& is ) : - topoSetSource(mesh), + topoSetCellSource(mesh), labels_(checkIs(is)) { check(labels_, mesh.nCells()); diff --git a/src/meshTools/sets/cellSources/labelToCell/labelToCell.H b/src/meshTools/sets/cellSources/labelToCell/labelToCell.H index ca9c12e1ff..d9f1c06b3c 100644 --- a/src/meshTools/sets/cellSources/labelToCell/labelToCell.H +++ b/src/meshTools/sets/cellSources/labelToCell/labelToCell.H @@ -25,7 +25,7 @@ Class Foam::labelToCell Description - A topoSetSource to select cells based on explicitly given labels. + A topoSetCellSource to select cells based on explicitly given labels. \heading Dictionary parameters \table @@ -41,7 +41,7 @@ SourceFiles #ifndef labelToCell_H #define labelToCell_H -#include "topoSetSource.H" +#include "topoSetCellSource.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -54,7 +54,7 @@ namespace Foam class labelToCell : - public topoSetSource + public topoSetCellSource { // Private data @@ -73,12 +73,11 @@ public: // Constructors - //- Construct from components - labelToCell - ( - const polyMesh& mesh, - const labelList& labels - ); + //- Construct from components, copying labels + labelToCell(const polyMesh& mesh, const labelList& labels); + + //- Construct from components, moving labels + labelToCell(const polyMesh& mesh, labelList&& labels); //- Construct from dictionary labelToCell(const polyMesh& mesh, const dictionary& dict); @@ -93,11 +92,6 @@ public: // Member Functions - virtual sourceType setType() const - { - return CELLSETSOURCE; - } - virtual void applyToSet ( const topoSetSource::setAction action, diff --git a/src/meshTools/sets/cellSources/nbrToCell/nbrToCell.C b/src/meshTools/sets/cellSources/nbrToCell/nbrToCell.C index e4c55b966b..7201163abc 100644 --- a/src/meshTools/sets/cellSources/nbrToCell/nbrToCell.C +++ b/src/meshTools/sets/cellSources/nbrToCell/nbrToCell.C @@ -34,6 +34,22 @@ namespace Foam defineTypeNameAndDebug(nbrToCell, 0); addToRunTimeSelectionTable(topoSetSource, nbrToCell, word); addToRunTimeSelectionTable(topoSetSource, nbrToCell, istream); + addToRunTimeSelectionTable(topoSetCellSource, nbrToCell, word); + addToRunTimeSelectionTable(topoSetCellSource, nbrToCell, istream); + addNamedToRunTimeSelectionTable + ( + topoSetCellSource, + nbrToCell, + word, + nbr + ); + addNamedToRunTimeSelectionTable + ( + topoSetCellSource, + nbrToCell, + istream, + nbr + ); } @@ -101,7 +117,7 @@ Foam::nbrToCell::nbrToCell const label minNbrs ) : - topoSetSource(mesh), + topoSetCellSource(mesh), minNbrs_(minNbrs) {} @@ -112,8 +128,7 @@ Foam::nbrToCell::nbrToCell const dictionary& dict ) : - topoSetSource(mesh), - minNbrs_(dict.get