From 28919eac732942f154a6d427a4ddf2b31a3e66c8 Mon Sep 17 00:00:00 2001 From: graham <graham.macpherson@strath.ac.uk> Date: Fri, 27 Feb 2009 20:31:19 +0000 Subject: [PATCH] Moved call to buildCellOccupancy() to within collisions. Was calling before move() had been called, so some particles were changing processor when running in parallel and invalidating the pointers. --- src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C index c84b0b7205b..8ecd5c3f5e1 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C @@ -210,6 +210,8 @@ void Foam::DsmcCloud<ParcelType>::initialise template<class ParcelType> void Foam::DsmcCloud<ParcelType>::collisions() { + buildCellOccupancy(); + scalar deltaT = mesh_.time().deltaT().value(); label collisionCandidates = 0; @@ -451,8 +453,6 @@ Foam::DsmcCloud<ParcelType>::~DsmcCloud() template<class ParcelType> void Foam::DsmcCloud<ParcelType>::evolve() { - buildCellOccupancy(); - typename ParcelType::trackData td(*this); //this->injection().inject(td); -- GitLab