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 2270 by gezelter, Tue Aug 9 22:33:37 2005 UTC vs.
Revision 2273 by gezelter, Thu Aug 11 21:04:03 2005 UTC

# Line 45 | Line 45
45  
46   !! @author Charles F. Vardeman II
47   !! @author Matthew Meineke
48 < !! @version $Id: doForces.F90,v 1.28 2005-08-09 22:33:37 gezelter Exp $, $Date: 2005-08-09 22:33:37 $, $Name: not supported by cvs2svn $, $Revision: 1.28 $
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 $
49  
50  
51   module doForces
# Line 73 | Line 73 | module doForces
73  
74   #define __FORTRAN90
75   #include "UseTheForce/fSwitchingFunction.h"
76 + #include "UseTheForce/fCutoffPolicy.h"
77   #include "UseTheForce/DarkSide/fInteractionMap.h"
78  
79 +
80    INTEGER, PARAMETER:: PREPAIR_LOOP = 1
81    INTEGER, PARAMETER:: PAIR_LOOP    = 2
82  
# Line 98 | Line 100 | module doForces
100    logical, save :: SIM_uses_PBC
101  
102    public :: init_FF
103 +  public :: setDefaultCutoffs
104    public :: do_force_loop
105    public :: createInteractionHash
106    public :: createGtypeCutoffMap
# Line 122 | Line 125 | module doForces
125       real(kind=dp) :: rlistsq
126    end type gtypeCutoffs
127    type(gtypeCutoffs), dimension(:,:), allocatable :: gtypeCutoffMap
128 +
129 +  integer, save :: cutoffPolicy = TRADITIONAL_CUTOFF_POLICY
130 +  real(kind=dp),save :: defaultRcut, defaultRsw, defaultRlist
131    
132   contains
133  
# Line 179 | Line 185 | contains
185         call getElementProperty(atypes, i, "is_EAM", i_is_EAM)
186         call getElementProperty(atypes, i, "is_Shape", i_is_Shape)
187  
182       if (i_is_LJ) then
183          thisCut = getDefaultLJCutoff(i)
184          if (thisCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisCut
185       endif
186
187
188
188         do j = i, nAtypes
189  
190            iHash = 0
# Line 238 | Line 237 | contains
237      haveInteractionHash = .true.
238    end subroutine createInteractionHash
239  
240 <  subroutine createGtypeCutoffMap(defaultRcut, defaultSkinThickness, stat)
240 >  subroutine createGtypeCutoffMap()
241  
242 <    real(kind=dp), intent(in), optional :: defaultRCut, defaultSkinThickness
243 <    integer, intent(out) :: stat
242 >    logical :: i_is_LJ
243 >    logical :: i_is_Elect
244 >    logical :: i_is_Sticky
245 >    logical :: i_is_StickyP
246 >    logical :: i_is_GB
247 >    logical :: i_is_EAM
248 >    logical :: i_is_Shape
249  
250      integer :: myStatus, nAtypes
251  
# Line 258 | Line 262 | contains
262      nAtypes = getSize(atypes)
263  
264      do i = 1, nAtypes
265 +       call getElementProperty(atypes, i, "is_LennardJones", i_is_LJ)
266 +       call getElementProperty(atypes, i, "is_Electrostatic", i_is_Elect)
267 +       call getElementProperty(atypes, i, "is_Sticky", i_is_Sticky)
268 +       call getElementProperty(atypes, i, "is_StickyPower", i_is_StickyP)
269 +       call getElementProperty(atypes, i, "is_GayBerne", i_is_GB)
270 +       call getElementProperty(atypes, i, "is_EAM", i_is_EAM)
271 +       call getElementProperty(atypes, i, "is_Shape", i_is_Shape)
272        
273 <       atypeMaxCutoff(i) =
274 <
273 >       if (i_is_LJ) then
274 >          thisCut = getSigma(i) * DEFAULT_SIGMA_MULTIPLIER
275 >          if (thisCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisCut
276 >       endif
277 >       if (i_is_Elect) then
278 >          thisCut =
279      
280  
281  
282  
283       haveGtypeCutoffMap = .true.
284     end subroutine createGtypeCutoffMap
285 +
286 +   subroutine setDefaultCutoffs(defRcut, defRsw, defRlist, cutPolicy)
287 +     real(kind=dp),intent(in) :: defRcut, defRsw, defRlist
288 +     integer, intent(in) :: cutPolicy
289  
290 +     defaultRcut = defRcut
291 +     defaultRsw = defRsw
292 +     defaultRlist = defRlist
293 +     cutoffPolicy = cutPolicy
294 +   end subroutine setDefaultCutoffs
295 +
296 +   subroutine setCutoffPolicy(cutPolicy)
297 +
298 +     integer, intent(in) :: cutPolicy
299 +     cutoffPolicy = cutPolicy
300 +     call createGtypeCutoffMap()
301 +
302 +   end subroutine setDefaultCutoffs
303 +    
304 +    
305    subroutine setSimVariables()
306      SIM_uses_DirectionalAtoms = SimUsesDirectionalAtoms()
307      SIM_uses_EAM = SimUsesEAM()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines