Skip to content

BUG: ConeInjection/ConeNozzleInjection injectionPosition in parallel

The use of rndGen.sample01 instead of rndGen.globalSample01 for calculating the tanVec1_, tanVec2_ and beta angle leads to every processor having a different reference frame and thus the injection position will be different on every processor.

In the .C files, just change these snippets to using globalSample

===================

while(magTangent < SMALL)
{
    vector v = rndGen.globalSample01<vector>();

    tangent = v - (v & direction_)*direction_;
    magTangent = mag(tangent);
}

===================

and

scalar beta = mathematical::twoPi*rndGen.globalSample01<scalar>();

===================

Edited by Admin