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 3177 by gezelter, Tue Jul 17 21:55:57 2007 UTC vs.
Revision 3397 by chuckv, Tue May 27 16:39:06 2008 UTC

# Line 45 | Line 45
45  
46   !! @author Charles F. Vardeman II
47   !! @author Matthew Meineke
48 < !! @version $Id: doForces.F90,v 1.92 2007-07-17 21:55:56 gezelter Exp $, $Date: 2007-07-17 21:55:56 $, $Name: not supported by cvs2svn $, $Revision: 1.92 $
48 > !! @version $Id: doForces.F90,v 1.93 2008-05-27 16:39:05 chuckv Exp $, $Date: 2008-05-27 16:39:05 $, $Name: not supported by cvs2svn $, $Revision: 1.93 $
49  
50  
51   module doForces
# Line 794 | Line 794 | contains
794  
795    !! Does force loop over i,j pairs. Calls do_pair to calculates forces.
796    !------------------------------------------------------------->
797 <  subroutine do_force_loop(q, q_group, A, eFrame, f, t, tau, pot, &
797 >  subroutine do_force_loop(q, q_group, A, eFrame, f, t, tau, pot, particle_pot,&
798         do_pot_c, do_stress_c, error)
799      !! Position array provided by C, dimensioned by getNlocal
800      real ( kind = dp ), dimension(3, nLocal) :: q
# Line 812 | Line 812 | contains
812      !! Stress Tensor
813      real( kind = dp), dimension(9) :: tau  
814      real ( kind = dp ),dimension(LR_POT_TYPES) :: pot
815 +    real( kind = dp ), dimension(nLocal) :: particle_pot
816      logical ( kind = 2) :: do_pot_c, do_stress_c
817      logical :: do_pot
818      logical :: do_stress
# Line 1094 | Line 1095 | contains
1095                              call do_pair(atom1, atom2, ratmsq, d_atm, sw, &
1096                                   do_pot, eFrame, A, f, t, pot_local, vpair, &
1097                                   fpair, d_grp, rgrp, rCut)
1098 +                            ! particle_pot will be accumulated from row & column
1099 +                            ! arrays later
1100   #else
1101                              call do_pair(atom1, atom2, ratmsq, d_atm, sw, &
1102 <                                 do_pot, eFrame, A, f, t, pot, vpair, fpair, &
1103 <                                 d_grp, rgrp, rCut)
1102 >                                 do_pot, eFrame, A, f, t, pot, vpair, &
1103 >                                 fpair, d_grp, rgrp, rCut)
1104 >                            particle_pot(atom1) = particle_pot(atom1) + vpair*sw
1105 >                            particle_pot(atom2) = particle_pot(atom2) + vpair*sw
1106   #endif
1107                              vij = vij + vpair
1108                              fij(1) = fij(1) + fpair(1)
# Line 1266 | Line 1271 | contains
1271                 + pot_Temp(1:LR_POT_TYPES,i)
1272         enddo
1273  
1274 +       do i = 1,LR_POT_TYPES
1275 +          particle_pot(1:nlocal) = particle_pot(1:nlocal) + pot_Temp(i,1:nlocal)
1276 +       enddo
1277 +
1278         pot_Temp = 0.0_DP
1279 +
1280         do i = 1,LR_POT_TYPES
1281            call scatter(pot_Col(i,:), pot_Temp(i,:), plan_atom_col)
1282         end do
1283 +
1284         do i = 1, nlocal
1285            pot_local(1:LR_POT_TYPES) = pot_local(1:LR_POT_TYPES)&
1286                 + pot_Temp(1:LR_POT_TYPES,i)
1287         enddo
1288  
1289 +       do i = 1,LR_POT_TYPES
1290 +          particle_pot(1:nlocal) = particle_pot(1:nlocal) + pot_Temp(i,1:nlocal)
1291 +       enddo
1292 +
1293 +
1294      endif
1295   #endif
1296  
# Line 1425 | Line 1441 | contains
1441  
1442      real( kind = dp ) :: vpair, sw
1443      real( kind = dp ), dimension(LR_POT_TYPES) :: pot
1444 +    real( kind = dp ), dimension(nLocal) :: particle_pot
1445      real( kind = dp ), dimension(3) :: fpair
1446      real( kind = dp ), dimension(nLocal)   :: mfact
1447      real( kind = dp ), dimension(9,nLocal) :: eFrame
# Line 1439 | Line 1456 | contains
1456      real ( kind = dp ), intent(inout) :: d(3)
1457      real ( kind = dp ), intent(inout) :: d_grp(3)
1458      real ( kind = dp ), intent(inout) :: rCut
1459 <    real ( kind = dp ) :: r
1459 >    real ( kind = dp ) :: r, pair_pot
1460      real ( kind = dp ) :: a_k, b_k, c_k, d_k, dx
1461      integer :: me_i, me_j
1462      integer :: k

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines