| 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 { |
| 372 |
|
pCount++; |
| 373 |
|
} |
| 374 |
|
|
| 375 |
< |
MultipoleAdapter ma = MultipoleAdapter(atom->getAtomType()); |
| 376 |
< |
if (ma.isDipole() ) { |
| 375 |
< |
Vector3d u_i = atom->getElectroFrame().getColumn(2); |
| 376 |
< |
moment = ma.getDipoleMoment(); |
| 377 |
< |
moment *= debyeToCm; |
| 378 |
< |
dipoleVector += u_i * moment; |
| 375 |
> |
if (atom->isDipole()) { |
| 376 |
> |
dipoleVector += atom->getDipole() * debyeToCm; |
| 377 |
|
} |
| 378 |
|
} |
| 379 |
|
} |
| 828 |
|
data[0] = pos1.x(); |
| 829 |
|
data[1] = pos1.y(); |
| 830 |
|
data[2] = pos1.z(); |
| 831 |
< |
MPI_Bcast(data, 3, MPI_REALTYPE, proc1, MPI_COMM_WORLD); |
| 831 |
> |
MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc1); |
| 832 |
|
} else { |
| 833 |
< |
MPI_Bcast(data, 3, MPI_REALTYPE, proc1, MPI_COMM_WORLD); |
| 833 |
> |
MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc1); |
| 834 |
|
pos1 = Vector3d(data); |
| 835 |
|
} |
| 836 |
|
|
| 839 |
|
pos2 = sd2->getPos(); |
| 840 |
|
data[0] = pos2.x(); |
| 841 |
|
data[1] = pos2.y(); |
| 842 |
< |
data[2] = pos2.z(); |
| 843 |
< |
MPI_Bcast(data, 3, MPI_REALTYPE, proc2, MPI_COMM_WORLD); |
| 842 |
> |
data[2] = pos2.z(); |
| 843 |
> |
MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc2); |
| 844 |
|
} else { |
| 845 |
< |
MPI_Bcast(data, 3, MPI_REALTYPE, proc2, MPI_COMM_WORLD); |
| 845 |
> |
MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc2); |
| 846 |
|
pos2 = Vector3d(data); |
| 847 |
|
} |
| 848 |
|
#else |
| 862 |
|
|
| 863 |
|
RealType Thermo::getHullVolume(){ |
| 864 |
|
Snapshot* snap = info_->getSnapshotManager()->getCurrentSnapshot(); |
| 867 |
– |
|
| 868 |
– |
if (!snap->hasHullVolume) { |
| 865 |
|
|
| 866 |
+ |
#ifdef HAVE_QHULL |
| 867 |
+ |
if (!snap->hasHullVolume) { |
| 868 |
|
Hull* surfaceMesh_; |
| 869 |
|
|
| 870 |
|
Globals* simParams = info_->getSimParams(); |
| 900 |
|
snap->setHullVolume(surfaceMesh_->getVolume()); |
| 901 |
|
} |
| 902 |
|
return snap->getHullVolume(); |
| 903 |
< |
} |
| 903 |
> |
#else |
| 904 |
> |
return 0.0; |
| 905 |
> |
#endif |
| 906 |
> |
} |
| 907 |
|
} |