ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/md_code/Thermo.cpp
(Generate patch)

Comparing trunk/mdtools/md_code/Thermo.cpp (file contents):
Revision 253 by chuckv, Thu Jan 30 15:20:21 2003 UTC vs.
Revision 261 by chuckv, Mon Feb 3 21:15:59 2003 UTC

# Line 3 | Line 3 | using namespace std;
3   using namespace std;
4  
5   #ifdef IS_MPI
6 + #include <mpi.h>
7   #include <mpi++.h>
8   #endif //is_mpi
9  
# Line 17 | Line 18 | Thermo::Thermo( SimInfo* the_entry_plug ) {
18    entry_plug = the_entry_plug;
19    int baseSeed = BASE_SEED;
20    
20  cerr << "creating thermo stream\n";
21    gaussStream = new gaussianSPRNG( baseSeed );
22  cerr << "created thermo stream\n";
22   }
23  
24   Thermo::~Thermo(){
# Line 68 | Line 67 | double Thermo::getKinetic(){
67      }
68    }
69   #ifdef IS_MPI
70 <  MPI_COMM_WORLD.Allreduce(&kinetic,&kinetic_global,1,MPI_DOUBLE,MPI_SUM);
70 >  MPI::COMM_WORLD.Allreduce(&kinetic,&kinetic_global,1,MPI_DOUBLE,MPI_SUM);
71    kinetic = kinetic_global;
72   #endif //is_mpi
73  
# Line 99 | Line 98 | double Thermo::getPotential(){
98  
99    // Get total potential for entire system from MPI.
100   #ifdef IS_MPI
101 <  MPI_COMM_WORLD.Allreduce(&potential,&potential_global,1,MPI_DOUBLE,MPI_SUM);
101 >  MPI::COMM_WORLD.Allreduce(&potential,&potential_global,1,MPI_DOUBLE,MPI_SUM);
102    potential = potential_global;
103   #endif // is_mpi
104  
# Line 190 | Line 189 | void Thermo::velocitize() {
189   #ifdef IS_MPI
190   #error "SPRNG random number generator must be used for MPI"
191   #else
192 < #warning "Using drand48 for random number generation"
192 >    // warning "Using drand48 for random number generation"
193   #endif  // is_mpi
194  
195      x = drand48();
# Line 266 | Line 265 | void Thermo::velocitize() {
265   #ifdef IS_MPI
266   #error "SPRNG random number generator must be used for MPI"
267   #else  // is_mpi
268 < #warning "Using drand48 for random number generation"
268 >        //warning "Using drand48 for random number generation"
269   #endif   // is_MPI
270          
271          vbar = sqrt( 2.0 * kebar * dAtom->getIxx() );

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines