diff --git a/applications/test/passiveParticle/Test-passiveParticle.C b/applications/test/passiveParticle/Test-passiveParticle.C index 14fe6aadf4..f7aa19d386 100644 --- a/applications/test/passiveParticle/Test-passiveParticle.C +++ b/applications/test/passiveParticle/Test-passiveParticle.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,7 +57,11 @@ int main(int argc, char *argv[]) Pout<< "Starting particles:" << particles.size() << endl; Pout<< "Adding a particle." << endl; - particles.addParticle(new passiveParticle(mesh, Zero, -1)); + label nLocateBoundaryHits = 0; + particles.addParticle + ( + new passiveParticle(mesh, Zero, -1, nLocateBoundaryHits) + ); forAllConstIter(passiveParticleCloud, particles, iter) { diff --git a/src/lagrangian/basic/IOPosition/IOPosition.C b/src/lagrangian/basic/IOPosition/IOPosition.C index 1ee1ec1640..817f7df86a 100644 --- a/src/lagrangian/basic/IOPosition/IOPosition.C +++ b/src/lagrangian/basic/IOPosition/IOPosition.C @@ -28,12 +28,7 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::IOPosition::IOPosition -( - const IOobject& io, - const polyMesh& mesh, - const CloudType& c -) +Foam::IOPosition::IOPosition(const IOobject& io, const CloudType& c) : regIOobject(io), cloud_(c) diff --git a/src/lagrangian/basic/IOPosition/IOPosition.H b/src/lagrangian/basic/IOPosition/IOPosition.H index 521783996b..9b4a182778 100644 --- a/src/lagrangian/basic/IOPosition/IOPosition.H +++ b/src/lagrangian/basic/IOPosition/IOPosition.H @@ -35,7 +35,7 @@ SourceFiles #ifndef IOPosition_H #define IOPosition_H -#include "polyMesh.H" +#include "regIOobject.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -81,7 +81,7 @@ public: // Constructors //- Construct from components - IOPosition(const IOobject&, const polyMesh&, const CloudType&); + IOPosition(const IOobject&, const CloudType&); //- Construct from cloud IOPosition(const CloudType&); diff --git a/src/lagrangian/basic/Make/files b/src/lagrangian/basic/Make/files index 2481b8d1bb..1a8e208b58 100644 --- a/src/lagrangian/basic/Make/files +++ b/src/lagrangian/basic/Make/files @@ -6,7 +6,6 @@ IOPosition/IOPositionName.C cloud/cloud.C passiveParticle/passiveParticleCloud.C -indexedParticle/indexedParticleCloud.C InteractionLists/referredWallFace/referredWallFace.C diff --git a/src/lagrangian/basic/indexedParticle/indexedParticle.H b/src/lagrangian/basic/indexedParticle/indexedParticle.H deleted file mode 100644 index d52200f42e..0000000000 --- a/src/lagrangian/basic/indexedParticle/indexedParticle.H +++ /dev/null @@ -1,111 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 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::indexedParticle - -Description - Adds label index to base particle - -SourceFiles - indexedParticle.H - -\*---------------------------------------------------------------------------*/ - -#ifndef indexedParticle_H -#define indexedParticle_H - -#include "particle.H" -#include "IOstream.H" -#include "autoPtr.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class indexedParticle Declaration -\*---------------------------------------------------------------------------*/ - -class indexedParticle -: - public particle -{ - // Private Data - - label index_; - - -public: - - // Constructors - - //- Construct from Istream - indexedParticle(Istream& is, bool readFields = true) - : - particle(is, readFields) - {} - - //- Construct as a copy - indexedParticle(const indexedParticle& p) - : - particle(p) - {} - - //- Construct and return a clone - virtual autoPtr clone() const - { - return autoPtr(new indexedParticle(*this)); - } - - //- Construct from Istream and return - static autoPtr New(Istream& is) - { - return autoPtr(new indexedParticle(is)); - } - - - // Member Functions - - label index() const - { - return index_; - } - - label& index() - { - return index_; - } -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/lagrangian/basic/indexedParticle/indexedParticleCloud.C b/src/lagrangian/basic/indexedParticle/indexedParticleCloud.C deleted file mode 100644 index 3f8fea0e90..0000000000 --- a/src/lagrangian/basic/indexedParticle/indexedParticleCloud.C +++ /dev/null @@ -1,54 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 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 "indexedParticleCloud.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(indexedParticleCloud, 0); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::indexedParticleCloud::indexedParticleCloud -( - const polyMesh& mesh, - const word& cloudName, - bool readFields -) -: - Cloud(mesh, cloudName, false) -{ - if (readFields) - { - indexedParticle::readFields(*this); - } -} - - -// ************************************************************************* // diff --git a/src/lagrangian/basic/indexedParticle/indexedParticleCloud.H b/src/lagrangian/basic/indexedParticle/indexedParticleCloud.H deleted file mode 100644 index d466bc3c8b..0000000000 --- a/src/lagrangian/basic/indexedParticle/indexedParticleCloud.H +++ /dev/null @@ -1,89 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 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::indexedParticleCloud - -Description - A Cloud of particles carrying an additional index. - -SourceFiles - indexedParticleCloud.C - -\*---------------------------------------------------------------------------*/ - -#ifndef indexedParticleCloud_H -#define indexedParticleCloud_H - -#include "Cloud.H" -#include "indexedParticle.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class indexedParticleCloud Declaration -\*---------------------------------------------------------------------------*/ - -class indexedParticleCloud -: - public Cloud -{ -public: - - //- Runtime type information - TypeName("indexedParticleCloud"); - - - // Constructors - - //- Construct given mesh - indexedParticleCloud - ( - const polyMesh&, - const word& cloudName = "defaultCloud", - bool readFields = true - ); - - //- Disallow default bitwise copy construction - indexedParticleCloud(const indexedParticleCloud&) = delete; - - - // Member Operators - - //- Disallow default bitwise assignment - void operator=(const indexedParticleCloud&) = delete; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/sampling/sampledSet/lineFace/lineFace.H b/src/sampling/sampledSet/lineFace/lineFace.H index 290c5ca3f0..4b84567587 100644 --- a/src/sampling/sampledSet/lineFace/lineFace.H +++ b/src/sampling/sampledSet/lineFace/lineFace.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,7 +55,6 @@ SourceFiles #include "sampledSet.H" #include "DynamicList.H" -#include "passiveParticleCloud.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/sampling/sampledSet/lineUniform/lineUniform.H b/src/sampling/sampledSet/lineUniform/lineUniform.H index 5691633cd8..3b72484b5c 100644 --- a/src/sampling/sampledSet/lineUniform/lineUniform.H +++ b/src/sampling/sampledSet/lineUniform/lineUniform.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,7 +55,6 @@ SourceFiles #ifndef lineUniform_H #define lineUniform_H -#include "passiveParticleCloud.H" #include "sampledSet.H" #include "DynamicList.H" diff --git a/src/sampling/sampledSet/points/points.C b/src/sampling/sampledSet/points/points.C index f13469cb63..d8b62dec69 100644 --- a/src/sampling/sampledSet/points/points.C +++ b/src/sampling/sampledSet/points/points.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -289,7 +289,7 @@ Foam::sampledSets::points::points : sampledSet(name, mesh, searchEngine, dict), points_(dict.lookup("points")), - ordered_(dict.lookup("ordered")) + ordered_(dict.lookup("ordered")) { genSamples(); } diff --git a/src/sampling/sampledSet/points/points.H b/src/sampling/sampledSet/points/points.H index 769c267ba4..29ef549a41 100644 --- a/src/sampling/sampledSet/points/points.H +++ b/src/sampling/sampledSet/points/points.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -69,7 +69,6 @@ SourceFiles #include "sampledSet.H" #include "DynamicList.H" -#include "passiveParticleCloud.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -92,7 +91,7 @@ class points const List points_; //- Do the points form an ordered sequence? - const Switch ordered_; + const bool ordered_; // Private Member Functions