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

Comparing trunk/OOPSE-4/src/UseTheForce/doForces.F90 (file contents):
Revision 2273 by gezelter, Thu Aug 11 21:04:03 2005 UTC vs.
Revision 2277 by chrisfen, Fri Aug 26 21:30:41 2005 UTC

# Line 45 | Line 45
45  
46   !! @author Charles F. Vardeman II
47   !! @author Matthew Meineke
48 < !! @version $Id: doForces.F90,v 1.29 2005-08-11 21:04:03 gezelter Exp $, $Date: 2005-08-11 21:04:03 $, $Name: not supported by cvs2svn $, $Revision: 1.29 $
48 > !! @version $Id: doForces.F90,v 1.32 2005-08-26 21:30:30 chrisfen Exp $, $Date: 2005-08-26 21:30:30 $, $Name: not supported by cvs2svn $, $Revision: 1.32 $
49  
50  
51   module doForces
# Line 104 | Line 104 | module doForces
104    public :: do_force_loop
105    public :: createInteractionHash
106    public :: createGtypeCutoffMap
107 +  public :: getStickyCut
108 +  public :: getStickyPowerCut
109 +  public :: getGayBerneCut
110 +  public :: getEAMCut
111 +  public :: getShapeCut
112  
113   #ifdef PROFILE
114    public :: getforcetime
# Line 152 | Line 157 | contains
157      logical :: j_is_GB
158      logical :: j_is_EAM
159      logical :: j_is_Shape
160 <    
160 >    real(kind=dp) :: myRcut
161 >
162      status = 0  
163  
164      if (.not. associated(atypes)) then
# Line 237 | Line 243 | contains
243      haveInteractionHash = .true.
244    end subroutine createInteractionHash
245  
246 <  subroutine createGtypeCutoffMap()
246 >  subroutine createGtypeCutoffMap(stat)
247  
248 +    integer, intent(out), optional :: stat
249      logical :: i_is_LJ
250      logical :: i_is_Elect
251      logical :: i_is_Sticky
# Line 247 | Line 254 | contains
254      logical :: i_is_EAM
255      logical :: i_is_Shape
256  
257 <    integer :: myStatus, nAtypes
257 >    integer :: myStatus, nAtypes,  i, j, istart, iend, jstart, jend
258 >    integer :: n_in_i
259 >    real(kind=dp):: thisSigma, bigSigma, thisRcut
260 >    real(kind=dp) :: biggestAtypeCutoff
261  
262      stat = 0
263      if (.not. haveInteractionHash) then
# Line 260 | Line 270 | contains
270      endif
271  
272      nAtypes = getSize(atypes)
273 <
273 >    
274      do i = 1, nAtypes
275 <       call getElementProperty(atypes, i, "is_LennardJones", i_is_LJ)
276 <       call getElementProperty(atypes, i, "is_Electrostatic", i_is_Elect)
277 <       call getElementProperty(atypes, i, "is_Sticky", i_is_Sticky)
278 <       call getElementProperty(atypes, i, "is_StickyPower", i_is_StickyP)
279 <       call getElementProperty(atypes, i, "is_GayBerne", i_is_GB)
280 <       call getElementProperty(atypes, i, "is_EAM", i_is_EAM)
281 <       call getElementProperty(atypes, i, "is_Shape", i_is_Shape)
282 <      
283 <       if (i_is_LJ) then
284 <          thisCut = getSigma(i) * DEFAULT_SIGMA_MULTIPLIER
285 <          if (thisCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisCut
286 <       endif
287 <       if (i_is_Elect) then
288 <          thisCut =
289 <    
290 <
291 <
275 >       if (SimHasAtype(i)) then          
276 >          call getElementProperty(atypes, i, "is_LennardJones", i_is_LJ)
277 >          call getElementProperty(atypes, i, "is_Electrostatic", i_is_Elect)
278 >          call getElementProperty(atypes, i, "is_Sticky", i_is_Sticky)
279 >          call getElementProperty(atypes, i, "is_StickyPower", i_is_StickyP)
280 >          call getElementProperty(atypes, i, "is_GayBerne", i_is_GB)
281 >          call getElementProperty(atypes, i, "is_EAM", i_is_EAM)
282 >          call getElementProperty(atypes, i, "is_Shape", i_is_Shape)
283 >          
284 >          if (i_is_LJ) then
285 >             thisRcut = getSigma(i) * 2.5_dp
286 >             if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut
287 >          endif
288 >          if (i_is_Elect) then
289 >             thisRcut = defaultRcut
290 >             if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut
291 >          endif
292 >          if (i_is_Sticky) then
293 >             thisRcut = getStickyCut(i)
294 >             if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut
295 >          endif
296 >          if (i_is_StickyP) then
297 >             thisRcut = getStickyPowerCut(i)
298 >             if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut
299 >          endif
300 >          if (i_is_GB) then
301 >             thisRcut = getGayBerneCut(i)
302 >             if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut
303 >          endif
304 >          if (i_is_EAM) then
305 >             thisRcut = getEAMCut(i)
306 >             if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut
307 >          endif
308 >          if (i_is_Shape) then
309 >             thisRcut = getShapeCut(i)
310 >             if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut
311 >          endif
312 >          
313 >          if (atypeMaxCutoff(i).gt.biggestAtypeCutoff) then
314 >             biggestAtypeCutoff = atypeMaxCutoff(i)
315 >          endif
316 >       endif
317 >    enddo
318  
319 +    istart = 1
320 + #ifdef IS_MPI
321 +    iend = nGroupsInRow
322 + #else
323 +    iend = nGroups
324 + #endif
325 +    outer: do i = istart, iend
326 +      
327 +       n_in_i = groupStartRow(i+1) - groupStartRow(i)
328 +      
329 + #ifdef IS_MPI
330 +       jstart = 1
331 +       jend = nGroupsInCol
332 + #else
333 +       jstart = i+1
334 +       jend = nGroups
335 + #endif
336 +      
337 +      
338 +      
339 +      
340 +      
341 +      
342 +    enddo outer        
343 +    
344       haveGtypeCutoffMap = .true.
345     end subroutine createGtypeCutoffMap
346 <
346 >
347     subroutine setDefaultCutoffs(defRcut, defRsw, defRlist, cutPolicy)
348       real(kind=dp),intent(in) :: defRcut, defRsw, defRlist
349       integer, intent(in) :: cutPolicy
# Line 299 | Line 360 | contains
360       cutoffPolicy = cutPolicy
361       call createGtypeCutoffMap()
362  
363 <   end subroutine setDefaultCutoffs
363 >   end subroutine setCutoffPolicy
364      
365      
366    subroutine setSimVariables()
# Line 609 | Line 670 | contains
670   #endif
671         outer: do i = istart, iend
672  
612 #ifdef IS_MPI
613             me_i = atid_row(i)
614 #else
615             me_i = atid(i)
616 #endif
617
673            if (update_nlist) point(i) = nlist + 1
674  
675            n_in_i = groupStartRow(i+1) - groupStartRow(i)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines