lagrangian/basic/indexedParticle: Remove unused particle and cloud type

This commit is contained in:
Will Bainbridge
2024-06-21 13:16:46 +01:00
parent 530213570c
commit 2f7185d73a
11 changed files with 15 additions and 274 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -57,7 +57,11 @@ int main(int argc, char *argv[])
Pout<< "Starting particles:" << particles.size() << endl; Pout<< "Starting particles:" << particles.size() << endl;
Pout<< "Adding a particle." << 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) forAllConstIter(passiveParticleCloud, particles, iter)
{ {

View File

@ -28,12 +28,7 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class CloudType> template<class CloudType>
Foam::IOPosition<CloudType>::IOPosition Foam::IOPosition<CloudType>::IOPosition(const IOobject& io, const CloudType& c)
(
const IOobject& io,
const polyMesh& mesh,
const CloudType& c
)
: :
regIOobject(io), regIOobject(io),
cloud_(c) cloud_(c)

View File

@ -35,7 +35,7 @@ SourceFiles
#ifndef IOPosition_H #ifndef IOPosition_H
#define IOPosition_H #define IOPosition_H
#include "polyMesh.H" #include "regIOobject.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -81,7 +81,7 @@ public:
// Constructors // Constructors
//- Construct from components //- Construct from components
IOPosition(const IOobject&, const polyMesh&, const CloudType&); IOPosition(const IOobject&, const CloudType&);
//- Construct from cloud //- Construct from cloud
IOPosition(const CloudType&); IOPosition(const CloudType&);

View File

@ -6,7 +6,6 @@ IOPosition/IOPositionName.C
cloud/cloud.C cloud/cloud.C
passiveParticle/passiveParticleCloud.C passiveParticle/passiveParticleCloud.C
indexedParticle/indexedParticleCloud.C
InteractionLists/referredWallFace/referredWallFace.C InteractionLists/referredWallFace/referredWallFace.C

View File

@ -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 <http://www.gnu.org/licenses/>.
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<particle> clone() const
{
return autoPtr<particle>(new indexedParticle(*this));
}
//- Construct from Istream and return
static autoPtr<indexedParticle> New(Istream& is)
{
return autoPtr<indexedParticle>(new indexedParticle(is));
}
// Member Functions
label index() const
{
return index_;
}
label& index()
{
return index_;
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -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 <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "indexedParticleCloud.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(indexedParticleCloud, 0);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::indexedParticleCloud::indexedParticleCloud
(
const polyMesh& mesh,
const word& cloudName,
bool readFields
)
:
Cloud<indexedParticle>(mesh, cloudName, false)
{
if (readFields)
{
indexedParticle::readFields(*this);
}
}
// ************************************************************************* //

View File

@ -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 <http://www.gnu.org/licenses/>.
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<indexedParticle>
{
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
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -55,7 +55,6 @@ SourceFiles
#include "sampledSet.H" #include "sampledSet.H"
#include "DynamicList.H" #include "DynamicList.H"
#include "passiveParticleCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -55,7 +55,6 @@ SourceFiles
#ifndef lineUniform_H #ifndef lineUniform_H
#define lineUniform_H #define lineUniform_H
#include "passiveParticleCloud.H"
#include "sampledSet.H" #include "sampledSet.H"
#include "DynamicList.H" #include "DynamicList.H"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -289,7 +289,7 @@ Foam::sampledSets::points::points
: :
sampledSet(name, mesh, searchEngine, dict), sampledSet(name, mesh, searchEngine, dict),
points_(dict.lookup("points")), points_(dict.lookup("points")),
ordered_(dict.lookup("ordered")) ordered_(dict.lookup<bool>("ordered"))
{ {
genSamples(); genSamples();
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -69,7 +69,6 @@ SourceFiles
#include "sampledSet.H" #include "sampledSet.H"
#include "DynamicList.H" #include "DynamicList.H"
#include "passiveParticleCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -92,7 +91,7 @@ class points
const List<point> points_; const List<point> points_;
//- Do the points form an ordered sequence? //- Do the points form an ordered sequence?
const Switch ordered_; const bool ordered_;
// Private Member Functions // Private Member Functions