479 |
|
for (unsigned int j = 0; j < toposForAtom[atom1].size(); j++) { |
480 |
|
if (toposForAtom[atom1][j] == atom2) |
481 |
|
return topoDist[atom1][j]; |
482 |
< |
} |
482 |
> |
} |
483 |
|
return 0; |
484 |
|
} |
485 |
|
|
939 |
|
|
940 |
|
|
941 |
|
|
942 |
< |
int ForceMatrixDecomposition::getNAtomsInRow() { |
942 |
> |
int& ForceMatrixDecomposition::getNAtomsInRow() { |
943 |
|
#ifdef IS_MPI |
944 |
|
return nAtomsInRow_; |
945 |
|
#else |
950 |
|
/** |
951 |
|
* returns the list of atoms belonging to this group. |
952 |
|
*/ |
953 |
< |
vector<int> ForceMatrixDecomposition::getAtomsInGroupRow(int cg1){ |
953 |
> |
vector<int>& ForceMatrixDecomposition::getAtomsInGroupRow(int cg1){ |
954 |
|
#ifdef IS_MPI |
955 |
|
return groupListRow_[cg1]; |
956 |
|
#else |
958 |
|
#endif |
959 |
|
} |
960 |
|
|
961 |
< |
vector<int> ForceMatrixDecomposition::getAtomsInGroupColumn(int cg2){ |
961 |
> |
vector<int>& ForceMatrixDecomposition::getAtomsInGroupColumn(int cg2){ |
962 |
|
#ifdef IS_MPI |
963 |
|
return groupListCol_[cg2]; |
964 |
|
#else |
981 |
|
return d; |
982 |
|
} |
983 |
|
|
984 |
< |
Vector3d ForceMatrixDecomposition::getGroupVelocityColumn(int cg2){ |
984 |
> |
Vector3d& ForceMatrixDecomposition::getGroupVelocityColumn(int cg2){ |
985 |
|
#ifdef IS_MPI |
986 |
|
return cgColData.velocity[cg2]; |
987 |
|
#else |
989 |
|
#endif |
990 |
|
} |
991 |
|
|
992 |
< |
Vector3d ForceMatrixDecomposition::getAtomVelocityColumn(int atom2){ |
992 |
> |
Vector3d& ForceMatrixDecomposition::getAtomVelocityColumn(int atom2){ |
993 |
|
#ifdef IS_MPI |
994 |
|
return atomColData.velocity[atom2]; |
995 |
|
#else |
1027 |
|
return d; |
1028 |
|
} |
1029 |
|
|
1030 |
< |
RealType ForceMatrixDecomposition::getMassFactorRow(int atom1) { |
1030 |
> |
RealType& ForceMatrixDecomposition::getMassFactorRow(int atom1) { |
1031 |
|
#ifdef IS_MPI |
1032 |
|
return massFactorsRow[atom1]; |
1033 |
|
#else |
1035 |
|
#endif |
1036 |
|
} |
1037 |
|
|
1038 |
< |
RealType ForceMatrixDecomposition::getMassFactorColumn(int atom2) { |
1038 |
> |
RealType& ForceMatrixDecomposition::getMassFactorColumn(int atom2) { |
1039 |
|
#ifdef IS_MPI |
1040 |
|
return massFactorsCol[atom2]; |
1041 |
|
#else |
1058 |
|
return d; |
1059 |
|
} |
1060 |
|
|
1061 |
< |
vector<int> ForceMatrixDecomposition::getExcludesForAtom(int atom1) { |
1061 |
> |
vector<int>& ForceMatrixDecomposition::getExcludesForAtom(int atom1) { |
1062 |
|
return excludesForAtom[atom1]; |
1063 |
|
} |
1064 |
|
|