--- branches/development/src/brains/Thermo.cpp 2012/07/06 22:01:58 1767 +++ branches/development/src/brains/Thermo.cpp 2013/01/09 19:27:52 1825 @@ -324,7 +324,6 @@ namespace OpenMD { Molecule* mol; Atom* atom; RealType charge; - RealType moment(0.0); Vector3d ri(0.0); Vector3d dipoleVector(0.0); Vector3d nPos(0.0); @@ -372,12 +371,8 @@ namespace OpenMD { pCount++; } - MultipoleAdapter ma = MultipoleAdapter(atom->getAtomType()); - if (ma.isDipole() ) { - Vector3d u_i = atom->getElectroFrame().getColumn(2); - moment = ma.getDipoleMoment(); - moment *= debyeToCm; - dipoleVector += u_i * moment; + if (atom->isDipole()) { + dipoleVector += atom->getDipole() * debyeToCm; } } } @@ -444,7 +439,6 @@ namespace OpenMD { RealType kinetic; RealType potential; RealType eatom; - RealType AvgE_a_ = 0; // Convective portion of the heat flux Vector3d heatFluxJc = V3Zero; @@ -832,9 +826,9 @@ namespace OpenMD { data[0] = pos1.x(); data[1] = pos1.y(); data[2] = pos1.z(); - MPI_Bcast(data, 3, MPI_REALTYPE, proc1, MPI_COMM_WORLD); + MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc1); } else { - MPI_Bcast(data, 3, MPI_REALTYPE, proc1, MPI_COMM_WORLD); + MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc1); pos1 = Vector3d(data); } @@ -843,10 +837,10 @@ namespace OpenMD { pos2 = sd2->getPos(); data[0] = pos2.x(); data[1] = pos2.y(); - data[2] = pos2.z(); - MPI_Bcast(data, 3, MPI_REALTYPE, proc2, MPI_COMM_WORLD); + data[2] = pos2.z(); + MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc2); } else { - MPI_Bcast(data, 3, MPI_REALTYPE, proc2, MPI_COMM_WORLD); + MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc2); pos2 = Vector3d(data); } #else