--- trunk/OOPSE/libmdtools/Thermo.cpp 2003/03/27 21:07:14 428 +++ trunk/OOPSE/libmdtools/Thermo.cpp 2003/03/31 21:50:59 438 @@ -10,6 +10,7 @@ using namespace std; #include "Thermo.hpp" #include "SRI.hpp" #include "Integrator.hpp" +#include "simError.h" #ifdef IS_MPI #define __C @@ -92,11 +93,20 @@ double Thermo::getPotential(){ nSRI = entry_plug->n_SRI; potential_local = 0.0; + potential = 0.0; potential_local += entry_plug->lrPot; for( el=0; eln_mol; el++ ){ potential_local += molecules[el].getPotential(); } + +#ifdef IS_MPI + /* + std::cerr << "node " << worldRank << ": before LONG RANGE pot = " << entry_plug->lrPot + << "; pot_local = " << potential_local + << "; pot = " << potential << "\n"; + */ +#endif // Get total potential for entire system from MPI. #ifdef IS_MPI @@ -105,6 +115,12 @@ double Thermo::getPotential(){ potential = potential_local; #endif // is_mpi +#ifdef IS_MPI + /* + std::cerr << "node " << worldRank << ": after pot = " << potential << "\n"; + */ +#endif + return potential; }