diff --git a/src/lagrangian/basic/Cloud/Cloud.C b/src/lagrangian/basic/Cloud/Cloud.C index 2b39e286f26b5fd1c2b16ef435eba39c311bbf69..b75760294d2fc45d6ece49f4d0069694b88b436f 100644 --- a/src/lagrangian/basic/Cloud/Cloud.C +++ b/src/lagrangian/basic/Cloud/Cloud.C @@ -384,6 +384,16 @@ void Foam::Cloud<ParticleType>::deleteParticle(ParticleType& p) } +template<class ParticleType> +void Foam::Cloud<ParticleType>::cloudReset(const Cloud<ParticleType>& c) +{ + // Reset particle cound and particles only + // - not changing the cloud object registry or reference to the polyMesh + particleCount_ = 0; + IDLList<ParticleType>::operator=(c); +} + + template<class ParticleType> template<class TrackingData> void Foam::Cloud<ParticleType>::move(TrackingData& td) diff --git a/src/lagrangian/basic/Cloud/Cloud.H b/src/lagrangian/basic/Cloud/Cloud.H index 1868b9c881559307c91eaaa8a9cba618aa1c5bf2..c784ff9bebc4a1aa634ad47dcc13f0e2a9cf9e2c 100644 --- a/src/lagrangian/basic/Cloud/Cloud.H +++ b/src/lagrangian/basic/Cloud/Cloud.H @@ -318,6 +318,9 @@ public: //- Remove particle from cloud and delete void deleteParticle(ParticleType&); + //- Reset the particles + void cloudReset(const Cloud<ParticleType>& c); + //- Move the particles // passing the TrackingData to the track function template<class TrackingData>