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

Comparing trunk/OOPSE-2.0/src/brains/Thermo.cpp (file contents):
Revision 2238 by tim, Sun May 22 21:05:15 2005 UTC vs.
Revision 2532 by tim, Fri Dec 30 21:25:56 2005 UTC

# Line 110 | Line 110 | namespace oopse {
110    double Thermo::getPotential() {
111      double potential = 0.0;
112      Snapshot* curSnapshot = info_->getSnapshotManager()->getCurrentSnapshot();
113 <    double potential_local = curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL] +
114 <      curSnapshot->statData[Stats::SHORT_RANGE_POTENTIAL] ;
113 >    double shortRangePot_local =  curSnapshot->statData[Stats::SHORT_RANGE_POTENTIAL] ;
114  
115      // Get total potential for entire system from MPI.
116  
117   #ifdef IS_MPI
118  
119 <    MPI_Allreduce(&potential_local, &potential, 1, MPI_DOUBLE, MPI_SUM,
119 >    MPI_Allreduce(&shortRangePot_local, &potential, 1, MPI_DOUBLE, MPI_SUM,
120                    MPI_COMM_WORLD);
121 +    potential += curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL];
122  
123   #else
124  
125 <    potential = potential_local;
125 >    potential = shortRangePot_local + curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL];
126  
127   #endif // is_mpi
128  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines