diff --git a/src/functionObjects/field/nearWallFields/findCellParticle.H b/src/functionObjects/field/nearWallFields/findCellParticle.H index ba53724399..c7447767c0 100644 --- a/src/functionObjects/field/nearWallFields/findCellParticle.H +++ b/src/functionObjects/field/nearWallFields/findCellParticle.H @@ -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" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/functionObjects/field/streamLine/streamLineParticle.H b/src/functionObjects/field/streamLine/streamLineParticle.H index b0d5784dc6..0fc1b325e8 100644 --- a/src/functionObjects/field/streamLine/streamLineParticle.H +++ b/src/functionObjects/field/streamLine/streamLineParticle.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" diff --git a/src/lagrangian/basic/IOPosition/IOPosition.C b/src/lagrangian/basic/IOPosition/IOPosition.C index 88083ebb3f..183a6428d5 100644 --- a/src/lagrangian/basic/IOPosition/IOPosition.C +++ b/src/lagrangian/basic/IOPosition/IOPosition.C @@ -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 * * * * * * * * * * * * * * // diff --git a/src/lagrangian/basic/IOPosition/IOPosition.H b/src/lagrangian/basic/IOPosition/IOPosition.H index 1a315a62ab..9e52c45132 100644 --- a/src/lagrangian/basic/IOPosition/IOPosition.H +++ b/src/lagrangian/basic/IOPosition/IOPosition.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 @@ -42,6 +42,13 @@ SourceFiles namespace Foam { +/*---------------------------------------------------------------------------*\ + Class IOPositionName Declaration +\*---------------------------------------------------------------------------*/ + +TemplateName(IOPosition); + + /*---------------------------------------------------------------------------*\ Class IOPosition Declaration \*---------------------------------------------------------------------------*/ @@ -49,7 +56,8 @@ namespace Foam template 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; + return IOPositionName::typeName; } diff --git a/src/lagrangian/basic/IOPosition/IOPositionName.C b/src/lagrangian/basic/IOPosition/IOPositionName.C new file mode 100644 index 0000000000..c0537513ce --- /dev/null +++ b/src/lagrangian/basic/IOPosition/IOPositionName.C @@ -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 . + +\*---------------------------------------------------------------------------*/ + +#include "IOPosition.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(IOPositionName, 0); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/basic/Make/files b/src/lagrangian/basic/Make/files index 044d340f7a..ab257894f8 100644 --- a/src/lagrangian/basic/Make/files +++ b/src/lagrangian/basic/Make/files @@ -1,5 +1,6 @@ particle/particle.C particle/particleIO.C +IOPosition/IOPositionName.C passiveParticle/passiveParticleCloud.C indexedParticle/indexedParticleCloud.C diff --git a/src/lagrangian/basic/particle/particle.C b/src/lagrangian/basic/particle/particle.C index 2f0fe6f70c..4f70a74294 100644 --- a/src/lagrangian/basic/particle/particle.C +++ b/src/lagrangian/basic/particle/particle.C @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "particle.H" +#include "mapPolyMesh.H" #include "transform.H" #include "treeDataCell.H" #include "cubicEqn.H" diff --git a/src/lagrangian/basic/particle/particle.H b/src/lagrangian/basic/particle/particle.H index e6b9538d80..36b966fd77 100644 --- a/src/lagrangian/basic/particle/particle.H +++ b/src/lagrangian/basic/particle/particle.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" diff --git a/src/lagrangian/basic/particle/particleTemplates.C b/src/lagrangian/basic/particle/particleTemplates.C index 36a9404abe..a284a07b63 100644 --- a/src/lagrangian/basic/particle/particleTemplates.C +++ b/src/lagrangian/basic/particle/particleTemplates.C @@ -23,6 +23,7 @@ License \*---------------------------------------------------------------------------*/ +#include "particle.H" #include "IOPosition.H" #include "cyclicPolyPatch.H" diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H index 6b9be7481c..789ef8b13e 100644 --- a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H +++ b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H @@ -38,6 +38,7 @@ SourceFiles #define molecule_H #include "particle.H" +#include "Cloud.H" #include "IOstream.H" #include "autoPtr.H" #include "diagTensor.H" diff --git a/src/lagrangian/parcel/clouds/Templates/SprayCloud/SprayCloud.H b/src/lagrangian/parcel/clouds/Templates/SprayCloud/SprayCloud.H index 11537da8bf..2aa74caba0 100644 --- a/src/lagrangian/parcel/clouds/Templates/SprayCloud/SprayCloud.H +++ b/src/lagrangian/parcel/clouds/Templates/SprayCloud/SprayCloud.H @@ -69,7 +69,8 @@ TemplateName(SprayCloud); template class SprayCloud : - public CloudType + public CloudType, + public SprayCloudName { public: diff --git a/src/lagrangian/parcel/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C b/src/lagrangian/parcel/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C index 517a43c3b5..dea15801c6 100644 --- a/src/lagrangian/parcel/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C +++ b/src/lagrangian/parcel/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C @@ -117,7 +117,7 @@ void Foam::ReactingMultiphaseParcel::readFields const wordList& stateLabels = compModel.stateLabels(); // Set storage for each Y... for each parcel - forAllIter(typename Cloud>, c, iter) + forAllIter(typename CloudType, c, iter) { ReactingMultiphaseParcel& p = iter(); p.YGas_.setSize(gasNames.size(), 0.0); @@ -139,12 +139,7 @@ void Foam::ReactingMultiphaseParcel::readFields ); label i = 0; - forAllIter - ( - typename Cloud>, - c, - iter - ) + forAllIter(typename CloudType, c, iter) { ReactingMultiphaseParcel& p = iter(); p.YGas_[j] = YGas[i++]/(p.Y()[GAS] + rootVSmall); @@ -164,12 +159,7 @@ void Foam::ReactingMultiphaseParcel::readFields ); label i = 0; - forAllIter - ( - typename Cloud>, - c, - iter - ) + forAllIter(typename CloudType, c, iter) { ReactingMultiphaseParcel& p = iter(); p.YLiquid_[j] = YLiquid[i++]/(p.Y()[LIQ] + rootVSmall); @@ -189,12 +179,7 @@ void Foam::ReactingMultiphaseParcel::readFields ); label i = 0; - forAllIter - ( - typename Cloud>, - c, - iter - ) + forAllIter(typename CloudType, c, iter) { ReactingMultiphaseParcel& p = iter(); p.YSolid_[j] = YSolid[i++]/(p.Y()[SLD] + rootVSmall); @@ -242,12 +227,7 @@ void Foam::ReactingMultiphaseParcel::writeFields ); label i = 0; - forAllConstIter - ( - typename Cloud>, - c, - iter - ) + forAllConstIter(typename CloudType, c, iter) { const ReactingMultiphaseParcel& p0 = iter(); YGas[i++] = p0.YGas()[j]*p0.Y()[GAS]; @@ -271,12 +251,7 @@ void Foam::ReactingMultiphaseParcel::writeFields ); label i = 0; - forAllConstIter - ( - typename Cloud>, - c, - iter - ) + forAllConstIter(typename CloudType, c, iter) { const ReactingMultiphaseParcel& p0 = iter(); YLiquid[i++] = p0.YLiquid()[j]*p0.Y()[LIQ]; @@ -300,12 +275,7 @@ void Foam::ReactingMultiphaseParcel::writeFields ); label i = 0; - forAllConstIter - ( - typename Cloud>, - c, - iter - ) + forAllConstIter(typename CloudType, c, iter) { const ReactingMultiphaseParcel& p0 = iter(); YSolid[i++] = p0.YSolid()[j]*p0.Y()[SLD]; diff --git a/src/lagrangian/parcel/parcels/Templates/ReactingParcel/ReactingParcelIO.C b/src/lagrangian/parcel/parcels/Templates/ReactingParcel/ReactingParcelIO.C index 88ebdca0da..a8f808df0b 100644 --- a/src/lagrangian/parcel/parcels/Templates/ReactingParcel/ReactingParcelIO.C +++ b/src/lagrangian/parcel/parcels/Templates/ReactingParcel/ReactingParcelIO.C @@ -111,7 +111,7 @@ void Foam::ReactingParcel::readFields c.checkFieldIOobject(c, mass0); label i = 0; - forAllIter(typename Cloud>, c, iter) + forAllIter(typename CloudType, c, iter) { ReactingParcel& p = iter(); p.mass0_ = mass0[i++]; @@ -128,7 +128,7 @@ void Foam::ReactingParcel::readFields // Set storage for each Y... for each parcel - forAllIter(typename Cloud>, c, iter) + forAllIter(typename CloudType, c, iter) { ReactingParcel& p = iter(); p.Y_.setSize(nPhases, 0.0); @@ -148,7 +148,7 @@ void Foam::ReactingParcel::readFields ); label i = 0; - forAllIter(typename Cloud>, c, iter) + forAllIter(typename CloudType, c, iter) { ReactingParcel& p = iter(); p.Y_[j] = Y[i++]; @@ -181,7 +181,7 @@ void Foam::ReactingParcel::writeFields IOField mass0(c.fieldIOobject("mass0", IOobject::NO_READ), np); label i = 0; - forAllConstIter(typename Cloud>, c, iter) + forAllConstIter(typename CloudType, c, iter) { const ReactingParcel& p = iter(); mass0[i++] = p.mass0_; @@ -208,12 +208,7 @@ void Foam::ReactingParcel::writeFields np ); label i = 0; - forAllConstIter - ( - typename Cloud>, - c, - iter - ) + forAllConstIter(typename CloudType, c, iter) { const ReactingParcel& p = iter(); Y[i++] = p.Y()[j]; diff --git a/src/lagrangian/parcel/parcels/Templates/SprayParcel/SprayParcelIO.C b/src/lagrangian/parcel/parcels/Templates/SprayParcel/SprayParcelIO.C index b8953f20e4..b00de5bba5 100644 --- a/src/lagrangian/parcel/parcels/Templates/SprayParcel/SprayParcelIO.C +++ b/src/lagrangian/parcel/parcels/Templates/SprayParcel/SprayParcelIO.C @@ -197,7 +197,7 @@ void Foam::SprayParcel::readFields c.checkFieldIOobject(c, user); label i = 0; - forAllIter(typename Cloud>, c, iter) + forAllIter(typename CloudType, c, iter) { SprayParcel& p = iter(); p.d0_ = d0[i]; @@ -265,7 +265,7 @@ void Foam::SprayParcel::writeFields IOField user(c.fieldIOobject("user", IOobject::NO_READ), np); label i = 0; - forAllConstIter(typename Cloud>, c, iter) + forAllConstIter(typename CloudType, c, iter) { const SprayParcel& p = iter(); d0[i] = p.d0_; diff --git a/src/lagrangian/parcel/parcels/Templates/ThermoParcel/ThermoParcelIO.C b/src/lagrangian/parcel/parcels/Templates/ThermoParcel/ThermoParcelIO.C index cc8e4413a4..5b172c655a 100644 --- a/src/lagrangian/parcel/parcels/Templates/ThermoParcel/ThermoParcelIO.C +++ b/src/lagrangian/parcel/parcels/Templates/ThermoParcel/ThermoParcelIO.C @@ -91,7 +91,7 @@ void Foam::ThermoParcel::readFields(CloudType& c) label i = 0; - forAllIter(typename Cloud>, c, iter) + forAllIter(typename CloudType, c, iter) { ThermoParcel& p = iter(); @@ -114,7 +114,7 @@ void Foam::ThermoParcel::writeFields(const CloudType& c) IOField Cp(c.fieldIOobject("Cp", IOobject::NO_READ), np); label i = 0; - forAllConstIter(typename Cloud>, c, iter) + forAllConstIter(typename CloudType, c, iter) { const ThermoParcel& p = iter(); diff --git a/src/lagrangian/solidParticle/solidParticle.H b/src/lagrangian/solidParticle/solidParticle.H index bc1d683973..923c3b118c 100644 --- a/src/lagrangian/solidParticle/solidParticle.H +++ b/src/lagrangian/solidParticle/solidParticle.H @@ -39,6 +39,7 @@ SourceFiles #define solidParticle_H #include "particle.H" +#include "Cloud.H" #include "IOstream.H" #include "autoPtr.H" #include "interpolationCellPoint.H" diff --git a/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.H b/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.H index 0ef436a792..b973362d07 100644 --- a/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.H +++ b/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.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" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //