diff --git a/src/meshTools/Make/files b/src/meshTools/Make/files index fdeaa2eab..e2c9c1d2c 100644 --- a/src/meshTools/Make/files +++ b/src/meshTools/Make/files @@ -159,6 +159,8 @@ $(faceSources)/boundaryToFace/boundaryToFace.C $(faceSources)/zoneToFace/zoneToFace.C $(faceSources)/boxToFace/boxToFace.C $(faceSources)/regionToFace/regionToFace.C +$(faceSources)/cylinderToFace/cylinderToFace.C +$(faceSources)/cylinderAnnulusToFace/cylinderAnnulusToFace.C pointSources = sets/pointSources $(pointSources)/labelToPoint/labelToPoint.C diff --git a/src/meshTools/sets/cellSources/boxToCell/boxToCell.C b/src/meshTools/sets/cellSources/boxToCell/boxToCell.C index bd01674c0..60a7b7436 100644 --- a/src/meshTools/sets/cellSources/boxToCell/boxToCell.C +++ b/src/meshTools/sets/cellSources/boxToCell/boxToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,20 +25,15 @@ License #include "boxToCell.H" #include "polyMesh.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(boxToCell, 0); - -addToRunTimeSelectionTable(topoSetSource, boxToCell, word); - -addToRunTimeSelectionTable(topoSetSource, boxToCell, istream); - + defineTypeNameAndDebug(boxToCell, 0); + addToRunTimeSelectionTable(topoSetSource, boxToCell, word); + addToRunTimeSelectionTable(topoSetSource, boxToCell, istream); } @@ -72,7 +67,6 @@ void Foam::boxToCell::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::boxToCell::boxToCell ( const polyMesh& mesh, @@ -84,7 +78,6 @@ Foam::boxToCell::boxToCell {} -// Construct from dictionary Foam::boxToCell::boxToCell ( const polyMesh& mesh, @@ -101,7 +94,6 @@ Foam::boxToCell::boxToCell {} -// Construct from Istream Foam::boxToCell::boxToCell ( const polyMesh& mesh, @@ -112,6 +104,7 @@ Foam::boxToCell::boxToCell bbs_(1, treeBoundBox(checkIs(is))) {} + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::boxToCell::~boxToCell() diff --git a/src/meshTools/sets/cellSources/boxToCell/boxToCell.H b/src/meshTools/sets/cellSources/boxToCell/boxToCell.H index 1f100c77f..24a8b4827 100644 --- a/src/meshTools/sets/cellSources/boxToCell/boxToCell.H +++ b/src/meshTools/sets/cellSources/boxToCell/boxToCell.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,13 +51,11 @@ class boxToCell : public topoSetSource { - // Private data //- Add usage string static addToUsageTable usage_; - //- Bounding box. treeBoundBoxList bbs_; @@ -112,7 +110,6 @@ public: const topoSetSource::setAction action, topoSet& ) const; - }; diff --git a/src/meshTools/sets/cellSources/cellToCell/cellToCell.C b/src/meshTools/sets/cellSources/cellToCell/cellToCell.C index f7394cf43..4644f755a 100644 --- a/src/meshTools/sets/cellSources/cellToCell/cellToCell.C +++ b/src/meshTools/sets/cellSources/cellToCell/cellToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,20 +26,15 @@ License #include "cellToCell.H" #include "polyMesh.H" #include "cellSet.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(cellToCell, 0); - -addToRunTimeSelectionTable(topoSetSource, cellToCell, word); - -addToRunTimeSelectionTable(topoSetSource, cellToCell, istream); - + defineTypeNameAndDebug(cellToCell, 0); + addToRunTimeSelectionTable(topoSetSource, cellToCell, word); + addToRunTimeSelectionTable(topoSetSource, cellToCell, istream); } @@ -53,7 +48,6 @@ Foam::topoSetSource::addToUsageTable Foam::cellToCell::usage_ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::cellToCell::cellToCell ( const polyMesh& mesh, @@ -65,7 +59,6 @@ Foam::cellToCell::cellToCell {} -// Construct from dictionary Foam::cellToCell::cellToCell ( const polyMesh& mesh, @@ -77,7 +70,6 @@ Foam::cellToCell::cellToCell {} -// Construct from Istream Foam::cellToCell::cellToCell ( const polyMesh& mesh, diff --git a/src/meshTools/sets/cellSources/cylinderAnnulusToCell/cylinderAnnulusToCell.C b/src/meshTools/sets/cellSources/cylinderAnnulusToCell/cylinderAnnulusToCell.C index 06d89f6e3..a566caf65 100644 --- a/src/meshTools/sets/cellSources/cylinderAnnulusToCell/cylinderAnnulusToCell.C +++ b/src/meshTools/sets/cellSources/cylinderAnnulusToCell/cylinderAnnulusToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -107,7 +107,6 @@ Foam::cylinderAnnulusToCell::cylinderAnnulusToCell {} -// Construct from Istream Foam::cylinderAnnulusToCell::cylinderAnnulusToCell ( const polyMesh& mesh, diff --git a/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C b/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C index 787c73da6..6094b9c02 100644 --- a/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C +++ b/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -102,7 +102,6 @@ Foam::cylinderToCell::cylinderToCell {} -// Construct from Istream Foam::cylinderToCell::cylinderToCell ( const polyMesh& mesh, diff --git a/src/meshTools/sets/cellSources/faceToCell/faceToCell.C b/src/meshTools/sets/cellSources/faceToCell/faceToCell.C index 4fdb93b1b..b79a085e6 100644 --- a/src/meshTools/sets/cellSources/faceToCell/faceToCell.C +++ b/src/meshTools/sets/cellSources/faceToCell/faceToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,6 @@ License #include "faceToCell.H" #include "polyMesh.H" #include "faceSet.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -152,7 +151,6 @@ void Foam::faceToCell::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::faceToCell::faceToCell ( const polyMesh& mesh, @@ -166,7 +164,6 @@ Foam::faceToCell::faceToCell {} -// Construct from dictionary Foam::faceToCell::faceToCell ( const polyMesh& mesh, @@ -179,7 +176,6 @@ Foam::faceToCell::faceToCell {} -// Construct from Istream Foam::faceToCell::faceToCell ( const polyMesh& mesh, diff --git a/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C b/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C index 3f5d7ece3..9a35509d0 100644 --- a/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C +++ b/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,6 @@ License #include "faceZoneToCell.H" #include "polyMesh.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -109,7 +108,6 @@ void Foam::faceZoneToCell::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::faceZoneToCell::faceZoneToCell ( const polyMesh& mesh, @@ -123,7 +121,6 @@ Foam::faceZoneToCell::faceZoneToCell {} -// Construct from dictionary Foam::faceZoneToCell::faceZoneToCell ( const polyMesh& mesh, @@ -136,7 +133,6 @@ Foam::faceZoneToCell::faceZoneToCell {} -// Construct from Istream Foam::faceZoneToCell::faceZoneToCell ( const polyMesh& mesh, diff --git a/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.C b/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.C index c9791ccd1..2f5d7e0e6 100644 --- a/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.C +++ b/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.C @@ -93,7 +93,6 @@ void Foam::fieldToCell::applyToSet // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::fieldToCell::fieldToCell ( const polyMesh& mesh, @@ -109,7 +108,6 @@ Foam::fieldToCell::fieldToCell {} -// Construct from dictionary Foam::fieldToCell::fieldToCell ( const polyMesh& mesh, @@ -123,7 +121,6 @@ Foam::fieldToCell::fieldToCell {} -// Construct from Istream Foam::fieldToCell::fieldToCell ( const polyMesh& mesh, @@ -151,34 +148,6 @@ void Foam::fieldToCell::applyToSet topoSet& set ) const { - -// // Construct temporary fvMesh from polyMesh -// fvMesh fMesh -// ( -// mesh(), // IOobject -// mesh().points(), -// mesh().faces(), -// mesh().cells() -// ); -// -// const polyBoundaryMesh& patches = mesh().boundaryMesh(); -// -// List newPatches(patches.size()); -// forAll(patches, patchi) -// { -// const polyPatch& pp = patches[patchi]; -// -// newPatches[patchi] = -// patches[patchi].clone -// ( -// fMesh.boundaryMesh(), -// patchi, -// pp.size(), -// pp.start() -// ).ptr(); -// } -// fMesh.addFvPatches(newPatches); - // Try to load field IOobject fieldObject ( diff --git a/src/meshTools/sets/cellSources/labelToCell/labelToCell.C b/src/meshTools/sets/cellSources/labelToCell/labelToCell.C index f7b350046..2f71548cd 100644 --- a/src/meshTools/sets/cellSources/labelToCell/labelToCell.C +++ b/src/meshTools/sets/cellSources/labelToCell/labelToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,20 +25,15 @@ License #include "labelToCell.H" #include "polyMesh.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(labelToCell, 0); - -addToRunTimeSelectionTable(topoSetSource, labelToCell, word); - -addToRunTimeSelectionTable(topoSetSource, labelToCell, istream); - + defineTypeNameAndDebug(labelToCell, 0); + addToRunTimeSelectionTable(topoSetSource, labelToCell, word); + addToRunTimeSelectionTable(topoSetSource, labelToCell, istream); } @@ -63,7 +58,6 @@ void Foam::labelToCell::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::labelToCell::labelToCell ( const polyMesh& mesh, @@ -75,7 +69,6 @@ Foam::labelToCell::labelToCell {} -// Construct from dictionary Foam::labelToCell::labelToCell ( const polyMesh& mesh, @@ -87,7 +80,6 @@ Foam::labelToCell::labelToCell {} -// Construct from Istream Foam::labelToCell::labelToCell ( const polyMesh& mesh, diff --git a/src/meshTools/sets/cellSources/nbrToCell/nbrToCell.C b/src/meshTools/sets/cellSources/nbrToCell/nbrToCell.C index cb52cb01d..85f5f494b 100644 --- a/src/meshTools/sets/cellSources/nbrToCell/nbrToCell.C +++ b/src/meshTools/sets/cellSources/nbrToCell/nbrToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,20 +25,15 @@ License #include "nbrToCell.H" #include "polyMesh.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(nbrToCell, 0); - -addToRunTimeSelectionTable(topoSetSource, nbrToCell, word); - -addToRunTimeSelectionTable(topoSetSource, nbrToCell, istream); - + defineTypeNameAndDebug(nbrToCell, 0); + addToRunTimeSelectionTable(topoSetSource, nbrToCell, word); + addToRunTimeSelectionTable(topoSetSource, nbrToCell, istream); } @@ -104,7 +99,6 @@ void Foam::nbrToCell::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::nbrToCell::nbrToCell ( const polyMesh& mesh, @@ -116,7 +110,6 @@ Foam::nbrToCell::nbrToCell {} -// Construct from dictionary Foam::nbrToCell::nbrToCell ( const polyMesh& mesh, @@ -128,7 +121,6 @@ Foam::nbrToCell::nbrToCell {} -// Construct from Istream Foam::nbrToCell::nbrToCell ( const polyMesh& mesh, diff --git a/src/meshTools/sets/cellSources/nearestToCell/nearestToCell.C b/src/meshTools/sets/cellSources/nearestToCell/nearestToCell.C index a7bba62b1..04c7a73ac 100644 --- a/src/meshTools/sets/cellSources/nearestToCell/nearestToCell.C +++ b/src/meshTools/sets/cellSources/nearestToCell/nearestToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,13 +31,9 @@ License namespace Foam { - -defineTypeNameAndDebug(nearestToCell, 0); - -addToRunTimeSelectionTable(topoSetSource, nearestToCell, word); - -addToRunTimeSelectionTable(topoSetSource, nearestToCell, istream); - + defineTypeNameAndDebug(nearestToCell, 0); + addToRunTimeSelectionTable(topoSetSource, nearestToCell, word); + addToRunTimeSelectionTable(topoSetSource, nearestToCell, istream); } @@ -62,7 +58,6 @@ void Foam::nearestToCell::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::nearestToCell::nearestToCell ( const polyMesh& mesh, @@ -74,7 +69,6 @@ Foam::nearestToCell::nearestToCell {} -// Construct from dictionary Foam::nearestToCell::nearestToCell ( const polyMesh& mesh, @@ -86,7 +80,6 @@ Foam::nearestToCell::nearestToCell {} -// Construct from Istream Foam::nearestToCell::nearestToCell ( const polyMesh& mesh, diff --git a/src/meshTools/sets/cellSources/pointToCell/pointToCell.C b/src/meshTools/sets/cellSources/pointToCell/pointToCell.C index 467e894f8..acf292e70 100644 --- a/src/meshTools/sets/cellSources/pointToCell/pointToCell.C +++ b/src/meshTools/sets/cellSources/pointToCell/pointToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,6 @@ License #include "pointToCell.H" #include "polyMesh.H" #include "pointSet.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -109,7 +108,6 @@ void Foam::pointToCell::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::pointToCell::pointToCell ( const polyMesh& mesh, @@ -123,7 +121,6 @@ Foam::pointToCell::pointToCell {} -// Construct from dictionary Foam::pointToCell::pointToCell ( const polyMesh& mesh, @@ -136,7 +133,6 @@ Foam::pointToCell::pointToCell {} -// Construct from Istream Foam::pointToCell::pointToCell ( const polyMesh& mesh, diff --git a/src/meshTools/sets/cellSources/regionToCell/regionToCell.C b/src/meshTools/sets/cellSources/regionToCell/regionToCell.C index 22e3c1713..723c2b6a9 100644 --- a/src/meshTools/sets/cellSources/regionToCell/regionToCell.C +++ b/src/meshTools/sets/cellSources/regionToCell/regionToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,13 +34,9 @@ License namespace Foam { - -defineTypeNameAndDebug(regionToCell, 0); - -addToRunTimeSelectionTable(topoSetSource, regionToCell, word); - -addToRunTimeSelectionTable(topoSetSource, regionToCell, istream); - + defineTypeNameAndDebug(regionToCell, 0); + addToRunTimeSelectionTable(topoSetSource, regionToCell, word); + addToRunTimeSelectionTable(topoSetSource, regionToCell, istream); } @@ -385,7 +381,6 @@ void Foam::regionToCell::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::regionToCell::regionToCell ( const polyMesh& mesh, @@ -401,7 +396,6 @@ Foam::regionToCell::regionToCell {} -// Construct from dictionary Foam::regionToCell::regionToCell ( const polyMesh& mesh, @@ -420,7 +414,6 @@ Foam::regionToCell::regionToCell {} -// Construct from Istream Foam::regionToCell::regionToCell ( const polyMesh& mesh, diff --git a/src/meshTools/sets/cellSources/rotatedBoxToCell/rotatedBoxToCell.C b/src/meshTools/sets/cellSources/rotatedBoxToCell/rotatedBoxToCell.C index 0e5c35bf5..43f7cbee7 100644 --- a/src/meshTools/sets/cellSources/rotatedBoxToCell/rotatedBoxToCell.C +++ b/src/meshTools/sets/cellSources/rotatedBoxToCell/rotatedBoxToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,20 +26,15 @@ License #include "rotatedBoxToCell.H" #include "polyMesh.H" #include "cellModeller.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(rotatedBoxToCell, 0); - -addToRunTimeSelectionTable(topoSetSource, rotatedBoxToCell, word); - -addToRunTimeSelectionTable(topoSetSource, rotatedBoxToCell, istream); - + defineTypeNameAndDebug(rotatedBoxToCell, 0); + addToRunTimeSelectionTable(topoSetSource, rotatedBoxToCell, word); + addToRunTimeSelectionTable(topoSetSource, rotatedBoxToCell, istream); } @@ -117,7 +112,6 @@ void Foam::rotatedBoxToCell::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::rotatedBoxToCell::rotatedBoxToCell ( const polyMesh& mesh, @@ -135,7 +129,6 @@ Foam::rotatedBoxToCell::rotatedBoxToCell {} -// Construct from dictionary Foam::rotatedBoxToCell::rotatedBoxToCell ( const polyMesh& mesh, @@ -150,7 +143,6 @@ Foam::rotatedBoxToCell::rotatedBoxToCell {} -// Construct from Istream Foam::rotatedBoxToCell::rotatedBoxToCell(const polyMesh& mesh, Istream& is) : topoSetSource(mesh), diff --git a/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.C b/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.C index a6c033a84..bcc00ea80 100644 --- a/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.C +++ b/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,20 +28,15 @@ License #include "unitConversion.H" #include "hexMatcher.H" #include "cellFeatures.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(shapeToCell, 0); - -addToRunTimeSelectionTable(topoSetSource, shapeToCell, word); - -addToRunTimeSelectionTable(topoSetSource, shapeToCell, istream); - + defineTypeNameAndDebug(shapeToCell, 0); + addToRunTimeSelectionTable(topoSetSource, shapeToCell, word); + addToRunTimeSelectionTable(topoSetSource, shapeToCell, istream); } @@ -93,7 +88,6 @@ void Foam::shapeToCell::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::shapeToCell::shapeToCell ( const polyMesh& mesh, @@ -111,7 +105,6 @@ Foam::shapeToCell::shapeToCell } -// Construct from dictionary Foam::shapeToCell::shapeToCell ( const polyMesh& mesh, @@ -129,7 +122,6 @@ Foam::shapeToCell::shapeToCell } -// Construct from Istream Foam::shapeToCell::shapeToCell ( const polyMesh& mesh, diff --git a/src/meshTools/sets/cellSources/sphereToCell/sphereToCell.C b/src/meshTools/sets/cellSources/sphereToCell/sphereToCell.C index d3c7cfc3a..cd356da90 100644 --- a/src/meshTools/sets/cellSources/sphereToCell/sphereToCell.C +++ b/src/meshTools/sets/cellSources/sphereToCell/sphereToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -91,7 +91,6 @@ Foam::sphereToCell::sphereToCell {} -// Construct from Istream Foam::sphereToCell::sphereToCell ( const polyMesh& mesh, diff --git a/src/meshTools/sets/cellSources/targetVolumeToCell/targetVolumeToCell.C b/src/meshTools/sets/cellSources/targetVolumeToCell/targetVolumeToCell.C index 5a389bf32..80758048d 100644 --- a/src/meshTools/sets/cellSources/targetVolumeToCell/targetVolumeToCell.C +++ b/src/meshTools/sets/cellSources/targetVolumeToCell/targetVolumeToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,20 +28,15 @@ License #include "globalMeshData.H" #include "plane.H" #include "cellSet.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(targetVolumeToCell, 0); - -addToRunTimeSelectionTable(topoSetSource, targetVolumeToCell, word); - -addToRunTimeSelectionTable(topoSetSource, targetVolumeToCell, istream); - + defineTypeNameAndDebug(targetVolumeToCell, 0); + addToRunTimeSelectionTable(topoSetSource, targetVolumeToCell, word); + addToRunTimeSelectionTable(topoSetSource, targetVolumeToCell, istream); } @@ -268,7 +263,6 @@ void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::targetVolumeToCell::targetVolumeToCell ( const polyMesh& mesh, @@ -282,7 +276,6 @@ Foam::targetVolumeToCell::targetVolumeToCell {} -// Construct from dictionary Foam::targetVolumeToCell::targetVolumeToCell ( const polyMesh& mesh, @@ -296,7 +289,6 @@ Foam::targetVolumeToCell::targetVolumeToCell {} -// Construct from Istream Foam::targetVolumeToCell::targetVolumeToCell ( const polyMesh& mesh, diff --git a/src/meshTools/sets/cellSources/zoneToCell/zoneToCell.C b/src/meshTools/sets/cellSources/zoneToCell/zoneToCell.C index 56ed36a17..612da1e91 100644 --- a/src/meshTools/sets/cellSources/zoneToCell/zoneToCell.C +++ b/src/meshTools/sets/cellSources/zoneToCell/zoneToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,20 +25,15 @@ License #include "zoneToCell.H" #include "polyMesh.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(zoneToCell, 0); - -addToRunTimeSelectionTable(topoSetSource, zoneToCell, word); - -addToRunTimeSelectionTable(topoSetSource, zoneToCell, istream); - + defineTypeNameAndDebug(zoneToCell, 0); + addToRunTimeSelectionTable(topoSetSource, zoneToCell, word); + addToRunTimeSelectionTable(topoSetSource, zoneToCell, istream); } @@ -92,7 +87,6 @@ void Foam::zoneToCell::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::zoneToCell::zoneToCell ( const polyMesh& mesh, @@ -104,7 +98,6 @@ Foam::zoneToCell::zoneToCell {} -// Construct from dictionary Foam::zoneToCell::zoneToCell ( const polyMesh& mesh, @@ -116,7 +109,6 @@ Foam::zoneToCell::zoneToCell {} -// Construct from Istream Foam::zoneToCell::zoneToCell ( const polyMesh& mesh, diff --git a/src/meshTools/sets/cellZoneSources/setToCellZone/setToCellZone.C b/src/meshTools/sets/cellZoneSources/setToCellZone/setToCellZone.C index afd7f7033..db01c7816 100644 --- a/src/meshTools/sets/cellZoneSources/setToCellZone/setToCellZone.C +++ b/src/meshTools/sets/cellZoneSources/setToCellZone/setToCellZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,20 +26,15 @@ License #include "setToCellZone.H" #include "polyMesh.H" #include "cellZoneSet.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(setToCellZone, 0); - -addToRunTimeSelectionTable(topoSetSource, setToCellZone, word); - -addToRunTimeSelectionTable(topoSetSource, setToCellZone, istream); - + defineTypeNameAndDebug(setToCellZone, 0); + addToRunTimeSelectionTable(topoSetSource, setToCellZone, word); + addToRunTimeSelectionTable(topoSetSource, setToCellZone, istream); } @@ -53,7 +48,6 @@ Foam::topoSetSource::addToUsageTable Foam::setToCellZone::usage_ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::setToCellZone::setToCellZone ( const polyMesh& mesh, @@ -65,7 +59,6 @@ Foam::setToCellZone::setToCellZone {} -// Construct from dictionary Foam::setToCellZone::setToCellZone ( const polyMesh& mesh, @@ -77,7 +70,6 @@ Foam::setToCellZone::setToCellZone {} -// Construct from Istream Foam::setToCellZone::setToCellZone ( const polyMesh& mesh, diff --git a/src/meshTools/sets/faceSources/boundaryToFace/boundaryToFace.C b/src/meshTools/sets/faceSources/boundaryToFace/boundaryToFace.C index 7ae3ab1a6..a1085fdbf 100644 --- a/src/meshTools/sets/faceSources/boundaryToFace/boundaryToFace.C +++ b/src/meshTools/sets/faceSources/boundaryToFace/boundaryToFace.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,20 +25,15 @@ License #include "boundaryToFace.H" #include "polyMesh.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(boundaryToFace, 0); - -addToRunTimeSelectionTable(topoSetSource, boundaryToFace, word); - -addToRunTimeSelectionTable(topoSetSource, boundaryToFace, istream); - + defineTypeNameAndDebug(boundaryToFace, 0); + addToRunTimeSelectionTable(topoSetSource, boundaryToFace, word); + addToRunTimeSelectionTable(topoSetSource, boundaryToFace, istream); } @@ -68,21 +63,18 @@ void Foam::boundaryToFace::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::boundaryToFace::boundaryToFace(const polyMesh& mesh) : topoSetSource(mesh) {} -// Construct from dictionary Foam::boundaryToFace::boundaryToFace(const polyMesh& mesh, const dictionary&) : topoSetSource(mesh) {} -// Construct from Istream Foam::boundaryToFace::boundaryToFace ( const polyMesh& mesh, diff --git a/src/meshTools/sets/faceSources/boxToFace/boxToFace.C b/src/meshTools/sets/faceSources/boxToFace/boxToFace.C index 5ad4d8e5e..c15b2963a 100644 --- a/src/meshTools/sets/faceSources/boxToFace/boxToFace.C +++ b/src/meshTools/sets/faceSources/boxToFace/boxToFace.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,20 +25,15 @@ License #include "boxToFace.H" #include "polyMesh.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(boxToFace, 0); - -addToRunTimeSelectionTable(topoSetSource, boxToFace, word); - -addToRunTimeSelectionTable(topoSetSource, boxToFace, istream); - + defineTypeNameAndDebug(boxToFace, 0); + addToRunTimeSelectionTable(topoSetSource, boxToFace, word); + addToRunTimeSelectionTable(topoSetSource, boxToFace, istream); } @@ -72,7 +67,6 @@ void Foam::boxToFace::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::boxToFace::boxToFace ( const polyMesh& mesh, @@ -84,7 +78,6 @@ Foam::boxToFace::boxToFace {} -// Construct from dictionary Foam::boxToFace::boxToFace ( const polyMesh& mesh, @@ -101,7 +94,6 @@ Foam::boxToFace::boxToFace {} -// Construct from Istream Foam::boxToFace::boxToFace ( const polyMesh& mesh, diff --git a/src/meshTools/sets/faceSources/boxToFace/boxToFace.H b/src/meshTools/sets/faceSources/boxToFace/boxToFace.H index f3b4d4707..2cde01e1f 100644 --- a/src/meshTools/sets/faceSources/boxToFace/boxToFace.H +++ b/src/meshTools/sets/faceSources/boxToFace/boxToFace.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,7 +51,6 @@ class boxToFace : public topoSetSource { - // Private data //- Add usage string @@ -111,7 +110,6 @@ public: const topoSetSource::setAction action, topoSet& ) const; - }; diff --git a/src/meshTools/sets/faceSources/cellToFace/cellToFace.C b/src/meshTools/sets/faceSources/cellToFace/cellToFace.C index 64e04fe75..a7812aba7 100644 --- a/src/meshTools/sets/faceSources/cellToFace/cellToFace.C +++ b/src/meshTools/sets/faceSources/cellToFace/cellToFace.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -154,7 +154,6 @@ void Foam::cellToFace::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from componenta Foam::cellToFace::cellToFace ( const polyMesh& mesh, @@ -168,7 +167,6 @@ Foam::cellToFace::cellToFace {} -// Construct from dictionary Foam::cellToFace::cellToFace ( const polyMesh& mesh, @@ -181,7 +179,6 @@ Foam::cellToFace::cellToFace {} -// Construct from Istream Foam::cellToFace::cellToFace ( const polyMesh& mesh, diff --git a/src/meshTools/sets/faceSources/cylinderAnnulusToFace/cylinderAnnulusToFace.C b/src/meshTools/sets/faceSources/cylinderAnnulusToFace/cylinderAnnulusToFace.C new file mode 100644 index 000000000..0dbbe7c9f --- /dev/null +++ b/src/meshTools/sets/faceSources/cylinderAnnulusToFace/cylinderAnnulusToFace.C @@ -0,0 +1,160 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2017 OpenFOAM Foundation + \\/ 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 "cylinderAnnulusToFace.H" +#include "polyMesh.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(cylinderAnnulusToFace, 0); + addToRunTimeSelectionTable(topoSetSource, cylinderAnnulusToFace, word); + addToRunTimeSelectionTable(topoSetSource, cylinderAnnulusToFace, istream); +} + + +Foam::topoSetSource::addToUsageTable Foam::cylinderAnnulusToFace::usage_ +( + cylinderAnnulusToFace::typeName, + "\n Usage: cylinderAnnulusToFace (p1X p1Y p1Z) (p2X p2Y p2Z)" + " outerRadius innerRadius\n\n" + " Select all faces with face centre within bounding cylinder annulus\n\n" +); + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::cylinderAnnulusToFace::combine(topoSet& set, const bool add) const +{ + const vector axis = p2_ - p1_; + const scalar orad2 = sqr(outerRadius_); + const scalar irad2 = sqr(innerRadius_); + const scalar magAxis2 = magSqr(axis); + + const pointField& ctrs = mesh_.faceCentres(); + + forAll(ctrs, facei) + { + vector d = ctrs[facei] - p1_; + scalar magD = d & axis; + + if ((magD > 0) && (magD < magAxis2)) + { + scalar d2 = (d & d) - sqr(magD)/magAxis2; + if ((d2 < orad2) && (d2 > irad2)) + { + addOrDelete(set, facei, add); + } + } + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::cylinderAnnulusToFace::cylinderAnnulusToFace +( + const polyMesh& mesh, + const vector& p1, + const vector& p2, + const scalar outerRadius, + const scalar innerRadius +) +: + topoSetSource(mesh), + p1_(p1), + p2_(p2), + outerRadius_(outerRadius), + innerRadius_(innerRadius) +{} + + +Foam::cylinderAnnulusToFace::cylinderAnnulusToFace +( + const polyMesh& mesh, + const dictionary& dict +) +: + topoSetSource(mesh), + p1_(dict.lookup("p1")), + p2_(dict.lookup("p2")), + outerRadius_(readScalar(dict.lookup("outerRadius"))), + innerRadius_(readScalar(dict.lookup("innerRadius"))) +{} + + +Foam::cylinderAnnulusToFace::cylinderAnnulusToFace +( + const polyMesh& mesh, + Istream& is +) +: + topoSetSource(mesh), + p1_(checkIs(is)), + p2_(checkIs(is)), + outerRadius_(readScalar(checkIs(is))), + innerRadius_(readScalar(checkIs(is))) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::cylinderAnnulusToFace::~cylinderAnnulusToFace() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::cylinderAnnulusToFace::applyToSet +( + const topoSetSource::setAction action, + topoSet& set +) const +{ + if ((action == topoSetSource::NEW) || (action == topoSetSource::ADD)) + { + Info<< " Adding faces with centre within cylinder annulus," + << " with p1 = " + << p1_ << ", p2 = " << p2_ << " and outer radius = " << outerRadius_ + << " and inner radius = " << innerRadius_ + << endl; + + combine(set, true); + } + else if (action == topoSetSource::DELETE) + { + Info<< " Removing faces with centre within cylinder, with p1 = " + << p1_ << ", p2 = " << p2_ << " and outer radius = " << outerRadius_ + << " and inner radius " << innerRadius_ + << endl; + + combine(set, false); + } +} + + +// ************************************************************************* // diff --git a/src/meshTools/sets/faceSources/cylinderAnnulusToFace/cylinderAnnulusToFace.H b/src/meshTools/sets/faceSources/cylinderAnnulusToFace/cylinderAnnulusToFace.H new file mode 100644 index 000000000..3149a6042 --- /dev/null +++ b/src/meshTools/sets/faceSources/cylinderAnnulusToFace/cylinderAnnulusToFace.H @@ -0,0 +1,137 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2017 OpenFOAM Foundation + \\/ 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 . + +Class + Foam::cylinderAnnulusToFace + +Description + A topoSetSource to select faces based on face centres inside a + cylinder annulus. + +SourceFiles + cylinderAnnulusToFace.C + +\*---------------------------------------------------------------------------*/ + +#ifndef cylinderAnnulusToFace_H +#define cylinderAnnulusToFace_H + +#include "topoSetSource.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class cylinderAnnulusToFace Declaration +\*---------------------------------------------------------------------------*/ + +class cylinderAnnulusToFace +: + public topoSetSource +{ + + // Private data + + //- Add usage string + static addToUsageTable usage_; + + //- First point on cylinder axis + vector p1_; + + //- Second point on cylinder axis + vector p2_; + + //- Outer Radius + scalar outerRadius_; + + //- Inner Radius + scalar innerRadius_; + + + // Private Member Functions + + void combine(topoSet& set, const bool add) const; + + +public: + + //- Runtime type information + TypeName("cylinderAnnulusToFace"); + + + // Constructors + + //- Construct from components + cylinderAnnulusToFace + ( + const polyMesh& mesh, + const vector& p1, + const vector& p2, + const scalar outerRadius, + const scalar innerRadius + ); + + //- Construct from dictionary + cylinderAnnulusToFace + ( + const polyMesh& mesh, + const dictionary& dict + ); + + //- Construct from Istream + cylinderAnnulusToFace + ( + const polyMesh& mesh, + Istream& + ); + + + // Destructor + virtual ~cylinderAnnulusToFace(); + + // Member Functions + + virtual sourceType setType() const + { + return CELLSETSOURCE; + } + + virtual void applyToSet + ( + const topoSetSource::setAction action, + topoSet& + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/meshTools/sets/faceSources/cylinderToFace/cylinderToFace.C b/src/meshTools/sets/faceSources/cylinderToFace/cylinderToFace.C new file mode 100644 index 000000000..a360e4f92 --- /dev/null +++ b/src/meshTools/sets/faceSources/cylinderToFace/cylinderToFace.C @@ -0,0 +1,149 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2017 OpenFOAM Foundation + \\/ 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 "cylinderToFace.H" +#include "polyMesh.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(cylinderToFace, 0); + addToRunTimeSelectionTable(topoSetSource, cylinderToFace, word); + addToRunTimeSelectionTable(topoSetSource, cylinderToFace, istream); +} + + +Foam::topoSetSource::addToUsageTable Foam::cylinderToFace::usage_ +( + cylinderToFace::typeName, + "\n Usage: cylinderToFace (p1X p1Y p1Z) (p2X p2Y p2Z) radius\n\n" + " Select all faces with face centre within bounding cylinder\n\n" +); + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::cylinderToFace::combine(topoSet& set, const bool add) const +{ + const vector axis = p2_ - p1_; + const scalar rad2 = sqr(radius_); + const scalar magAxis2 = magSqr(axis); + + const pointField& ctrs = mesh_.faceCentres(); + + forAll(ctrs, facei) + { + vector d = ctrs[facei] - p1_; + scalar magD = d & axis; + + if ((magD > 0) && (magD < magAxis2)) + { + scalar d2 = (d & d) - sqr(magD)/magAxis2; + if (d2 < rad2) + { + addOrDelete(set, facei, add); + } + } + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::cylinderToFace::cylinderToFace +( + const polyMesh& mesh, + const vector& p1, + const vector& p2, + const scalar radius +) +: + topoSetSource(mesh), + p1_(p1), + p2_(p2), + radius_(radius) +{} + + +Foam::cylinderToFace::cylinderToFace +( + const polyMesh& mesh, + const dictionary& dict +) +: + topoSetSource(mesh), + p1_(dict.lookup("p1")), + p2_(dict.lookup("p2")), + radius_(readScalar(dict.lookup("radius"))) +{} + + +Foam::cylinderToFace::cylinderToFace +( + const polyMesh& mesh, + Istream& is +) +: + topoSetSource(mesh), + p1_(checkIs(is)), + p2_(checkIs(is)), + radius_(readScalar(checkIs(is))) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::cylinderToFace::~cylinderToFace() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::cylinderToFace::applyToSet +( + const topoSetSource::setAction action, + topoSet& set +) const +{ + if ((action == topoSetSource::NEW) || (action == topoSetSource::ADD)) + { + Info<< " Adding faces with centre within cylinder, with p1 = " + << p1_ << ", p2 = " << p2_ << " and radius = " << radius_ << endl; + + combine(set, true); + } + else if (action == topoSetSource::DELETE) + { + Info<< " Removing faces with centre within cylinder, with p1 = " + << p1_ << ", p2 = " << p2_ << " and radius = " << radius_ << endl; + + combine(set, false); + } +} + + +// ************************************************************************* // diff --git a/src/meshTools/sets/faceSources/cylinderToFace/cylinderToFace.H b/src/meshTools/sets/faceSources/cylinderToFace/cylinderToFace.H new file mode 100644 index 000000000..b51083aeb --- /dev/null +++ b/src/meshTools/sets/faceSources/cylinderToFace/cylinderToFace.H @@ -0,0 +1,133 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2017 OpenFOAM Foundation + \\/ 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 . + +Class + Foam::cylinderToFace + +Description + A topoSetSource to select faces based on face centres inside a cylinder. + +SourceFiles + cylinderToFace.C + +\*---------------------------------------------------------------------------*/ + +#ifndef cylinderToFace_H +#define cylinderToFace_H + +#include "topoSetSource.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class cylinderToFace Declaration +\*---------------------------------------------------------------------------*/ + +class cylinderToFace +: + public topoSetSource +{ + + // Private data + + //- Add usage string + static addToUsageTable usage_; + + //- First point on cylinder axis + vector p1_; + + //- Second point on cylinder axis + vector p2_; + + //- Radius + scalar radius_; + + + // Private Member Functions + + void combine(topoSet& set, const bool add) const; + + +public: + + //- Runtime type information + TypeName("cylinderToFace"); + + + // Constructors + + //- Construct from components + cylinderToFace + ( + const polyMesh& mesh, + const vector& p1, + const vector& p2, + const scalar radius + ); + + //- Construct from dictionary + cylinderToFace + ( + const polyMesh& mesh, + const dictionary& dict + ); + + //- Construct from Istream + cylinderToFace + ( + const polyMesh& mesh, + Istream& + ); + + + //- Destructor + virtual ~cylinderToFace(); + + + // Member Functions + + virtual sourceType setType() const + { + return CELLSETSOURCE; + } + + virtual void applyToSet + ( + const topoSetSource::setAction action, + topoSet& + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/meshTools/sets/faceSources/faceToFace/faceToFace.C b/src/meshTools/sets/faceSources/faceToFace/faceToFace.C index 1e05fdefd..fb78cb52e 100644 --- a/src/meshTools/sets/faceSources/faceToFace/faceToFace.C +++ b/src/meshTools/sets/faceSources/faceToFace/faceToFace.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,20 +26,15 @@ License #include "faceToFace.H" #include "polyMesh.H" #include "faceSet.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(faceToFace, 0); - -addToRunTimeSelectionTable(topoSetSource, faceToFace, word); - -addToRunTimeSelectionTable(topoSetSource, faceToFace, istream); - + defineTypeNameAndDebug(faceToFace, 0); + addToRunTimeSelectionTable(topoSetSource, faceToFace, word); + addToRunTimeSelectionTable(topoSetSource, faceToFace, istream); } @@ -53,7 +48,6 @@ Foam::topoSetSource::addToUsageTable Foam::faceToFace::usage_ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::faceToFace::faceToFace ( const polyMesh& mesh, @@ -65,7 +59,6 @@ Foam::faceToFace::faceToFace {} -// Construct from dictionary Foam::faceToFace::faceToFace ( const polyMesh& mesh, @@ -77,7 +70,6 @@ Foam::faceToFace::faceToFace {} -// Construct from Istream Foam::faceToFace::faceToFace ( const polyMesh& mesh, diff --git a/src/meshTools/sets/faceSources/labelToFace/labelToFace.C b/src/meshTools/sets/faceSources/labelToFace/labelToFace.C index ca61be907..9f7efd81e 100644 --- a/src/meshTools/sets/faceSources/labelToFace/labelToFace.C +++ b/src/meshTools/sets/faceSources/labelToFace/labelToFace.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,20 +25,15 @@ License #include "labelToFace.H" #include "polyMesh.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(labelToFace, 0); - -addToRunTimeSelectionTable(topoSetSource, labelToFace, word); - -addToRunTimeSelectionTable(topoSetSource, labelToFace, istream); - + defineTypeNameAndDebug(labelToFace, 0); + addToRunTimeSelectionTable(topoSetSource, labelToFace, word); + addToRunTimeSelectionTable(topoSetSource, labelToFace, istream); } @@ -63,7 +58,6 @@ void Foam::labelToFace::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::labelToFace::labelToFace ( const polyMesh& mesh, @@ -75,7 +69,6 @@ Foam::labelToFace::labelToFace {} -// Construct from dictionary Foam::labelToFace::labelToFace ( const polyMesh& mesh, @@ -87,7 +80,6 @@ Foam::labelToFace::labelToFace {} -// Construct from Istream Foam::labelToFace::labelToFace ( const polyMesh& mesh, diff --git a/src/meshTools/sets/faceSources/normalToFace/normalToFace.C b/src/meshTools/sets/faceSources/normalToFace/normalToFace.C index eb289aa68..2f722a111 100644 --- a/src/meshTools/sets/faceSources/normalToFace/normalToFace.C +++ b/src/meshTools/sets/faceSources/normalToFace/normalToFace.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,20 +26,15 @@ License #include "normalToFace.H" #include "polyMesh.H" #include "faceSet.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(normalToFace, 0); - -addToRunTimeSelectionTable(topoSetSource, normalToFace, word); - -addToRunTimeSelectionTable(topoSetSource, normalToFace, istream); - + defineTypeNameAndDebug(normalToFace, 0); + addToRunTimeSelectionTable(topoSetSource, normalToFace, word); + addToRunTimeSelectionTable(topoSetSource, normalToFace, istream); } @@ -71,7 +66,6 @@ void Foam::normalToFace::setNormal() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::normalToFace::normalToFace ( const polyMesh& mesh, @@ -87,7 +81,6 @@ Foam::normalToFace::normalToFace } -// Construct from dictionary Foam::normalToFace::normalToFace(const polyMesh& mesh, const dictionary& dict) : topoSetSource(mesh), @@ -98,7 +91,6 @@ Foam::normalToFace::normalToFace(const polyMesh& mesh, const dictionary& dict) } -// Construct from Istream Foam::normalToFace::normalToFace(const polyMesh& mesh, Istream& is) : topoSetSource(mesh), diff --git a/src/meshTools/sets/faceSources/patchToFace/patchToFace.C b/src/meshTools/sets/faceSources/patchToFace/patchToFace.C index acbef6688..17f4cfe02 100644 --- a/src/meshTools/sets/faceSources/patchToFace/patchToFace.C +++ b/src/meshTools/sets/faceSources/patchToFace/patchToFace.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,20 +25,15 @@ License #include "patchToFace.H" #include "polyMesh.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(patchToFace, 0); - -addToRunTimeSelectionTable(topoSetSource, patchToFace, word); - -addToRunTimeSelectionTable(topoSetSource, patchToFace, istream); - + defineTypeNameAndDebug(patchToFace, 0); + addToRunTimeSelectionTable(topoSetSource, patchToFace, word); + addToRunTimeSelectionTable(topoSetSource, patchToFace, istream); } @@ -92,7 +87,6 @@ void Foam::patchToFace::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::patchToFace::patchToFace ( const polyMesh& mesh, @@ -104,7 +98,6 @@ Foam::patchToFace::patchToFace {} -// Construct from dictionary Foam::patchToFace::patchToFace ( const polyMesh& mesh, @@ -116,7 +109,6 @@ Foam::patchToFace::patchToFace {} -// Construct from Istream Foam::patchToFace::patchToFace ( const polyMesh& mesh, diff --git a/src/meshTools/sets/faceSources/pointToFace/pointToFace.C b/src/meshTools/sets/faceSources/pointToFace/pointToFace.C index e85becdab..6b4155501 100644 --- a/src/meshTools/sets/faceSources/pointToFace/pointToFace.C +++ b/src/meshTools/sets/faceSources/pointToFace/pointToFace.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,6 @@ License #include "pointToFace.H" #include "polyMesh.H" #include "pointSet.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -150,7 +149,6 @@ void Foam::pointToFace::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::pointToFace::pointToFace ( const polyMesh& mesh, @@ -164,7 +162,6 @@ Foam::pointToFace::pointToFace {} -// Construct from dictionary Foam::pointToFace::pointToFace ( const polyMesh& mesh, @@ -177,7 +174,6 @@ Foam::pointToFace::pointToFace {} -// Construct from Istream Foam::pointToFace::pointToFace ( const polyMesh& mesh, diff --git a/src/meshTools/sets/faceSources/regionToFace/regionToFace.C b/src/meshTools/sets/faceSources/regionToFace/regionToFace.C index 29548096e..e9fbf0064 100644 --- a/src/meshTools/sets/faceSources/regionToFace/regionToFace.C +++ b/src/meshTools/sets/faceSources/regionToFace/regionToFace.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,13 +37,9 @@ License namespace Foam { - -defineTypeNameAndDebug(regionToFace, 0); - -addToRunTimeSelectionTable(topoSetSource, regionToFace, word); - -addToRunTimeSelectionTable(topoSetSource, regionToFace, istream); - + defineTypeNameAndDebug(regionToFace, 0); + addToRunTimeSelectionTable(topoSetSource, regionToFace, word); + addToRunTimeSelectionTable(topoSetSource, regionToFace, istream); } @@ -176,7 +172,6 @@ void Foam::regionToFace::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::regionToFace::regionToFace ( const polyMesh& mesh, @@ -190,7 +185,6 @@ Foam::regionToFace::regionToFace {} -// Construct from dictionary Foam::regionToFace::regionToFace ( const polyMesh& mesh, @@ -203,7 +197,6 @@ Foam::regionToFace::regionToFace {} -// Construct from Istream Foam::regionToFace::regionToFace ( const polyMesh& mesh, diff --git a/src/meshTools/sets/faceSources/zoneToFace/zoneToFace.C b/src/meshTools/sets/faceSources/zoneToFace/zoneToFace.C index fa29739e7..9285cc1e7 100644 --- a/src/meshTools/sets/faceSources/zoneToFace/zoneToFace.C +++ b/src/meshTools/sets/faceSources/zoneToFace/zoneToFace.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,20 +25,15 @@ License #include "zoneToFace.H" #include "polyMesh.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(zoneToFace, 0); - -addToRunTimeSelectionTable(topoSetSource, zoneToFace, word); - -addToRunTimeSelectionTable(topoSetSource, zoneToFace, istream); - + defineTypeNameAndDebug(zoneToFace, 0); + addToRunTimeSelectionTable(topoSetSource, zoneToFace, word); + addToRunTimeSelectionTable(topoSetSource, zoneToFace, istream); } @@ -92,7 +87,6 @@ void Foam::zoneToFace::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::zoneToFace::zoneToFace ( const polyMesh& mesh, @@ -104,7 +98,6 @@ Foam::zoneToFace::zoneToFace {} -// Construct from dictionary Foam::zoneToFace::zoneToFace ( const polyMesh& mesh, @@ -116,7 +109,6 @@ Foam::zoneToFace::zoneToFace {} -// Construct from Istream Foam::zoneToFace::zoneToFace ( const polyMesh& mesh, diff --git a/src/meshTools/sets/faceZoneSources/faceZoneToFaceZone/faceZoneToFaceZone.C b/src/meshTools/sets/faceZoneSources/faceZoneToFaceZone/faceZoneToFaceZone.C index e3f36bb25..fe0ee3c5d 100644 --- a/src/meshTools/sets/faceZoneSources/faceZoneToFaceZone/faceZoneToFaceZone.C +++ b/src/meshTools/sets/faceZoneSources/faceZoneToFaceZone/faceZoneToFaceZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,20 +26,15 @@ License #include "faceZoneToFaceZone.H" #include "polyMesh.H" #include "faceZoneSet.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(faceZoneToFaceZone, 0); - -addToRunTimeSelectionTable(topoSetSource, faceZoneToFaceZone, word); - -addToRunTimeSelectionTable(topoSetSource, faceZoneToFaceZone, istream); - + defineTypeNameAndDebug(faceZoneToFaceZone, 0); + addToRunTimeSelectionTable(topoSetSource, faceZoneToFaceZone, word); + addToRunTimeSelectionTable(topoSetSource, faceZoneToFaceZone, istream); } @@ -53,7 +48,6 @@ Foam::topoSetSource::addToUsageTable Foam::faceZoneToFaceZone::usage_ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::faceZoneToFaceZone::faceZoneToFaceZone ( const polyMesh& mesh, @@ -65,7 +59,6 @@ Foam::faceZoneToFaceZone::faceZoneToFaceZone {} -// Construct from dictionary Foam::faceZoneToFaceZone::faceZoneToFaceZone ( const polyMesh& mesh, @@ -77,7 +70,6 @@ Foam::faceZoneToFaceZone::faceZoneToFaceZone {} -// Construct from Istream Foam::faceZoneToFaceZone::faceZoneToFaceZone ( const polyMesh& mesh, diff --git a/src/meshTools/sets/faceZoneSources/searchableSurfaceToFaceZone/searchableSurfaceToFaceZone.C b/src/meshTools/sets/faceZoneSources/searchableSurfaceToFaceZone/searchableSurfaceToFaceZone.C index 50b423a4a..8739feb06 100644 --- a/src/meshTools/sets/faceZoneSources/searchableSurfaceToFaceZone/searchableSurfaceToFaceZone.C +++ b/src/meshTools/sets/faceZoneSources/searchableSurfaceToFaceZone/searchableSurfaceToFaceZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,7 +57,6 @@ Foam::topoSetSource::addToUsageTable Foam::searchableSurfaceToFaceZone::usage_ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from dictionary Foam::searchableSurfaceToFaceZone::searchableSurfaceToFaceZone ( const polyMesh& mesh, diff --git a/src/meshTools/sets/faceZoneSources/setToFaceZone/setToFaceZone.C b/src/meshTools/sets/faceZoneSources/setToFaceZone/setToFaceZone.C index 821d0777f..b9b418f2f 100644 --- a/src/meshTools/sets/faceZoneSources/setToFaceZone/setToFaceZone.C +++ b/src/meshTools/sets/faceZoneSources/setToFaceZone/setToFaceZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,20 +26,15 @@ License #include "setToFaceZone.H" #include "polyMesh.H" #include "faceZoneSet.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(setToFaceZone, 0); - -addToRunTimeSelectionTable(topoSetSource, setToFaceZone, word); - -addToRunTimeSelectionTable(topoSetSource, setToFaceZone, istream); - + defineTypeNameAndDebug(setToFaceZone, 0); + addToRunTimeSelectionTable(topoSetSource, setToFaceZone, word); + addToRunTimeSelectionTable(topoSetSource, setToFaceZone, istream); } @@ -54,7 +49,6 @@ Foam::topoSetSource::addToUsageTable Foam::setToFaceZone::usage_ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::setToFaceZone::setToFaceZone ( const polyMesh& mesh, @@ -66,7 +60,6 @@ Foam::setToFaceZone::setToFaceZone {} -// Construct from dictionary Foam::setToFaceZone::setToFaceZone ( const polyMesh& mesh, @@ -78,7 +71,6 @@ Foam::setToFaceZone::setToFaceZone {} -// Construct from Istream Foam::setToFaceZone::setToFaceZone ( const polyMesh& mesh, diff --git a/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C b/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C index 89d666e81..70892ab62 100644 --- a/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C +++ b/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,7 +51,6 @@ Foam::topoSetSource::addToUsageTable Foam::setsToFaceZone::usage_ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::setsToFaceZone::setsToFaceZone ( const polyMesh& mesh, @@ -67,7 +66,6 @@ Foam::setsToFaceZone::setsToFaceZone {} -// Construct from dictionary Foam::setsToFaceZone::setsToFaceZone ( const polyMesh& mesh, @@ -81,7 +79,6 @@ Foam::setsToFaceZone::setsToFaceZone {} -// Construct from Istream Foam::setsToFaceZone::setsToFaceZone ( const polyMesh& mesh, diff --git a/src/meshTools/sets/pointSources/boxToPoint/boxToPoint.C b/src/meshTools/sets/pointSources/boxToPoint/boxToPoint.C index c11a49064..7f55b9eb0 100644 --- a/src/meshTools/sets/pointSources/boxToPoint/boxToPoint.C +++ b/src/meshTools/sets/pointSources/boxToPoint/boxToPoint.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,20 +25,15 @@ License #include "boxToPoint.H" #include "polyMesh.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(boxToPoint, 0); - -addToRunTimeSelectionTable(topoSetSource, boxToPoint, word); - -addToRunTimeSelectionTable(topoSetSource, boxToPoint, istream); - + defineTypeNameAndDebug(boxToPoint, 0); + addToRunTimeSelectionTable(topoSetSource, boxToPoint, word); + addToRunTimeSelectionTable(topoSetSource, boxToPoint, istream); } @@ -71,7 +66,6 @@ void Foam::boxToPoint::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::boxToPoint::boxToPoint ( const polyMesh& mesh, @@ -83,7 +77,6 @@ Foam::boxToPoint::boxToPoint {} -// Construct from dictionary Foam::boxToPoint::boxToPoint ( const polyMesh& mesh, @@ -100,7 +93,6 @@ Foam::boxToPoint::boxToPoint {} -// Construct from Istream Foam::boxToPoint::boxToPoint ( const polyMesh& mesh, diff --git a/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C b/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C index 27d55c781..a5382d0a3 100644 --- a/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C +++ b/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,6 @@ License #include "cellToPoint.H" #include "polyMesh.H" #include "cellSet.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -88,7 +87,6 @@ void Foam::cellToPoint::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::cellToPoint::cellToPoint ( const polyMesh& mesh, @@ -102,7 +100,6 @@ Foam::cellToPoint::cellToPoint {} -// Construct from dictionary Foam::cellToPoint::cellToPoint ( const polyMesh& mesh, @@ -115,7 +112,6 @@ Foam::cellToPoint::cellToPoint {} -// Construct from Istream Foam::cellToPoint::cellToPoint ( const polyMesh& mesh, diff --git a/src/meshTools/sets/pointSources/faceToPoint/faceToPoint.C b/src/meshTools/sets/pointSources/faceToPoint/faceToPoint.C index 7b17632b6..86d6aea60 100644 --- a/src/meshTools/sets/pointSources/faceToPoint/faceToPoint.C +++ b/src/meshTools/sets/pointSources/faceToPoint/faceToPoint.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,6 @@ License #include "faceToPoint.H" #include "polyMesh.H" #include "faceSet.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -82,7 +81,6 @@ void Foam::faceToPoint::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::faceToPoint::faceToPoint ( const polyMesh& mesh, @@ -96,7 +94,6 @@ Foam::faceToPoint::faceToPoint {} -// Construct from dictionary Foam::faceToPoint::faceToPoint ( const polyMesh& mesh, @@ -109,7 +106,6 @@ Foam::faceToPoint::faceToPoint {} -// Construct from Istream Foam::faceToPoint::faceToPoint ( const polyMesh& mesh, diff --git a/src/meshTools/sets/pointSources/labelToPoint/labelToPoint.C b/src/meshTools/sets/pointSources/labelToPoint/labelToPoint.C index cd8cd3aec..1eed08530 100644 --- a/src/meshTools/sets/pointSources/labelToPoint/labelToPoint.C +++ b/src/meshTools/sets/pointSources/labelToPoint/labelToPoint.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,20 +25,15 @@ License #include "labelToPoint.H" #include "polyMesh.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(labelToPoint, 0); - -addToRunTimeSelectionTable(topoSetSource, labelToPoint, word); - -addToRunTimeSelectionTable(topoSetSource, labelToPoint, istream); - + defineTypeNameAndDebug(labelToPoint, 0); + addToRunTimeSelectionTable(topoSetSource, labelToPoint, word); + addToRunTimeSelectionTable(topoSetSource, labelToPoint, istream); } @@ -63,7 +58,6 @@ void Foam::labelToPoint::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::labelToPoint::labelToPoint ( const polyMesh& mesh, @@ -75,7 +69,6 @@ Foam::labelToPoint::labelToPoint {} -// Construct from dictionary Foam::labelToPoint::labelToPoint ( const polyMesh& mesh, @@ -87,7 +80,6 @@ Foam::labelToPoint::labelToPoint {} -// Construct from Istream Foam::labelToPoint::labelToPoint ( const polyMesh& mesh, diff --git a/src/meshTools/sets/pointSources/nearestToPoint/nearestToPoint.C b/src/meshTools/sets/pointSources/nearestToPoint/nearestToPoint.C index c83340db6..f27cd6301 100644 --- a/src/meshTools/sets/pointSources/nearestToPoint/nearestToPoint.C +++ b/src/meshTools/sets/pointSources/nearestToPoint/nearestToPoint.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,13 +31,9 @@ License namespace Foam { - -defineTypeNameAndDebug(nearestToPoint, 0); - -addToRunTimeSelectionTable(topoSetSource, nearestToPoint, word); - -addToRunTimeSelectionTable(topoSetSource, nearestToPoint, istream); - + defineTypeNameAndDebug(nearestToPoint, 0); + addToRunTimeSelectionTable(topoSetSource, nearestToPoint, word); + addToRunTimeSelectionTable(topoSetSource, nearestToPoint, istream); } @@ -83,7 +79,6 @@ void Foam::nearestToPoint::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::nearestToPoint::nearestToPoint ( const polyMesh& mesh, @@ -95,7 +90,6 @@ Foam::nearestToPoint::nearestToPoint {} -// Construct from dictionary Foam::nearestToPoint::nearestToPoint ( const polyMesh& mesh, @@ -107,7 +101,6 @@ Foam::nearestToPoint::nearestToPoint {} -// Construct from Istream Foam::nearestToPoint::nearestToPoint ( const polyMesh& mesh, diff --git a/src/meshTools/sets/pointSources/pointToPoint/pointToPoint.C b/src/meshTools/sets/pointSources/pointToPoint/pointToPoint.C index ecad9fa04..3a72bdda6 100644 --- a/src/meshTools/sets/pointSources/pointToPoint/pointToPoint.C +++ b/src/meshTools/sets/pointSources/pointToPoint/pointToPoint.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,20 +26,15 @@ License #include "pointToPoint.H" #include "polyMesh.H" #include "pointSet.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(pointToPoint, 0); - -addToRunTimeSelectionTable(topoSetSource, pointToPoint, word); - -addToRunTimeSelectionTable(topoSetSource, pointToPoint, istream); - + defineTypeNameAndDebug(pointToPoint, 0); + addToRunTimeSelectionTable(topoSetSource, pointToPoint, word); + addToRunTimeSelectionTable(topoSetSource, pointToPoint, istream); } @@ -53,7 +48,6 @@ Foam::topoSetSource::addToUsageTable Foam::pointToPoint::usage_ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::pointToPoint::pointToPoint ( const polyMesh& mesh, @@ -65,7 +59,6 @@ Foam::pointToPoint::pointToPoint {} -// Construct from dictionary Foam::pointToPoint::pointToPoint ( const polyMesh& mesh, @@ -77,7 +70,6 @@ Foam::pointToPoint::pointToPoint {} -// Construct from Istream Foam::pointToPoint::pointToPoint ( const polyMesh& mesh, diff --git a/src/meshTools/sets/pointSources/zoneToPoint/zoneToPoint.C b/src/meshTools/sets/pointSources/zoneToPoint/zoneToPoint.C index 8e9f62097..cdb7eb28d 100644 --- a/src/meshTools/sets/pointSources/zoneToPoint/zoneToPoint.C +++ b/src/meshTools/sets/pointSources/zoneToPoint/zoneToPoint.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,13 +32,9 @@ License namespace Foam { - -defineTypeNameAndDebug(zoneToPoint, 0); - -addToRunTimeSelectionTable(topoSetSource, zoneToPoint, word); - -addToRunTimeSelectionTable(topoSetSource, zoneToPoint, istream); - + defineTypeNameAndDebug(zoneToPoint, 0); + addToRunTimeSelectionTable(topoSetSource, zoneToPoint, word); + addToRunTimeSelectionTable(topoSetSource, zoneToPoint, istream); } @@ -92,7 +88,6 @@ void Foam::zoneToPoint::combine(topoSet& set, const bool add) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::zoneToPoint::zoneToPoint ( const polyMesh& mesh, @@ -104,7 +99,6 @@ Foam::zoneToPoint::zoneToPoint {} -// Construct from dictionary Foam::zoneToPoint::zoneToPoint ( const polyMesh& mesh, @@ -116,7 +110,6 @@ Foam::zoneToPoint::zoneToPoint {} -// Construct from Istream Foam::zoneToPoint::zoneToPoint ( const polyMesh& mesh, diff --git a/src/meshTools/sets/pointZoneSources/setToPointZone/setToPointZone.C b/src/meshTools/sets/pointZoneSources/setToPointZone/setToPointZone.C index b272752ad..b44321f04 100644 --- a/src/meshTools/sets/pointZoneSources/setToPointZone/setToPointZone.C +++ b/src/meshTools/sets/pointZoneSources/setToPointZone/setToPointZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,20 +26,15 @@ License #include "setToPointZone.H" #include "polyMesh.H" #include "pointZoneSet.H" - #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -defineTypeNameAndDebug(setToPointZone, 0); - -addToRunTimeSelectionTable(topoSetSource, setToPointZone, word); - -addToRunTimeSelectionTable(topoSetSource, setToPointZone, istream); - + defineTypeNameAndDebug(setToPointZone, 0); + addToRunTimeSelectionTable(topoSetSource, setToPointZone, word); + addToRunTimeSelectionTable(topoSetSource, setToPointZone, istream); } @@ -53,7 +48,6 @@ Foam::topoSetSource::addToUsageTable Foam::setToPointZone::usage_ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::setToPointZone::setToPointZone ( const polyMesh& mesh, @@ -65,7 +59,6 @@ Foam::setToPointZone::setToPointZone {} -// Construct from dictionary Foam::setToPointZone::setToPointZone ( const polyMesh& mesh, @@ -77,7 +70,6 @@ Foam::setToPointZone::setToPointZone {} -// Construct from Istream Foam::setToPointZone::setToPointZone ( const polyMesh& mesh,