lagrangian/basic/particle: Remove inclusion of Cloud header
This isolates the particle implementation a little more, allowing it to be constructed as a throwaway tracking object.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -36,6 +36,7 @@ SourceFiles
|
||||
#define findCellParticle_H
|
||||
|
||||
#include "particle.H"
|
||||
#include "Cloud.H"
|
||||
#include "autoPtr.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -37,6 +37,7 @@ SourceFiles
|
||||
#define streamLineParticle_H
|
||||
|
||||
#include "particle.H"
|
||||
#include "Cloud.H"
|
||||
#include "autoPtr.H"
|
||||
#include "interpolation.H"
|
||||
#include "vectorList.H"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,6 +24,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "IOPosition.H"
|
||||
#include "polyMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -42,6 +42,13 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class IOPositionName Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
TemplateName(IOPosition);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class IOPosition Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -49,7 +56,8 @@ namespace Foam
|
||||
template<class CloudType>
|
||||
class IOPosition
|
||||
:
|
||||
public regIOobject
|
||||
public regIOobject,
|
||||
public IOPositionName
|
||||
{
|
||||
|
||||
// Private Data
|
||||
@ -60,12 +68,13 @@ class IOPosition
|
||||
|
||||
public:
|
||||
|
||||
// Static data
|
||||
//- Type information
|
||||
|
||||
using IOPositionName::typeName;
|
||||
|
||||
//- Runtime type name information. Use cloud type.
|
||||
virtual const word& type() const
|
||||
{
|
||||
return Cloud<typename CloudType::particleType>::typeName;
|
||||
return IOPositionName::typeName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
36
src/lagrangian/basic/IOPosition/IOPositionName.C
Normal file
36
src/lagrangian/basic/IOPosition/IOPositionName.C
Normal file
@ -0,0 +1,36 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 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 "IOPosition.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(IOPositionName, 0);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,5 +1,6 @@
|
||||
particle/particle.C
|
||||
particle/particleIO.C
|
||||
IOPosition/IOPositionName.C
|
||||
passiveParticle/passiveParticleCloud.C
|
||||
indexedParticle/indexedParticleCloud.C
|
||||
|
||||
|
||||
@ -24,6 +24,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "particle.H"
|
||||
#include "mapPolyMesh.H"
|
||||
#include "transform.H"
|
||||
#include "treeDataCell.H"
|
||||
#include "cubicEqn.H"
|
||||
|
||||
@ -35,7 +35,6 @@ Description
|
||||
#include "vector.H"
|
||||
#include "barycentric.H"
|
||||
#include "barycentricTensor.H"
|
||||
#include "Cloud.H"
|
||||
#include "IDLList.H"
|
||||
#include "pointField.H"
|
||||
#include "faceList.H"
|
||||
|
||||
@ -23,6 +23,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "particle.H"
|
||||
#include "IOPosition.H"
|
||||
|
||||
#include "cyclicPolyPatch.H"
|
||||
|
||||
@ -38,6 +38,7 @@ SourceFiles
|
||||
#define molecule_H
|
||||
|
||||
#include "particle.H"
|
||||
#include "Cloud.H"
|
||||
#include "IOstream.H"
|
||||
#include "autoPtr.H"
|
||||
#include "diagTensor.H"
|
||||
|
||||
@ -69,7 +69,8 @@ TemplateName(SprayCloud);
|
||||
template<class CloudType>
|
||||
class SprayCloud
|
||||
:
|
||||
public CloudType
|
||||
public CloudType,
|
||||
public SprayCloudName
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@ -117,7 +117,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
||||
const wordList& stateLabels = compModel.stateLabels();
|
||||
|
||||
// Set storage for each Y... for each parcel
|
||||
forAllIter(typename Cloud<ReactingMultiphaseParcel<ParcelType>>, c, iter)
|
||||
forAllIter(typename CloudType, c, iter)
|
||||
{
|
||||
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
||||
p.YGas_.setSize(gasNames.size(), 0.0);
|
||||
@ -139,12 +139,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllIter
|
||||
(
|
||||
typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
|
||||
c,
|
||||
iter
|
||||
)
|
||||
forAllIter(typename CloudType, c, iter)
|
||||
{
|
||||
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
||||
p.YGas_[j] = YGas[i++]/(p.Y()[GAS] + rootVSmall);
|
||||
@ -164,12 +159,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllIter
|
||||
(
|
||||
typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
|
||||
c,
|
||||
iter
|
||||
)
|
||||
forAllIter(typename CloudType, c, iter)
|
||||
{
|
||||
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
||||
p.YLiquid_[j] = YLiquid[i++]/(p.Y()[LIQ] + rootVSmall);
|
||||
@ -189,12 +179,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllIter
|
||||
(
|
||||
typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
|
||||
c,
|
||||
iter
|
||||
)
|
||||
forAllIter(typename CloudType, c, iter)
|
||||
{
|
||||
ReactingMultiphaseParcel<ParcelType>& p = iter();
|
||||
p.YSolid_[j] = YSolid[i++]/(p.Y()[SLD] + rootVSmall);
|
||||
@ -242,12 +227,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter
|
||||
(
|
||||
typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
|
||||
c,
|
||||
iter
|
||||
)
|
||||
forAllConstIter(typename CloudType, c, iter)
|
||||
{
|
||||
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
|
||||
YGas[i++] = p0.YGas()[j]*p0.Y()[GAS];
|
||||
@ -271,12 +251,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter
|
||||
(
|
||||
typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
|
||||
c,
|
||||
iter
|
||||
)
|
||||
forAllConstIter(typename CloudType, c, iter)
|
||||
{
|
||||
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
|
||||
YLiquid[i++] = p0.YLiquid()[j]*p0.Y()[LIQ];
|
||||
@ -300,12 +275,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter
|
||||
(
|
||||
typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
|
||||
c,
|
||||
iter
|
||||
)
|
||||
forAllConstIter(typename CloudType, c, iter)
|
||||
{
|
||||
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
|
||||
YSolid[i++] = p0.YSolid()[j]*p0.Y()[SLD];
|
||||
|
||||
@ -111,7 +111,7 @@ void Foam::ReactingParcel<ParcelType>::readFields
|
||||
c.checkFieldIOobject(c, mass0);
|
||||
|
||||
label i = 0;
|
||||
forAllIter(typename Cloud<ReactingParcel<ParcelType>>, c, iter)
|
||||
forAllIter(typename CloudType, c, iter)
|
||||
{
|
||||
ReactingParcel<ParcelType>& p = iter();
|
||||
p.mass0_ = mass0[i++];
|
||||
@ -128,7 +128,7 @@ void Foam::ReactingParcel<ParcelType>::readFields
|
||||
|
||||
|
||||
// Set storage for each Y... for each parcel
|
||||
forAllIter(typename Cloud<ReactingParcel<ParcelType>>, c, iter)
|
||||
forAllIter(typename CloudType, c, iter)
|
||||
{
|
||||
ReactingParcel<ParcelType>& p = iter();
|
||||
p.Y_.setSize(nPhases, 0.0);
|
||||
@ -148,7 +148,7 @@ void Foam::ReactingParcel<ParcelType>::readFields
|
||||
);
|
||||
|
||||
label i = 0;
|
||||
forAllIter(typename Cloud<ReactingParcel<ParcelType>>, c, iter)
|
||||
forAllIter(typename CloudType, c, iter)
|
||||
{
|
||||
ReactingParcel<ParcelType>& p = iter();
|
||||
p.Y_[j] = Y[i++];
|
||||
@ -181,7 +181,7 @@ void Foam::ReactingParcel<ParcelType>::writeFields
|
||||
IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::NO_READ), np);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(typename Cloud<ReactingParcel<ParcelType>>, c, iter)
|
||||
forAllConstIter(typename CloudType, c, iter)
|
||||
{
|
||||
const ReactingParcel<ParcelType>& p = iter();
|
||||
mass0[i++] = p.mass0_;
|
||||
@ -208,12 +208,7 @@ void Foam::ReactingParcel<ParcelType>::writeFields
|
||||
np
|
||||
);
|
||||
label i = 0;
|
||||
forAllConstIter
|
||||
(
|
||||
typename Cloud<ReactingParcel<ParcelType>>,
|
||||
c,
|
||||
iter
|
||||
)
|
||||
forAllConstIter(typename CloudType, c, iter)
|
||||
{
|
||||
const ReactingParcel<ParcelType>& p = iter();
|
||||
Y[i++] = p.Y()[j];
|
||||
|
||||
@ -197,7 +197,7 @@ void Foam::SprayParcel<ParcelType>::readFields
|
||||
c.checkFieldIOobject(c, user);
|
||||
|
||||
label i = 0;
|
||||
forAllIter(typename Cloud<SprayParcel<ParcelType>>, c, iter)
|
||||
forAllIter(typename CloudType, c, iter)
|
||||
{
|
||||
SprayParcel<ParcelType>& p = iter();
|
||||
p.d0_ = d0[i];
|
||||
@ -265,7 +265,7 @@ void Foam::SprayParcel<ParcelType>::writeFields
|
||||
IOField<scalar> user(c.fieldIOobject("user", IOobject::NO_READ), np);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(typename Cloud<SprayParcel<ParcelType>>, c, iter)
|
||||
forAllConstIter(typename CloudType, c, iter)
|
||||
{
|
||||
const SprayParcel<ParcelType>& p = iter();
|
||||
d0[i] = p.d0_;
|
||||
|
||||
@ -91,7 +91,7 @@ void Foam::ThermoParcel<ParcelType>::readFields(CloudType& c)
|
||||
|
||||
|
||||
label i = 0;
|
||||
forAllIter(typename Cloud<ThermoParcel<ParcelType>>, c, iter)
|
||||
forAllIter(typename CloudType, c, iter)
|
||||
{
|
||||
ThermoParcel<ParcelType>& p = iter();
|
||||
|
||||
@ -114,7 +114,7 @@ void Foam::ThermoParcel<ParcelType>::writeFields(const CloudType& c)
|
||||
IOField<scalar> Cp(c.fieldIOobject("Cp", IOobject::NO_READ), np);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(typename Cloud<ThermoParcel<ParcelType>>, c, iter)
|
||||
forAllConstIter(typename CloudType, c, iter)
|
||||
{
|
||||
const ThermoParcel<ParcelType>& p = iter();
|
||||
|
||||
|
||||
@ -39,6 +39,7 @@ SourceFiles
|
||||
#define solidParticle_H
|
||||
|
||||
#include "particle.H"
|
||||
#include "Cloud.H"
|
||||
#include "IOstream.H"
|
||||
#include "autoPtr.H"
|
||||
#include "interpolationCellPoint.H"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -37,6 +37,7 @@ SourceFiles
|
||||
#define trackedParticle_H
|
||||
|
||||
#include "particle.H"
|
||||
#include "Cloud.H"
|
||||
#include "autoPtr.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Reference in New Issue
Block a user