| 291 |
|
kineticFlux_ = 0.0; |
| 292 |
|
} |
| 293 |
|
if (hasMomentumFluxVector) { |
| 294 |
< |
momentumFluxVector_ = rnemdParams->getMomentumFluxVector(); |
| 294 |
> |
std::vector<RealType> mf = rnemdParams->getMomentumFluxVector(); |
| 295 |
> |
if (mf.size() != 3) { |
| 296 |
> |
sprintf(painCave.errMsg, |
| 297 |
> |
"RNEMD: Incorrect number of parameters specified for momentumFluxVector.\n" |
| 298 |
> |
"\tthere should be 3 parameters, but %lu were specified.\n", |
| 299 |
> |
mf.size()); |
| 300 |
> |
painCave.isFatal = 1; |
| 301 |
> |
simError(); |
| 302 |
> |
} |
| 303 |
> |
momentumFluxVector_.x() = mf[0]; |
| 304 |
> |
momentumFluxVector_.y() = mf[1]; |
| 305 |
> |
momentumFluxVector_.z() = mf[2]; |
| 306 |
|
} else { |
| 307 |
|
momentumFluxVector_ = V3Zero; |
| 308 |
|
if (hasMomentumFlux) { |
| 328 |
|
} |
| 329 |
|
} |
| 330 |
|
if (hasAngularMomentumFluxVector) { |
| 331 |
< |
angularMomentumFluxVector_ = rnemdParams->getAngularMomentumFluxVector(); |
| 331 |
> |
std::vector<RealType> amf = rnemdParams->getAngularMomentumFluxVector(); |
| 332 |
> |
if (amf.size() != 3) { |
| 333 |
> |
sprintf(painCave.errMsg, |
| 334 |
> |
"RNEMD: Incorrect number of parameters specified for angularMomentumFluxVector.\n" |
| 335 |
> |
"\tthere should be 3 parameters, but %lu were specified.\n", |
| 336 |
> |
amf.size()); |
| 337 |
> |
painCave.isFatal = 1; |
| 338 |
> |
simError(); |
| 339 |
> |
} |
| 340 |
> |
angularMomentumFluxVector_.x() = amf[0]; |
| 341 |
> |
angularMomentumFluxVector_.y() = amf[1]; |
| 342 |
> |
angularMomentumFluxVector_.z() = amf[2]; |
| 343 |
|
} else { |
| 344 |
|
angularMomentumFluxVector_ = V3Zero; |
| 345 |
|
if (hasAngularMomentumFlux) { |
| 370 |
|
} |
| 371 |
|
|
| 372 |
|
if (hasCoordinateOrigin) { |
| 373 |
< |
coordinateOrigin_ = rnemdParams->getCoordinateOrigin(); |
| 373 |
> |
std::vector<RealType> co = rnemdParams->getCoordinateOrigin(); |
| 374 |
> |
if (co.size() != 3) { |
| 375 |
> |
sprintf(painCave.errMsg, |
| 376 |
> |
"RNEMD: Incorrect number of parameters specified for coordinateOrigin.\n" |
| 377 |
> |
"\tthere should be 3 parameters, but %lu were specified.\n", |
| 378 |
> |
co.size()); |
| 379 |
> |
painCave.isFatal = 1; |
| 380 |
> |
simError(); |
| 381 |
> |
} |
| 382 |
> |
coordinateOrigin_.x() = co[0]; |
| 383 |
> |
coordinateOrigin_.y() = co[1]; |
| 384 |
> |
coordinateOrigin_.z() = co[2]; |
| 385 |
|
} else { |
| 386 |
|
coordinateOrigin_ = V3Zero; |
| 387 |
|
} |
| 890 |
|
|
| 891 |
|
Vector3d min_vel; |
| 892 |
|
Vector3d max_vel = max_sd->getVel(); |
| 893 |
< |
MPI_Status* status; |
| 893 |
> |
MPI_Status status; |
| 894 |
|
|
| 895 |
|
// point-to-point swap of the velocity vector |
| 896 |
|
MPI_Sendrecv(max_vel.getArrayPointer(), 3, MPI_REALTYPE, |
| 897 |
|
min_vals.rank, 0, |
| 898 |
|
min_vel.getArrayPointer(), 3, MPI_REALTYPE, |
| 899 |
< |
min_vals.rank, 0, MPI_COMM_WORLD, status); |
| 899 |
> |
min_vals.rank, 0, MPI_COMM_WORLD, &status); |
| 900 |
|
|
| 901 |
|
switch(rnemdFluxType_) { |
| 902 |
|
case rnemdKE : |
| 911 |
|
MPI_REALTYPE, min_vals.rank, 1, |
| 912 |
|
min_angMom.getArrayPointer(), 3, |
| 913 |
|
MPI_REALTYPE, min_vals.rank, 1, |
| 914 |
< |
MPI_COMM_WORLD, status); |
| 914 |
> |
MPI_COMM_WORLD, &status); |
| 915 |
|
|
| 916 |
|
max_sd->setJ(min_angMom); |
| 917 |
|
} |
| 936 |
|
|
| 937 |
|
Vector3d max_vel; |
| 938 |
|
Vector3d min_vel = min_sd->getVel(); |
| 939 |
< |
MPI_Status* status; |
| 939 |
> |
MPI_Status status; |
| 940 |
|
|
| 941 |
|
// point-to-point swap of the velocity vector |
| 942 |
|
MPI_Sendrecv(min_vel.getArrayPointer(), 3, MPI_REALTYPE, |
| 943 |
|
max_vals.rank, 0, |
| 944 |
|
max_vel.getArrayPointer(), 3, MPI_REALTYPE, |
| 945 |
< |
max_vals.rank, 0, MPI_COMM_WORLD, status); |
| 945 |
> |
max_vals.rank, 0, MPI_COMM_WORLD, &status); |
| 946 |
|
|
| 947 |
|
switch(rnemdFluxType_) { |
| 948 |
|
case rnemdKE : |
| 957 |
|
MPI_REALTYPE, max_vals.rank, 1, |
| 958 |
|
max_angMom.getArrayPointer(), 3, |
| 959 |
|
MPI_REALTYPE, max_vals.rank, 1, |
| 960 |
< |
MPI_COMM_WORLD, status); |
| 960 |
> |
MPI_COMM_WORLD, &status); |
| 961 |
|
|
| 962 |
|
min_sd->setJ(max_angMom); |
| 963 |
|
} |
| 1788 |
|
#if defined(HAVE_QHULL) |
| 1789 |
|
ConvexHull* surfaceMeshA = new ConvexHull(); |
| 1790 |
|
surfaceMeshA->computeHull(aSites); |
| 1791 |
+ |
cerr << "flag1\n"; |
| 1792 |
|
areaA = surfaceMeshA->getArea(); |
| 1793 |
+ |
cerr << "Flag2 " << areaA << "\n"; |
| 1794 |
|
delete surfaceMeshA; |
| 1795 |
|
#else |
| 1796 |
|
sprintf( painCave.errMsg, |