BUG: Corrected ConeNozzleInjection injected posisions in parallel operation. See #840

This commit is contained in:
Andrew Heather
2018-05-30 14:05:53 +01:00
parent e747024c34
commit fe21322939

View File

@ -186,7 +186,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
while(magTangent < SMALL)
{
vector v = rndGen.sample01<vector>();
vector v = rndGen.globalSample01<vector>();
tangent = v - (v & direction_)*direction_;
magTangent = mag(tangent);
@ -323,7 +323,7 @@ void Foam::ConeNozzleInjection<CloudType>::setPositionAndCell
{
Random& rndGen = this->owner().rndGen();
scalar beta = mathematical::twoPi*rndGen.sample01<scalar>();
scalar beta = mathematical::twoPi*rndGen.globalSample01<scalar>();
normal_ = tanVec1_*cos(beta) + tanVec2_*sin(beta);
switch (injectionMethod_)