18 |
|
#endif // is_mpi |
19 |
|
|
20 |
|
inline double roundMe( double x ){ |
21 |
< |
return ( x >= 0 ) ? floor( x + 0.5 ) : ceil( x - 0.5 ); |
21 |
> |
return ( x >= 0 ) ? floor( x + 0.5 ) : ceil( x - 0.5 ); |
22 |
|
} |
23 |
|
|
24 |
|
Thermo::Thermo( SimInfo* the_info ) { |
71 |
|
} |
72 |
|
#ifdef IS_MPI |
73 |
|
MPI_Allreduce(&kinetic,&kinetic_global,1,MPI_DOUBLE, |
74 |
< |
MPI_SUM, MPI_COMM_WORLD); |
74 |
> |
MPI_SUM, MPI_COMM_WORLD); |
75 |
|
kinetic = kinetic_global; |
76 |
|
#endif //is_mpi |
77 |
|
|
101 |
|
// Get total potential for entire system from MPI. |
102 |
|
#ifdef IS_MPI |
103 |
|
MPI_Allreduce(&potential_local,&potential,1,MPI_DOUBLE, |
104 |
< |
MPI_SUM, MPI_COMM_WORLD); |
104 |
> |
MPI_SUM, MPI_COMM_WORLD); |
105 |
|
#else |
106 |
|
potential = potential_local; |
107 |
|
#endif // is_mpi |
315 |
|
for (j = 0 ; j < 3; j++) { |
316 |
|
vbar = sqrt( 2.0 * kebar * I[j][j] ); |
317 |
|
aJ[j] = vbar * gaussStream->getGaussian(); |
318 |
< |
} |
318 |
> |
} |
319 |
|
} // else isLinear |
320 |
|
|
321 |
|
info->integrableObjects[vr]->setJ( aJ ); |