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 2726 by gezelter, Thu Apr 20 18:24:24 2006 UTC vs.
Revision 2727 by chrisfen, Fri Apr 21 19:32:07 2006 UTC

# Line 45 | Line 45
45  
46   !! @author Charles F. Vardeman II
47   !! @author Matthew Meineke
48 < !! @version $Id: doForces.F90,v 1.79 2006-04-20 18:24:24 gezelter Exp $, $Date: 2006-04-20 18:24:24 $, $Name: not supported by cvs2svn $, $Revision: 1.79 $
48 > !! @version $Id: doForces.F90,v 1.80 2006-04-21 19:32:07 chrisfen Exp $, $Date: 2006-04-21 19:32:07 $, $Name: not supported by cvs2svn $, $Revision: 1.80 $
49  
50  
51   module doForces
# Line 64 | Line 64 | module doForces
64    use eam
65    use suttonchen
66    use status
67  use interpolation
67   #ifdef IS_MPI
68    use mpiSimulation
69   #endif
# Line 79 | Line 78 | module doForces
78  
79    INTEGER, PARAMETER:: PREPAIR_LOOP = 1
80    INTEGER, PARAMETER:: PAIR_LOOP    = 2
82  INTEGER, PARAMETER:: np = 500
81  
82    logical, save :: haveNeighborList = .false.
83    logical, save :: haveSIMvariables = .false.
# Line 91 | Line 89 | module doForces
89    logical, save :: haveElectrostaticSummationMethod = .false.
90    logical, save :: haveCutoffPolicy = .false.
91    logical, save :: VisitCutoffsAfterComputing = .false.
94  logical, save :: haveSplineSqrt = .false.
92  
93    logical, save :: FF_uses_DirectionalAtoms
94    logical, save :: FF_uses_Dipoles
# Line 150 | Line 147 | module doForces
147    end type gtypeCutoffs
148    type(gtypeCutoffs), dimension(:,:), allocatable :: gtypeCutoffMap
149  
153  ! variables for the spline of the sqrt
154  type(cubicSpline), save :: splineSqrt
155  logical, save :: useSpline = .true.
156  
150  
151   contains
152  
# Line 594 | Line 587 | contains
587       call setCutoffSC( defaultRcut )
588       call set_switch(defaultRsw, defaultRcut)
589       call setHmatDangerousRcutValue(defaultRcut)
597     call setupSplineSqrt(defaultRcut)
590          
591       haveDefaultCutoffs = .true.
592       haveGtypeCutoffMap = .false.
# Line 667 | Line 659 | contains
659      if (VisitCutoffsAfterComputing) then
660         call set_switch(largestRcut, largestRcut)      
661         call setHmatDangerousRcutValue(largestRcut)
670       call setLJsplineRmax(largestRcut)
662         call setCutoffEAM(largestRcut)
663         call setCutoffSC(largestRcut)
664         VisitCutoffsAfterComputing = .false.
674    endif
675
676    if (.not. haveSplineSqrt) then
677       call setupSplineSqrt(largestRcut)
665      endif
666  
667      if (.not. haveSIMvariables) then
# Line 1261 | Line 1248 | contains
1248  
1249      integer :: iHash
1250  
1251 <    if (useSpline) then
1252 <       call lookupUniformSpline(splineSqrt, rijsq, r)
1266 <    else
1267 <       r = sqrt(rijsq)
1268 <    endif
1269 <
1251 >    r = sqrt(rijsq)
1252 >    
1253      vpair = 0.0d0
1254      fpair(1:3) = 0.0d0
1255  
# Line 1350 | Line 1333 | contains
1333  
1334      integer :: me_i, me_j, iHash
1335  
1336 <    if (useSpline) then
1337 <       call lookupUniformSpline(splineSqrt, rijsq, r)
1355 <    else
1356 <       r = sqrt(rijsq)
1357 <    endif
1358 <
1336 >    r = sqrt(rijsq)
1337 >    
1338   #ifdef IS_MPI  
1339      me_i = atid_row(i)
1340      me_j = atid_col(j)  
# Line 1616 | Line 1595 | contains
1595           (tau_Temp(1) + tau_Temp(5) + tau_Temp(9))
1596  
1597    end subroutine add_stress_tensor
1619
1620  subroutine setupSplineSqrt(rmax)
1621    real(kind=dp), intent(in) :: rmax
1622    real(kind=dp), dimension(np) :: xvals, yvals
1623    real(kind=dp) :: r2_1, r2_n, dx, r2
1624    integer :: i
1625
1626    r2_1 = 0.5d0
1627    r2_n = rmax*rmax
1598  
1629    dx = (r2_n-r2_1) / dble(np-1)
1630    
1631    do i = 1, np
1632       r2 = r2_1 + dble(i-1)*dx
1633       xvals(i) = r2
1634       yvals(i) = dsqrt(r2)
1635    enddo
1636
1637    call newSpline(splineSqrt, xvals, yvals, .true.)
1638    
1639    haveSplineSqrt = .true.
1640    return
1641  end subroutine setupSplineSqrt
1642
1643  subroutine deleteSplineSqrt()
1644    call deleteSpline(splineSqrt)
1645    haveSplineSqrt = .false.
1646    return
1647  end subroutine deleteSplineSqrt
1648
1599   end module doForces

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines