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

Comparing trunk/OOPSE-4/src/UseTheForce/DarkSide/electrostatic.F90 (file contents):
Revision 2156 by chrisfen, Fri Apr 8 22:13:41 2005 UTC vs.
Revision 2189 by chuckv, Wed Apr 13 20:36:45 2005 UTC

# Line 77 | Line 77 | module electrostatic_module
77    public :: getCharge
78    public :: getDipoleMoment
79    public :: pre22
80 +  public :: destroyElectrostaticTypes
81  
82    type :: Electrostatic
83       integer :: c_ident
# Line 339 | Line 340 | contains
340      real (kind=dp) :: pref, vterm, epot, dudr    
341      real (kind=dp) :: xhat, yhat, zhat
342      real (kind=dp) :: dudx, dudy, dudz
342    real (kind=dp) :: drdxj, drdyj, drdzj
343      real (kind=dp) :: scale, sc2, bigR
344  
345      if (.not.allocated(ElectrostaticMap)) then
# Line 362 | Line 362 | contains
362      xhat = d(1) * riji
363      yhat = d(2) * riji
364      zhat = d(3) * riji
365
366    drdxj = xhat
367    drdyj = yhat
368    drdzj = zhat
365  
366      !! logicals
367  
# Line 448 | Line 444 | contains
444         uz_j(2) = eFrame(6,atom2)
445         uz_j(3) = eFrame(9,atom2)
446   #endif
447 <       ct_j = uz_j(1)*drdxj + uz_j(2)*drdyj + uz_j(3)*drdzj
447 >       ct_j = uz_j(1)*xhat + uz_j(2)*yhat + uz_j(3)*zhat
448  
449         if (j_is_SplitDipole) then
450            d_j = ElectrostaticMap(me2)%split_dipole_distance
# Line 508 | Line 504 | contains
504  
505            dudr  = - sw * vterm * riji
506  
507 <          dudx = dudx + dudr * drdxj
508 <          dudy = dudy + dudr * drdyj
509 <          dudz = dudz + dudr * drdzj
507 >          dudx = dudx + dudr * xhat
508 >          dudy = dudy + dudr * yhat
509 >          dudz = dudz + dudr * zhat
510        
511         endif
512  
# Line 557 | Line 553 | contains
553            cz2 = cz_j * cz_j
554  
555  
556 <          pref =  pre14 * q_i / 1.0_dp
556 >          pref =  pre14 * q_i / 3.0_dp
557            vterm = pref * ri3 * (qxx_j * (3.0_dp*cx2 - 1.0_dp) + &
558                 qyy_j * (3.0_dp*cy2 - 1.0_dp) + &
559                 qzz_j * (3.0_dp*cz2 - 1.0_dp))
# Line 683 | Line 679 | contains
679            cy2 = cy_i * cy_i
680            cz2 = cz_i * cz_i
681            
682 <          pref = pre14 * q_j / 1.0_dp
682 >          pref = pre14 * q_j / 3.0_dp
683            vterm = pref * ri3 * (qxx_i * (3.0_dp*cx2 - 1.0_dp) + &
684                 qyy_i * (3.0_dp*cy2 - 1.0_dp) + &
685                 qzz_i * (3.0_dp*cz2 - 1.0_dp))
# Line 826 | Line 822 | end module electrostatic_module
822      return
823    end subroutine doElectrostaticPair
824    
825 +
826 +  subroutine destroyElectrostaticTypes()
827 +    
828 +   if(allocated(ElectrostaticMap)) deallocate(ElectrostaticMap)
829 +
830 +  end subroutine destroyElectrostaticTypes
831 +
832   end module electrostatic_module

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines