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 252 by chuckv, Tue Jan 28 22:16:55 2003 UTC vs.
Revision 253 by chuckv, Thu Jan 30 15:20:21 2003 UTC

# Line 1 | Line 1
1   #include <cmath>
2   #include <iostream>
3 + using namespace std;
4  
4
5   #ifdef IS_MPI
6   #include <mpi++.h>
7   #endif //is_mpi
# Line 16 | Line 16 | Thermo::Thermo( SimInfo* the_entry_plug ) {
16   Thermo::Thermo( SimInfo* the_entry_plug ) {
17    entry_plug = the_entry_plug;
18    int baseSeed = BASE_SEED;
19 +  
20 +  cerr << "creating thermo stream\n";
21    gaussStream = new gaussianSPRNG( baseSeed );
22 +  cerr << "created thermo stream\n";
23   }
24  
25   Thermo::~Thermo(){
# Line 164 | Line 167 | void Thermo::velocitize() {
167    ndf = ndfRaw - n_constraints - 3;
168    kebar = kb * temperature * (double)ndf / ( 2.0 * (double)ndfRaw );
169    
167  printf("Entered Velocitize\n");
170    for(vr = 0; vr < n_atoms; vr++){
171      
172      // uses equipartition theory to solve for vbar in angstrom/fs
# Line 202 | Line 204 | void Thermo::velocitize() {
204      x = drand48();
205      y = drand48();
206      vz = vbar * sqrt( -2.0 * log(x)) * cos(2 * M_PI * y);
207 <    printf("Setting new velocities vx: %f\n",vx);
207 >
208   #endif // use_spring
209  
210   #ifdef USE_SPRNG

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines