2 // Calculation of the mean radius based on SMR rs. Coefficient
3 // factorGamma depends on nExp.
4 scalar factorGamma = 1.;
5 scalar delta = rs/factorGamma;
7 scalar minValue = min(d/2.0, 0.04*rs);
8 scalar maxValue = rs*4.0;
10 scalar range = maxValue - minValue;
12 if (maxValue - minValue < SMALL)
19 FixedList<scalar, 100> rrd;
21 scalar probFactorMin = exp(-pow(minValue/delta, nExp));
22 scalar probFactorMax = exp(-pow(maxValue/delta, nExp));
23 scalar probFactor = 1./(probFactorMin - probFactorMax);
27 scalar xx = minValue + range*n/100;
28 rrd[n] = (probFactorMin - exp(-pow(xx/delta, nExp)))*probFactor;
33 scalar random = rndGen.sample01<scalar>();
35 while (!found && (n<100))
45 rNew = minValue + range*(n - 0.5)/100.0;