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 1764 by gezelter, Tue Jul 3 18:32:27 2012 UTC vs.
Revision 1825 by gezelter, Wed Jan 9 19:27:52 2013 UTC

# Line 54 | Line 54
54   #include "types/FixedChargeAdapter.hpp"
55   #include "types/FluctuatingChargeAdapter.hpp"
56   #include "types/MultipoleAdapter.hpp"
57 + #ifdef HAVE_QHULL
58   #include "math/ConvexHull.hpp"
59   #include "math/AlphaHull.hpp"
60 + #endif
61  
62   using namespace std;
63   namespace OpenMD {
# Line 322 | Line 324 | namespace OpenMD {
324        Molecule* mol;
325        Atom* atom;
326        RealType charge;
325      RealType moment(0.0);
327        Vector3d ri(0.0);
328        Vector3d dipoleVector(0.0);
329        Vector3d nPos(0.0);
# Line 370 | Line 371 | namespace OpenMD {
371              pCount++;
372            }
373            
374 <          MultipoleAdapter ma = MultipoleAdapter(atom->getAtomType());
375 <          if (ma.isDipole() ) {
375 <            Vector3d u_i = atom->getElectroFrame().getColumn(2);
376 <            moment = ma.getDipoleMoment();
377 <            moment *= debyeToCm;
378 <            dipoleVector += u_i * moment;
374 >          if (atom->isDipole()) {
375 >            dipoleVector += atom->getDipole() * debyeToCm;
376            }
377          }
378        }
# Line 442 | Line 439 | namespace OpenMD {
439      RealType kinetic;
440      RealType potential;
441      RealType eatom;
445    RealType AvgE_a_ = 0;
442      // Convective portion of the heat flux
443      Vector3d heatFluxJc = V3Zero;
444  
# Line 830 | Line 826 | namespace OpenMD {
826            data[0] = pos1.x();
827            data[1] = pos1.y();
828            data[2] = pos1.z();          
829 <          MPI_Bcast(data, 3, MPI_REALTYPE, proc1, MPI_COMM_WORLD);
829 >          MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc1);
830          } else {
831 <          MPI_Bcast(data, 3, MPI_REALTYPE, proc1, MPI_COMM_WORLD);
831 >          MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc1);
832            pos1 = Vector3d(data);
833          }
834  
# Line 841 | Line 837 | namespace OpenMD {
837            pos2 = sd2->getPos();
838            data[0] = pos2.x();
839            data[1] = pos2.y();
840 <          data[2] = pos2.z();          
841 <          MPI_Bcast(data, 3, MPI_REALTYPE, proc2, MPI_COMM_WORLD);
840 >          data[2] = pos2.z();  
841 >          MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc2);
842          } else {
843 <          MPI_Bcast(data, 3, MPI_REALTYPE, proc2, MPI_COMM_WORLD);
843 >          MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc2);
844            pos2 = Vector3d(data);
845          }
846   #else
# Line 864 | Line 860 | namespace OpenMD {
860  
861    RealType Thermo::getHullVolume(){
862      Snapshot* snap = info_->getSnapshotManager()->getCurrentSnapshot();
867    
868    if (!snap->hasHullVolume) {
863  
864 + #ifdef HAVE_QHULL    
865 +    if (!snap->hasHullVolume) {
866        Hull* surfaceMesh_;
867  
868        Globals* simParams = info_->getSimParams();
# Line 902 | Line 898 | namespace OpenMD {
898        snap->setHullVolume(surfaceMesh_->getVolume());
899      }
900      return snap->getHullVolume();
901 <  }  
901 > #else
902 >    return 0.0;
903 > #endif
904 >  }
905   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines