ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/do_Forces.F90
(Generate patch)

Comparing trunk/OOPSE/libmdtools/do_Forces.F90 (file contents):
Revision 459 by mmeineke, Fri Apr 4 19:57:01 2003 UTC vs.
Revision 486 by mmeineke, Thu Apr 10 16:22:00 2003 UTC

# Line 4 | Line 4
4  
5   !! @author Charles F. Vardeman II
6   !! @author Matthew Meineke
7 < !! @version $Id: do_Forces.F90,v 1.8 2003-04-04 19:57:01 mmeineke Exp $, $Date: 2003-04-04 19:57:01 $, $Name: not supported by cvs2svn $, $Revision: 1.8 $
7 > !! @version $Id: do_Forces.F90,v 1.14 2003-04-10 16:22:00 mmeineke Exp $, $Date: 2003-04-10 16:22:00 $, $Name: not supported by cvs2svn $, $Revision: 1.14 $
8  
9   module do_Forces
10    use force_globals
# Line 140 | Line 140 | contains
140  
141      if (FF_uses_GB .and. FF_uses_LJ) then
142      endif
143 <
143 >    if (.not. do_forces_initialized) then
144 >       !! Create neighbor lists
145 >       call expandNeighborList(getNlocal(), my_status)
146 >       if (my_Status /= 0) then
147 >          write(default_error,*) "SimSetup: ExpandNeighborList returned error."
148 >          thisStat = -1
149 >          return
150 >       endif
151 >    endif
152  
153      do_forces_initialized = .true.    
154  
# Line 479 | Line 487 | contains
487      endif
488  
489      if (do_stress) then
490 <       call mpi_allreduce(tau, tau_Temp,9,mpi_double_precision,mpi_sum, &
490 >       call mpi_allreduce(tau_Temp, tau,9,mpi_double_precision,mpi_sum, &
491              mpi_comm_world,mpi_err)
492 <       call mpi_allreduce(virial, virial_Temp,1,mpi_double_precision,mpi_sum, &
492 >       call mpi_allreduce(virial_Temp, virial,1,mpi_double_precision,mpi_sum, &
493              mpi_comm_world,mpi_err)
494      endif
495  
# Line 499 | Line 507 | contains
507    subroutine do_pair(i, j, rijsq, d, do_pot, do_stress, u_l, A, f, t, pot)
508  
509      real( kind = dp ) :: pot
510 <    real( kind = dp ), dimension(:,:) :: u_l
511 <    real (kind=dp), dimension(:,:) :: A
512 <    real (kind=dp), dimension(:,:) :: f
513 <    real (kind=dp), dimension(:,:) :: t
510 >    real( kind = dp ), dimension(3,getNlocal()) :: u_l
511 >    real (kind=dp), dimension(9,getNlocal()) :: A
512 >    real (kind=dp), dimension(3,getNlocal()) :: f
513 >    real (kind=dp), dimension(3,getNlocal()) :: t
514  
515      logical, intent(inout) :: do_pot, do_stress
516      integer, intent(in) :: i, j
# Line 543 | Line 551 | contains
551        
552         if ( is_DP_i .and. is_DP_j ) then
553            
554 <          call do_dipole_pair(natoms,i, j, d, r, rijsq, pot, u_l, f, t, &
554 >          call do_dipole_pair(i, j, d, r, rijsq, pot, u_l, f, t, &
555                 do_pot, do_stress)
556            if (FF_uses_RF .and. SimUsesRF()) then
557               call accumulate_rf(i, j, r, u_l)
# Line 586 | Line 594 | contains
594      real ( kind = dp ), intent(out) :: r_sq
595      real( kind = dp ) :: d(3)
596      real( kind = dp ) :: d_old(3)
597 <    d(1:3) = q_i(1:3) - q_j(1:3)
597 >    d(1:3) = q_j(1:3) - q_i(1:3)
598      d_old = d
599      ! Wrap back into periodic box if necessary
600      if ( SimUsesPBC() ) then
# Line 655 | Line 663 | contains
663      rf = 0.0_dp
664      tau_Temp = 0.0_dp
665      virial_Temp = 0.0_dp
658    
666    end subroutine zero_work_arrays
667    
668    function skipThisPair(atom1, atom2) result(skip_it)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines