| 352 |
|
|
| 353 |
|
#ifdef IS_MPI |
| 354 |
|
void SimCreator::divideMolecules(SimInfo *info) { |
| 355 |
< |
double numerator; |
| 356 |
< |
double denominator; |
| 357 |
< |
double precast; |
| 358 |
< |
double x; |
| 359 |
< |
double y; |
| 360 |
< |
double a; |
| 355 |
> |
RealType numerator; |
| 356 |
> |
RealType denominator; |
| 357 |
> |
RealType precast; |
| 358 |
> |
RealType x; |
| 359 |
> |
RealType y; |
| 360 |
> |
RealType a; |
| 361 |
|
int old_atoms; |
| 362 |
|
int add_atoms; |
| 363 |
|
int new_atoms; |
| 469 |
|
// Pacc(x) = exp(- a * x) |
| 470 |
|
// where a = penalty / (average atoms per molecule) |
| 471 |
|
|
| 472 |
< |
x = (double)(new_atoms - nTarget); |
| 472 |
> |
x = (RealType)(new_atoms - nTarget); |
| 473 |
|
y = myRandom->rand(); |
| 474 |
|
|
| 475 |
|
if (y < exp(- a * x)) { |