ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/src/UseTheForce/doForces.F90
(Generate patch)

Comparing trunk/OOPSE-3.0/src/UseTheForce/doForces.F90 (file contents):
Revision 2262 by chuckv, Sun Jul 3 20:53:43 2005 UTC vs.
Revision 2266 by chuckv, Thu Jul 28 22:12:45 2005 UTC

# Line 45 | Line 45
45  
46   !! @author Charles F. Vardeman II
47   !! @author Matthew Meineke
48 < !! @version $Id: doForces.F90,v 1.23 2005-07-03 20:53:43 chuckv Exp $, $Date: 2005-07-03 20:53:43 $, $Name: not supported by cvs2svn $, $Revision: 1.23 $
48 > !! @version $Id: doForces.F90,v 1.24 2005-07-28 22:12:45 chuckv Exp $, $Date: 2005-07-28 22:12:45 $, $Name: not supported by cvs2svn $, $Revision: 1.24 $
49  
50  
51   module doForces
# Line 150 | Line 150 | contains
150  
151    subroutine createInteractionMap(status)
152      integer :: nAtypes
153 <    integer :: status
153 >    integer, intent(out) :: status
154      integer :: i
155      integer :: j
156      integer :: ihash
# Line 171 | Line 171 | contains
171      logical :: j_is_EAM
172      logical :: j_is_Shape
173      
174 +    status = 0
175      
176      if (.not. associated(atypes)) then
177         call handleError("atype", "atypes was not present before call of createDefaultInteractionMap!")
# Line 249 | Line 250 | contains
250    end subroutine createInteractionMap
251  
252   ! Query each potential and return the cutoff for that potential. We build the neighbor list based on the largest cutoff value for that atype. Each potential can decide whether to calculate the force for that atype based upon it's own cutoff.
253 <  subroutine createRcuts(defaultRList)
253 >  subroutine createRcuts(defaultRList,stat)
254      real(kind=dp), intent(in), optional :: defaultRList
255      integer :: iMap
256      integer :: map_i,map_j
257      real(kind=dp) :: thisRCut = 0.0_dp
258      real(kind=dp) :: actualCutoff = 0.0_dp
259 +    integer, intent(out) :: stat
260      integer :: nAtypes
261 +    integer :: myStatus
262  
263 <    if(.not. allocated(InteractionMap)) return
263 >    stat = 0
264 >    if (.not. haveInteractionMap) then
265 >
266 >       call createInteractionMap(myStatus)
267 >
268 >       if (myStatus .ne. 0) then
269 >          write(default_error, *) 'createInteractionMap failed in doForces!'
270 >          stat = -1
271 >          return
272 >       endif
273 >    endif
274 >
275  
276      nAtypes = getSize(atypes)
277   ! If we pass a default rcut, set all atypes to that cutoff distance
# Line 729 | Line 743 | contains
743  
744            if (update_nlist) then
745   #ifdef IS_MPI
746 +             me_i = atid_row(i)
747               jstart = 1
748               jend = nGroupsInCol
749   #else
750 +             me_i = atid(i)
751               jstart = i+1
752               jend = nGroups
753   #endif
# Line 750 | Line 766 | contains
766               endif
767  
768   #ifdef IS_MPI
769 +             me_j = atid_col(j)
770               call get_interatomic_vector(q_group_Row(:,i), &
771                    q_group_Col(:,j), d_grp, rgrpsq)
772   #else
773 +             me_j = atid(j)
774               call get_interatomic_vector(q_group(:,i), &
775                    q_group(:,j), d_grp, rgrpsq)
776   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines