diff --git a/src/lagrangian/basic/indexedParticle/indexedParticle.H b/src/lagrangian/basic/indexedParticle/indexedParticle.H index 7023f0ba6d..be2ecd65d9 100644 --- a/src/lagrangian/basic/indexedParticle/indexedParticle.H +++ b/src/lagrangian/basic/indexedParticle/indexedParticle.H @@ -47,7 +47,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class indexedParticle Declaration + Class indexedParticle Declaration \*---------------------------------------------------------------------------*/ class indexedParticle diff --git a/src/lagrangian/basic/indexedParticle/indexedParticleCloud.C b/src/lagrangian/basic/indexedParticle/indexedParticleCloud.C index a9ebc140ec..81ce7e3322 100644 --- a/src/lagrangian/basic/indexedParticle/indexedParticleCloud.C +++ b/src/lagrangian/basic/indexedParticle/indexedParticleCloud.C @@ -45,20 +45,17 @@ defineTemplateTypeNameAndDebug(Cloud, 0); Foam::indexedParticleCloud::indexedParticleCloud ( const polyMesh& mesh, - const word& cloudName + const word& cloudName, + bool readFields ) : Cloud(mesh, cloudName, false) { - indexedParticle::readFields(*this); + if (readFields) + { + indexedParticle::readFields(*this); + } } -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::indexedParticleCloud::writeFields() const -{ - indexedParticle::writeFields(*this); -} - // ************************************************************************* // diff --git a/src/lagrangian/basic/indexedParticle/indexedParticleCloud.H b/src/lagrangian/basic/indexedParticle/indexedParticleCloud.H index 65033e0a9d..0f8f39edbb 100644 --- a/src/lagrangian/basic/indexedParticle/indexedParticleCloud.H +++ b/src/lagrangian/basic/indexedParticle/indexedParticleCloud.H @@ -45,7 +45,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class indexedParticleCloud Declaration + Class indexedParticleCloud Declaration \*---------------------------------------------------------------------------*/ class indexedParticleCloud @@ -69,14 +69,9 @@ public: indexedParticleCloud ( const polyMesh&, - const word& cloudName = "defaultCloud" + const word& cloudName = "defaultCloud", + bool readFields = true ); - - - // Member Functions - - //- Write fields - virtual void writeFields() const; }; diff --git a/src/lagrangian/basic/passiveParticle/passiveParticleCloud.C b/src/lagrangian/basic/passiveParticle/passiveParticleCloud.C index ebb67d26de..79f937aaa0 100644 --- a/src/lagrangian/basic/passiveParticle/passiveParticleCloud.C +++ b/src/lagrangian/basic/passiveParticle/passiveParticleCloud.C @@ -43,12 +43,16 @@ defineTemplateTypeNameAndDebug(Cloud, 0); Foam::passiveParticleCloud::passiveParticleCloud ( const polyMesh& mesh, - const word& cloudName + const word& cloudName, + bool readFields ) : Cloud(mesh, cloudName, false) { - readFields(); + if (readFields) + { + passiveParticle::readFields(*this); + } } @@ -63,18 +67,4 @@ Foam::passiveParticleCloud::passiveParticleCloud {} -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::passiveParticleCloud::readFields() -{ - passiveParticle::readFields(*this); -} - - -void Foam::passiveParticleCloud::writeFields() const -{ - passiveParticle::writeFields(*this); -} - - // ************************************************************************* // diff --git a/src/lagrangian/basic/passiveParticle/passiveParticleCloud.H b/src/lagrangian/basic/passiveParticle/passiveParticleCloud.H index e3c0266fa3..1ef383867b 100644 --- a/src/lagrangian/basic/passiveParticle/passiveParticleCloud.H +++ b/src/lagrangian/basic/passiveParticle/passiveParticleCloud.H @@ -45,7 +45,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class passiveParticleCloud Declaration + Class passiveParticleCloud Declaration \*---------------------------------------------------------------------------*/ class passiveParticleCloud @@ -72,7 +72,8 @@ public: passiveParticleCloud ( const polyMesh&, - const word& cloudName = "defaultCloud" + const word& cloudName = "defaultCloud", + bool readFields = true ); //- Construct from mesh, cloud name, and a list of particles @@ -82,15 +83,6 @@ public: const word& cloudName, const IDLList& particles ); - - - // Member Functions - - //- Read fields - virtual void readFields(); - - //- Write fields - virtual void writeFields() const; };