61 |
|
|
62 |
|
integer, intent(in) :: atom1, atom2 |
63 |
|
real (kind = dp), intent(in) :: rij |
64 |
< |
real (kind = dp), dimension(3,getNlocal()) :: u_l |
64 |
> |
real (kind = dp), dimension(3,nLocal) :: u_l |
65 |
|
|
66 |
|
integer :: me1, me2 |
67 |
|
real (kind = dp) :: taper, mu1, mu2 |
134 |
|
|
135 |
|
integer, intent(in) :: atom1 |
136 |
|
real(kind=dp), intent(in) :: mu1 |
137 |
< |
real(kind=dp), dimension(3,getNlocal()) :: u_l |
137 |
> |
real(kind=dp), dimension(3,nLocal) :: u_l |
138 |
|
|
139 |
|
!! should work for both MPI and non-MPI version since this is not pairwise. |
140 |
|
rf(1,atom1) = rf(1,atom1) + u_l(1,atom1)*mu1 |
150 |
|
real (kind=dp), intent(in) :: mu1 |
151 |
|
real (kind=dp), intent(inout) :: rfpot |
152 |
|
logical, intent(in) :: do_pot |
153 |
< |
real (kind = dp), dimension(3,getNlocal()) :: u_l |
154 |
< |
real (kind = dp), dimension(3,getNlocal()) :: t |
153 |
> |
real (kind = dp), dimension(3,nLocal) :: u_l |
154 |
> |
real (kind = dp), dimension(3,nLocal) :: t |
155 |
|
|
156 |
|
if (.not.rf_initialized) then |
157 |
|
write(default_error,*) 'Reaction field not initialized!' |
182 |
|
integer, intent(in) :: atom1, atom2 |
183 |
|
real(kind=dp), dimension(3), intent(in) :: d |
184 |
|
real(kind=dp), intent(in) :: rij |
185 |
< |
real( kind = dp ), dimension(3,getNlocal()) :: u_l |
186 |
< |
real( kind = dp ), dimension(3,getNlocal()) :: f |
185 |
> |
real( kind = dp ), dimension(3,nLocal) :: u_l |
186 |
> |
real( kind = dp ), dimension(3,nLocal) :: f |
187 |
|
logical, intent(in) :: do_stress |
188 |
|
|
189 |
|
real (kind = dp), dimension(3) :: ul1 |
190 |
|
real (kind = dp), dimension(3) :: ul2 |
191 |
|
real (kind = dp) :: dtdr |
192 |
|
real (kind = dp) :: dudx, dudy, dudz, u1dotu2 |
193 |
< |
integer :: me1, me2 |
193 |
> |
integer :: me1, me2, id1, id2 |
194 |
|
real (kind = dp) :: mu1, mu2 |
195 |
|
|
196 |
|
if (.not.rf_initialized) then |
257 |
|
#endif |
258 |
|
|
259 |
|
if (do_stress) then |
260 |
– |
if (molMembershipList(atom1) .ne. molMembershipList(atom2)) then |
260 |
|
|
261 |
+ |
#ifdef IS_MPI |
262 |
+ |
id1 = tagRow(atom1) |
263 |
+ |
id2 = tagColumn(atom2) |
264 |
+ |
#else |
265 |
+ |
id1 = atom1 |
266 |
+ |
id2 = atom2 |
267 |
+ |
#endif |
268 |
+ |
|
269 |
+ |
if (molMembershipList(id1) .ne. molMembershipList(id2)) then |
270 |
+ |
|
271 |
|
! because the d vector is the rj - ri vector, and |
272 |
|
! because dudx, dudy, and dudz are the |
273 |
|
! (positive) force on atom i (negative on atom j) we need |