4 |
|
|
5 |
|
!! @author Charles F. Vardeman II |
6 |
|
!! @author Matthew Meineke |
7 |
< |
!! @version $Id: do_Forces.F90,v 1.3 2003-03-24 18:33:51 mmeineke Exp $, $Date: 2003-03-24 18:33:51 $, $Name: not supported by cvs2svn $, $Revision: 1.3 $ |
7 |
> |
!! @version $Id: do_Forces.F90,v 1.5 2003-03-31 21:50:59 chuckv Exp $, $Date: 2003-03-31 21:50:59 $, $Name: not supported by cvs2svn $, $Revision: 1.5 $ |
8 |
|
|
9 |
|
module do_Forces |
10 |
|
use force_globals |
196 |
|
nlocal = getNlocal() |
197 |
|
natoms = nlocal |
198 |
|
#endif |
199 |
– |
|
200 |
– |
write(*,*) 'u_l', u_l(1,1), u_l(2,1), u_l(3,1) |
199 |
|
|
202 |
– |
|
200 |
|
call getRcut(rcut,rc2=rcutsq) |
201 |
|
call getRlist(rlist,rlistsq) |
202 |
|
|
381 |
|
|
382 |
|
#ifdef IS_MPI |
383 |
|
!!distribute forces |
384 |
< |
|
385 |
< |
call scatter(f_Row,f,plan_row3d) |
384 |
> |
|
385 |
> |
f_temp = 0.0_dp |
386 |
> |
call scatter(f_Row,f_temp,plan_row3d) |
387 |
> |
do i = 1,nlocal |
388 |
> |
f(1:3,i) = f(1:3,i) + f_temp(1:3,i) |
389 |
> |
end do |
390 |
> |
|
391 |
> |
f_temp = 0.0_dp |
392 |
|
call scatter(f_Col,f_temp,plan_col3d) |
393 |
|
do i = 1,nlocal |
394 |
|
f(1:3,i) = f(1:3,i) + f_temp(1:3,i) |
395 |
|
end do |
396 |
|
|
397 |
|
if (FF_UsesDirectionalAtoms() .and. SimUsesDirectionalAtoms()) then |
398 |
< |
call scatter(t_Row,t,plan_row3d) |
398 |
> |
t_temp = 0.0_dp |
399 |
> |
call scatter(t_Row,t_temp,plan_row3d) |
400 |
> |
do i = 1,nlocal |
401 |
> |
t(1:3,i) = t(1:3,i) + t_temp(1:3,i) |
402 |
> |
end do |
403 |
> |
t_temp = 0.0_dp |
404 |
|
call scatter(t_Col,t_temp,plan_col3d) |
405 |
|
|
406 |
|
do i = 1,nlocal |
472 |
|
#ifdef IS_MPI |
473 |
|
|
474 |
|
if (do_pot) then |
475 |
+ |
write(*,*) "Fortran is on pot:, pot, pot_local ", pot,pot_local |
476 |
|
pot = pot_local |
477 |
|
!! we assume the c code will do the allreduce to get the total potential |
478 |
|
!! we could do it right here if we needed to... |
593 |
|
|
594 |
|
d(1:3) = d(1:3) - box(1:3) * sign(1.0_dp,d(1:3)) * & |
595 |
|
int(abs(d(1:3)/box(1:3)) + 0.5_dp) |
587 |
– |
|
588 |
– |
! write(*,'(a11,3es12.3)') 'wrapped to ', d(1), d(2), d(3) |
596 |
|
|
597 |
|
endif |
598 |
|
r_sq = dot_product(d,d) |