| 637 |
|
// Collect from all nodes. This should eventually be moved into a |
| 638 |
|
// SystemDecomposition, but this is a better place than in |
| 639 |
|
// Thermo to do the collection. |
| 640 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &bondPotential, 1, MPI::REALTYPE, |
| 641 |
< |
MPI::SUM); |
| 642 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &bendPotential, 1, MPI::REALTYPE, |
| 643 |
< |
MPI::SUM); |
| 644 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &torsionPotential, 1, |
| 645 |
< |
MPI::REALTYPE, MPI::SUM); |
| 646 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &inversionPotential, 1, |
| 647 |
< |
MPI::REALTYPE, MPI::SUM); |
| 640 |
> |
|
| 641 |
> |
MPI_Allreduce(MPI_IN_PLACE, &bondPotential, 1, MPI_REALTYPE, |
| 642 |
> |
MPI_SUM, MPI_COMM_WORLD); |
| 643 |
> |
MPI_Allreduce(MPI_IN_PLACE, &bendPotential, 1, MPI_REALTYPE, |
| 644 |
> |
MPI_SUM, MPI_COMM_WORLD); |
| 645 |
> |
MPI_Allreduce(MPI_IN_PLACE, &torsionPotential, 1, |
| 646 |
> |
MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
| 647 |
> |
MPI_Allreduce(MPI_IN_PLACE, &inversionPotential, 1, |
| 648 |
> |
MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
| 649 |
|
#endif |
| 650 |
|
|
| 651 |
|
Snapshot* curSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); |
| 667 |
|
DataStorage* config = &(curSnapshot->atomData); |
| 668 |
|
DataStorage* cgConfig = &(curSnapshot->cgData); |
| 669 |
|
|
| 670 |
+ |
|
| 671 |
|
//calculate the center of mass of cutoff group |
| 672 |
|
|
| 673 |
|
SimInfo::MoleculeIterator mi; |
| 711 |
|
RealType dVdFQ1(0.0); |
| 712 |
|
RealType dVdFQ2(0.0); |
| 713 |
|
potVec longRangePotential(0.0); |
| 714 |
+ |
RealType reciprocalPotential(0.0); |
| 715 |
|
potVec workPot(0.0); |
| 716 |
|
potVec exPot(0.0); |
| 717 |
|
Vector3d eField1(0.0); |
| 772 |
|
rgrpsq = d_grp.lengthSquare(); |
| 773 |
|
|
| 774 |
|
if (rgrpsq < rCutSq) { |
| 772 |
– |
|
| 775 |
|
if (iLoop == PAIR_LOOP) { |
| 776 |
|
vij = 0.0; |
| 777 |
|
fij.zero(); |
| 828 |
|
|
| 829 |
|
r = sqrt( *(idat.r2) ); |
| 830 |
|
idat.rij = &r; |
| 831 |
< |
|
| 831 |
> |
|
| 832 |
|
if (iLoop == PREPAIR_LOOP) { |
| 833 |
|
interactionMan_->doPrePair(idat); |
| 834 |
|
} else { |
| 928 |
|
// collects pairwise information |
| 929 |
|
fDecomp_->collectData(); |
| 930 |
|
if (cutoffMethod_ == EWALD_FULL) { |
| 931 |
< |
interactionMan_->doReciprocalSpaceSum(longRangePotential); |
| 931 |
> |
interactionMan_->doReciprocalSpaceSum(reciprocalPotential); |
| 932 |
> |
|
| 933 |
> |
curSnapshot->setReciprocalPotential(reciprocalPotential); |
| 934 |
|
} |
| 935 |
|
|
| 936 |
|
if (info_->requiresSelfCorrection()) { |
| 978 |
|
} |
| 979 |
|
|
| 980 |
|
#ifdef IS_MPI |
| 981 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, stressTensor.getArrayPointer(), 9, |
| 982 |
< |
MPI::REALTYPE, MPI::SUM); |
| 981 |
> |
MPI_Allreduce(MPI_IN_PLACE, stressTensor.getArrayPointer(), 9, |
| 982 |
> |
MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
| 983 |
|
#endif |
| 984 |
|
curSnapshot->setStressTensor(stressTensor); |
| 985 |
|
|