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

Comparing trunk/OOPSE/libmdtools/Thermo.cpp (file contents):
Revision 423 by mmeineke, Thu Mar 27 20:12:15 2003 UTC vs.
Revision 444 by gezelter, Thu Apr 3 13:43:02 2003 UTC

# Line 10 | Line 10 | using namespace std;
10   #include "Thermo.hpp"
11   #include "SRI.hpp"
12   #include "Integrator.hpp"
13 + #include "simError.h"
14  
15   #ifdef IS_MPI
16   #define __C
# Line 86 | Line 87 | double Thermo::getPotential(){
87    double potential_local;
88    double potential;
89    int el, nSRI;
90 <  SRI** sris;
90 >  Molecule* molecules;
91  
92 <  sris = entry_plug->sr_interactions;
92 >  molecules = entry_plug->molecules;
93    nSRI = entry_plug->n_SRI;
94  
95    potential_local = 0.0;
96 +  potential = 0.0;
97    potential_local += entry_plug->lrPot;
98  
99    for( el=0; el<entry_plug->n_mol; el++ ){    
100 <    potential_local += entry_plug->molecules[el]->get_potential();
100 >    potential_local += molecules[el].getPotential();
101    }
102 +
103 + #ifdef IS_MPI
104 +  /*
105 +  std::cerr << "node " << worldRank << ": before LONG RANGE pot = " << entry_plug->lrPot
106 +            << "; pot_local = " << potential_local
107 +            << "; pot = " << potential << "\n";
108 +  */
109 + #endif
110  
111    // Get total potential for entire system from MPI.
112   #ifdef IS_MPI
# Line 105 | Line 115 | double Thermo::getPotential(){
115    potential = potential_local;
116   #endif // is_mpi
117  
118 + #ifdef IS_MPI
119 +  /*
120 +  std::cerr << "node " << worldRank << ": after pot = " << potential << "\n";
121 +  */
122 + #endif
123 +
124    return potential;
125   }
126  
# Line 196 | Line 212 | void Thermo::velocitize() {
212  
213      av2 = 2.0 * kebar / atoms[vr]->getMass();
214      vbar = sqrt( av2 );
215 <
215 >
216   //     vbar = sqrt( 8.31451e-7 * temperature / atoms[vr]->getMass() );
217      
218      // picks random velocities from a gaussian distribution

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines