ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/brains/Thermo.cpp
(Generate patch)

Comparing branches/development/src/brains/Thermo.cpp (file contents):
Revision 1733 by jmichalk, Tue Jun 5 17:48:40 2012 UTC vs.
Revision 1760 by gezelter, Thu Jun 21 19:26:46 2012 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines