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

Comparing trunk/OOPSE-2.0/src/UseTheForce/doForces.F90 (file contents):
Revision 2267 by tim, Fri Jul 29 17:34:06 2005 UTC vs.
Revision 2268 by gezelter, Fri Jul 29 19:38:27 2005 UTC

# Line 45 | Line 45
45  
46   !! @author Charles F. Vardeman II
47   !! @author Matthew Meineke
48 < !! @version $Id: doForces.F90,v 1.25 2005-07-29 17:34:06 tim Exp $, $Date: 2005-07-29 17:34:06 $, $Name: not supported by cvs2svn $, $Revision: 1.25 $
48 > !! @version $Id: doForces.F90,v 1.26 2005-07-29 19:38:27 gezelter Exp $, $Date: 2005-07-29 19:38:27 $, $Name: not supported by cvs2svn $, $Revision: 1.26 $
49  
50  
51   module doForces
# Line 137 | Line 137 | module doForces
137  
138    type, public :: Interaction
139       integer :: InteractionHash
140 <     real(kind=dp) :: rList = 0.0_dp
140 >     real(kind=dp) :: rCut = 0.0_dp
141 >     real(kind=dp) :: rCutSq = 0.0_dp    
142       real(kind=dp) :: rListSq = 0.0_dp
143    end type Interaction
144    
# Line 171 | Line 172 | contains
172      logical :: j_is_EAM
173      logical :: j_is_Shape
174      
175 <    status = 0
176 <    
175 >    status = 0  
176 >
177      if (.not. associated(atypes)) then
178         call handleError("atype", "atypes was not present before call of createDefaultInteractionMap!")
179         status = -1
# Line 251 | Line 252 | contains
252      haveInteractionMap = .true.
253    end subroutine createInteractionMap
254  
255 < ! 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.
256 <  subroutine createRcuts(defaultRList,stat)
257 <    real(kind=dp), intent(in), optional :: defaultRList
255 >  ! Query each potential and return the cutoff for that potential. We
256 >  ! build the neighbor list based on the largest cutoff value for that
257 >  ! atype. Each potential can decide whether to calculate the force for
258 >  ! that atype based upon it's own cutoff.
259 >  
260 >  subroutine createRcuts(defaultRcut, defaultSkinThickness, stat)
261 >
262 >    real(kind=dp), intent(in), optional :: defaultRCut, defaultSkinThickness
263      integer :: iMap
264      integer :: map_i,map_j
265      real(kind=dp) :: thisRCut = 0.0_dp
# Line 274 | Line 280 | contains
280         endif
281      endif
282  
277
283      nAtypes = getSize(atypes)
284      !! If we pass a default rcut, set all atypes to that cutoff distance
285      if(present(defaultRList)) then
286 <       InteractionMap(:,:)%rList = defaultRList
287 <       InteractionMap(:,:)%rListSq = defaultRList*defaultRList
286 >       InteractionMap(:,:)%rCut = defaultRCut
287 >       InteractionMap(:,:)%rCutSq = defaultRCut*defaultRCut
288 >       InteractionMap(:,:)%rListSq = (defaultRCut+defaultSkinThickness)**2
289         haveRlist = .true.
290         return
291      end if
# Line 332 | Line 338 | contains
338   !              thisRCut = getShapeLJCutOff(map_i,map_j)
339                if (thisRcut > actualCutoff) actualCutoff = thisRcut
340             endif
341 <           InteractionMap(map_i, map_j)%rList = actualCutoff
342 <           InteractionMap(map_i, map_j)%rListSq = actualCutoff * actualCutoff
341 >           InteractionMap(map_i, map_j)%rCut = actualCutoff
342 >           InteractionMap(map_i, map_j)%rCutSq = actualCutoff * actualCutoff
343 >           InteractionMap(map_i, map_j)%rListSq = (actualCutoff + skinThickness)**2
344 >
345 >           InteractionMap(map_j, map_i)%rCut = InteractionMap(map_i, map_j)%rCut
346 >           InteractionMap(map_j, map_i)%rCutSq = InteractionMap(map_i, map_j)%rCutSq
347 >           InteractionMap(map_j, map_i)%rListSq = InteractionMap(map_i, map_j)%rListSq
348          end do
349       end do
350 +     ! now the groups
351 +
352 +
353 +
354       haveRlist = .true.
355    end subroutine createRcuts
356  
# Line 383 | Line 398 | contains
398      error = 0
399  
400      if (.not. haveInteractionMap) then
401 <
402 <       myStatus = 0
388 <
401 >      
402 >       myStatus = 0      
403         call createInteractionMap(myStatus)
404 <
404 >      
405         if (myStatus .ne. 0) then
406            write(default_error, *) 'createInteractionMap failed in doForces!'
407            error = -1

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines