| 790 |
|
set<AtomType*>::iterator i; |
| 791 |
|
set<AtomType*> atomTypes; |
| 792 |
|
atomTypes = getSimulatedAtomTypes(); |
| 793 |
< |
int usesElectrostatic = 0; |
| 794 |
< |
int usesMetallic = 0; |
| 795 |
< |
int usesDirectional = 0; |
| 796 |
< |
int usesFluctuatingCharges = 0; |
| 793 |
> |
bool usesElectrostatic = false; |
| 794 |
> |
bool usesMetallic = false; |
| 795 |
> |
bool usesDirectional = false; |
| 796 |
> |
bool usesFluctuatingCharges = false; |
| 797 |
|
//loop over all of the atom types |
| 798 |
|
for (i = atomTypes.begin(); i != atomTypes.end(); ++i) { |
| 799 |
|
usesElectrostatic |= (*i)->isElectrostatic(); |
| 802 |
|
usesFluctuatingCharges |= (*i)->isFluctuatingCharge(); |
| 803 |
|
} |
| 804 |
|
|
| 805 |
< |
#ifdef IS_MPI |
| 806 |
< |
int temp; |
| 807 |
< |
temp = usesDirectional; |
| 808 |
< |
MPI_Allreduce(&temp, &usesDirectionalAtoms_, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD); |
| 809 |
< |
|
| 805 |
> |
#ifdef IS_MPI |
| 806 |
> |
bool temp; |
| 807 |
> |
temp = usesDirectional; |
| 808 |
> |
MPI::COMM_WORLD.Allreduce(&temp, &usesDirectionalAtoms_, 1, MPI::BOOL, |
| 809 |
> |
MPI::LOR); |
| 810 |
> |
|
| 811 |
|
temp = usesMetallic; |
| 812 |
< |
MPI_Allreduce(&temp, &usesMetallicAtoms_, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD); |
| 812 |
> |
MPI::COMM_WORLD.Allreduce(&temp, &usesMetallicAtoms_, 1, MPI::BOOL, |
| 813 |
> |
MPI::LOR); |
| 814 |
|
|
| 815 |
|
temp = usesElectrostatic; |
| 816 |
< |
MPI_Allreduce(&temp, &usesElectrostaticAtoms_, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD); |
| 816 |
> |
MPI::COMM_WORLD.Allreduce(&temp, &usesElectrostaticAtoms_, 1, MPI::BOOL, |
| 817 |
> |
MPI::LOR); |
| 818 |
|
|
| 819 |
|
temp = usesFluctuatingCharges; |
| 820 |
< |
MPI_Allreduce(&temp, &usesFluctuatingCharges_, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD); |
| 820 |
> |
MPI::COMM_WORLD.Allreduce(&temp, &usesFluctuatingCharges_, 1, MPI::BOOL, |
| 821 |
> |
MPI::LOR); |
| 822 |
|
#else |
| 823 |
|
|
| 824 |
|
usesDirectionalAtoms_ = usesDirectional; |