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

Comparing trunk/OOPSE-4/src/UseTheForce/DarkSide/suttonchen.F90 (file contents):
Revision 2434 by chuckv, Tue Nov 15 16:18:36 2005 UTC vs.
Revision 2533 by chuckv, Fri Dec 30 23:15:59 2005 UTC

# Line 49 | Line 49 | module suttonchen
49    use status
50    use atype_module
51    use vector_class
52 +  use fForceOptions
53   #ifdef IS_MPI
54    use mpiSimulation
55   #endif
# Line 146 | Line 147 | module suttonchen
147    public :: getSCCut
148   ! public :: setSCDefaultCutoff
149   ! public :: setSCUniformCutoff
150 <  public :: useGeometricMixing
150 >
151  
152   contains
153  
# Line 176 | Line 177 | contains
177  
178      ! check to see if this is the first time into
179      if (.not.associated(SCList%SCTypes)) then
180 <       call getMatchingElementList(atypes, "is_SuttonChen", .true., nSCtypes, MatchList)
180 >       call getMatchingElementList(atypes, "is_SC", .true., nSCtypes, MatchList)
181         SCList%nSCtypes = nSCtypes
182         allocate(SCList%SCTypes(nSCTypes))
183         nAtypes = getSize(atypes)
# Line 221 | Line 222 | contains
222      real(kind=dp) :: cutValue
223      
224      scID = SCList%atidToSCType(atomID)
225 <    cutValue = SCList%SCTypes(scID)%sc_rcut
225 >    cutValue = 2.0_dp * SCList%SCTypes(scID)%alpha
226    end function getSCCut
227  
228  
# Line 243 | Line 244 | contains
244      if (.not. allocated(MixingMap)) then
245         allocate(MixingMap(nSCtypes, nSCtypes))
246      endif
247 <
247 >    useGeometricDistanceMixing = usesGeometricDistanceMixing()
248      do i = 1, nSCtypes
249  
250         e1 = SCList%SCtypes(i)%epsilon
# Line 396 | Line 397 | contains
397  
398    end subroutine setCutoffSC
399  
399  subroutine useGeometricMixing()
400    useGeometricDistanceMixing = .true.
401    haveMixingMap = .false.
402    return
403  end subroutine useGeometricMixing
404  
405
406
407
408
409
410
411
412
400    subroutine clean_SC()
401  
402      ! clean non-IS_MPI first
# Line 431 | Line 418 | contains
418  
419  
420    !! Calculates rho_r
421 <  subroutine calc_sc_prepair_rho(atom1,atom2,d,r,rijsq)
421 >  subroutine calc_sc_prepair_rho(atom1,atom2,d,r,rijsq, rcut)
422      integer :: atom1,atom2
423      real(kind = dp), dimension(3) :: d
424      real(kind = dp), intent(inout)               :: r
425 <    real(kind = dp), intent(inout)               :: rijsq
425 >    real(kind = dp), intent(inout)               :: rijsq, rcut
426      ! value of electron density rho do to atom i at atom j
427      real(kind = dp) :: rho_i_at_j
428      ! value of electron density rho do to atom j at atom i
# Line 452 | Line 439 | contains
439  
440      ! check to see if we need to be cleaned at the start of a force loop
441  
442 +    if (.not.haveMixingMap) call createMixingMap()
443  
444  
457
445   #ifdef IS_MPI
446      Atid1 = Atid_row(Atom1)
447      Atid2 = Atid_col(Atom2)
# Line 550 | Line 537 | contains
537  
538  
539    !! Does Sutton-Chen  pairwise Force calculation.  
540 <  subroutine do_sc_pair(atom1, atom2, d, rij, r2, sw, vpair, fpair, &
540 >  subroutine do_sc_pair(atom1, atom2, d, rij, r2, rcut, sw, vpair, fpair, &
541         pot, f, do_pot)
542      !Arguments    
543      integer, intent(in) ::  atom1, atom2
544 <    real( kind = dp ), intent(in) :: rij, r2
544 >    real( kind = dp ), intent(in) :: rij, r2, rcut
545      real( kind = dp ) :: pot, sw, vpair
546      real( kind = dp ), dimension(3,nLocal) :: f
547      real( kind = dp ), intent(in), dimension(3) :: d

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines