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.

This commit is contained in:
graham
2009-02-27 20:31:19 +00:00
parent af54627885
commit 28919eac73

View File

@ -210,6 +210,8 @@ void Foam::DsmcCloud<ParcelType>::initialise
template<class ParcelType> template<class ParcelType>
void Foam::DsmcCloud<ParcelType>::collisions() void Foam::DsmcCloud<ParcelType>::collisions()
{ {
buildCellOccupancy();
scalar deltaT = mesh_.time().deltaT().value(); scalar deltaT = mesh_.time().deltaT().value();
label collisionCandidates = 0; label collisionCandidates = 0;
@ -451,8 +453,6 @@ Foam::DsmcCloud<ParcelType>::~DsmcCloud()
template<class ParcelType> template<class ParcelType>
void Foam::DsmcCloud<ParcelType>::evolve() void Foam::DsmcCloud<ParcelType>::evolve()
{ {
buildCellOccupancy();
typename ParcelType::trackData td(*this); typename ParcelType::trackData td(*this);
//this->injection().inject(td); //this->injection().inject(td);