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 2275 by gezelter, Fri Aug 26 16:36:16 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.31 2005-08-26 16:36:16 gezelter Exp $, $Date: 2005-08-26 16:36:16 $, $Name: not supported by cvs2svn $, $Revision: 1.31 $
49  
50  
51   module doForces
# Line 152 | Line 152 | contains
152      logical :: j_is_GB
153      logical :: j_is_EAM
154      logical :: j_is_Shape
155 <    
155 >    real(kind=dp) :: myRcut
156 >
157      status = 0  
158  
159      if (.not. associated(atypes)) then
# Line 237 | Line 238 | contains
238      haveInteractionHash = .true.
239    end subroutine createInteractionHash
240  
241 <  subroutine createGtypeCutoffMap()
241 >  subroutine createGtypeCutoffMap(stat)
242  
243 +    integer, intent(out), optional :: stat
244      logical :: i_is_LJ
245      logical :: i_is_Elect
246      logical :: i_is_Sticky
# Line 247 | Line 249 | contains
249      logical :: i_is_EAM
250      logical :: i_is_Shape
251  
252 <    integer :: myStatus, nAtypes
252 >    integer :: myStatus, nAtypes,  i, j, istart, iend, jstart, jend
253 >    integer :: n_in_i
254 >    real(kind=dp):: thisSigma, bigSigma, thisRcut
255 >    real(kind=dp) :: biggestAtypeCutoff
256  
257      stat = 0
258      if (.not. haveInteractionHash) then
# Line 260 | Line 265 | contains
265      endif
266  
267      nAtypes = getSize(atypes)
268 <
268 >    
269      do i = 1, nAtypes
270 <       call getElementProperty(atypes, i, "is_LennardJones", i_is_LJ)
271 <       call getElementProperty(atypes, i, "is_Electrostatic", i_is_Elect)
272 <       call getElementProperty(atypes, i, "is_Sticky", i_is_Sticky)
273 <       call getElementProperty(atypes, i, "is_StickyPower", i_is_StickyP)
274 <       call getElementProperty(atypes, i, "is_GayBerne", i_is_GB)
275 <       call getElementProperty(atypes, i, "is_EAM", i_is_EAM)
276 <       call getElementProperty(atypes, i, "is_Shape", i_is_Shape)
277 <      
278 <       if (i_is_LJ) then
279 <          thisCut = getSigma(i) * DEFAULT_SIGMA_MULTIPLIER
280 <          if (thisCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisCut
270 >       if (SimHasAtype(i)) then          
271 >          call getElementProperty(atypes, i, "is_LennardJones", i_is_LJ)
272 >          call getElementProperty(atypes, i, "is_Electrostatic", i_is_Elect)
273 >          call getElementProperty(atypes, i, "is_Sticky", i_is_Sticky)
274 >          call getElementProperty(atypes, i, "is_StickyPower", i_is_StickyP)
275 >          call getElementProperty(atypes, i, "is_GayBerne", i_is_GB)
276 >          call getElementProperty(atypes, i, "is_EAM", i_is_EAM)
277 >          call getElementProperty(atypes, i, "is_Shape", i_is_Shape)
278 >          
279 >          if (i_is_LJ) then
280 >             thisRcut = getSigma(i) * 2.5_dp
281 >             if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut
282 >          endif
283 >          if (i_is_Elect) then
284 >             thisRcut = defaultRcut
285 >             if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut
286 >          endif
287 >          if (i_is_Sticky) then
288 >             thisRcut = getStickyCut(i)
289 >             if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut
290 >          endif
291 >          if (i_is_StickyP) then
292 >             thisRcut = getStickyPowerCut(i)
293 >             if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut
294 >          endif
295 >          if (i_is_GB) then
296 >             thisRcut = getGayBerneCut(i)
297 >             if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut
298 >          endif
299 >          if (i_is_EAM) then
300 >             thisRcut = getEAMCut(i)
301 >             if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut
302 >          endif
303 >          if (i_is_Shape) then
304 >             thisRcut = getShapeCut(i)
305 >             if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut
306 >          endif
307 >          
308 >          if (atypeMaxCutoff(i).gt.biggestAtypeCutoff) then
309 >             biggestAtypeCutoff = atypeMaxCutoff(i)
310 >          endif
311         endif
312 <       if (i_is_Elect) then
278 <          thisCut =
279 <    
312 >    enddo
313  
314 <
315 <
314 >    istart = 1
315 > #ifdef IS_MPI
316 >    iend = nGroupsInRow
317 > #else
318 >    iend = nGroups
319 > #endif
320 >    outer: do i = istart, iend
321 >      
322 >       n_in_i = groupStartRow(i+1) - groupStartRow(i)
323 >      
324 > #ifdef IS_MPI
325 >       jstart = 1
326 >       jend = nGroupsInCol
327 > #else
328 >       jstart = i+1
329 >       jend = nGroups
330 > #endif
331 >      
332 >      
333 >      
334 >      
335 >      
336 >      
337 >    enddo outer        
338 >    
339       haveGtypeCutoffMap = .true.
340     end subroutine createGtypeCutoffMap
341  
# Line 299 | Line 355 | contains
355       cutoffPolicy = cutPolicy
356       call createGtypeCutoffMap()
357  
358 <   end subroutine setDefaultCutoffs
358 >   end subroutine setCutoffPolicy
359      
360      
361    subroutine setSimVariables()
# Line 608 | Line 664 | contains
664         iend = nGroups - 1
665   #endif
666         outer: do i = istart, iend
611
612 #ifdef IS_MPI
613             me_i = atid_row(i)
614 #else
615             me_i = atid(i)
616 #endif
667  
668            if (update_nlist) point(i) = nlist + 1
669  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines