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 2727 by chrisfen, Fri Apr 21 19:32:07 2006 UTC vs.
Revision 2787 by gezelter, Mon Jun 5 18:24:45 2006 UTC

# Line 45 | Line 45
45  
46   !! @author Charles F. Vardeman II
47   !! @author Matthew Meineke
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 $
48 > !! @version $Id: doForces.F90,v 1.83 2006-06-05 18:24:45 gezelter Exp $, $Date: 2006-06-05 18:24:45 $, $Name: not supported by cvs2svn $, $Revision: 1.83 $
49  
50  
51   module doForces
# Line 423 | Line 423 | contains
423      !! largest cutoff for any atypes present in this group.  We also
424      !! create gtypes at this point.
425      
426 <    tol = 1.0d-6
426 >    tol = 1.0e-6_dp
427      nGroupTypesRow = 0
428      nGroupTypesCol = 0
429      do i = istart, iend      
# Line 962 | Line 962 | contains
962  
963                     rCut = gtypeCutoffMap(groupToGtypeRow(i),groupToGtypeCol(j))%rCut
964                     if (loop .eq. PAIR_LOOP) then
965 <                      vij = 0.0d0
965 >                      vij = 0.0_dp
966                        fij(1) = 0.0_dp
967                        fij(2) = 0.0_dp
968                        fij(3) = 0.0_dp
# Line 1182 | Line 1182 | contains
1182                  ! prevent overcounting of the skips
1183                  if (i.lt.j) then
1184                     call get_interatomic_vector(q(:,i), q(:,j), d_atm, ratmsq)
1185 <                   rVal = dsqrt(ratmsq)
1185 >                   rVal = sqrt(ratmsq)
1186                     call get_switch(ratmsq, sw, dswdr, rVal,in_switching_region)
1187   #ifdef IS_MPI
1188                     call rf_self_excludes(i, j, sw, eFrame, d_atm, rVal, &
# Line 1200 | Line 1200 | contains
1200   #ifdef IS_MPI
1201      
1202      if (do_pot) then
1203 + #ifdef SINGLE_PRECISION
1204 +       call mpi_allreduce(pot_local, pot, LR_POT_TYPES,mpi_real,mpi_sum, &
1205 +            mpi_comm_world,mpi_err)            
1206 + #else
1207         call mpi_allreduce(pot_local, pot, LR_POT_TYPES,mpi_double_precision,mpi_sum, &
1208              mpi_comm_world,mpi_err)            
1209 + #endif
1210      endif
1211      
1212      if (do_stress) then
1213 + #ifdef SINGLE_PRECISION
1214 +       call mpi_allreduce(tau_Temp, tau, 9,mpi_real,mpi_sum, &
1215 +            mpi_comm_world,mpi_err)
1216 +       call mpi_allreduce(virial_Temp, virial,1,mpi_real,mpi_sum, &
1217 +            mpi_comm_world,mpi_err)
1218 + #else
1219         call mpi_allreduce(tau_Temp, tau, 9,mpi_double_precision,mpi_sum, &
1220              mpi_comm_world,mpi_err)
1221         call mpi_allreduce(virial_Temp, virial,1,mpi_double_precision,mpi_sum, &
1222              mpi_comm_world,mpi_err)
1223 + #endif
1224      endif
1225      
1226   #else
# Line 1250 | Line 1262 | contains
1262  
1263      r = sqrt(rijsq)
1264      
1265 <    vpair = 0.0d0
1266 <    fpair(1:3) = 0.0d0
1265 >    vpair = 0.0_dp
1266 >    fpair(1:3) = 0.0_dp
1267  
1268   #ifdef IS_MPI
1269      me_i = atid_row(i)
# Line 1289 | Line 1301 | contains
1301      endif
1302      
1303      if ( iand(iHash, GAYBERNE_LJ).ne.0 ) then
1304 <       call do_gb_lj_pair(i, j, d, r, rijsq, rcut, sw, vpair, fpair, &
1304 >       call do_gb_pair(i, j, d, r, rijsq, sw, vpair, fpair, &
1305              pot(VDW_POT), A, f, t, do_pot)
1306      endif
1307      
# Line 1394 | Line 1406 | contains
1406            
1407            ! wrap the scaled coordinates
1408  
1409 <          scaled(1) = scaled(1) - dnint(scaled(1))
1410 <          scaled(2) = scaled(2) - dnint(scaled(2))
1411 <          scaled(3) = scaled(3) - dnint(scaled(3))
1409 >          scaled(1) = scaled(1) - anint(scaled(1), kind=dp)
1410 >          scaled(2) = scaled(2) - anint(scaled(2), kind=dp)
1411 >          scaled(3) = scaled(3) - anint(scaled(3), kind=dp)
1412  
1413            ! calc the wrapped real coordinates from the wrapped scaled
1414            ! coordinates
# Line 1414 | Line 1426 | contains
1426            
1427            ! wrap the scaled coordinates
1428            
1429 <          scaled(1) = scaled(1) - dnint(scaled(1))
1430 <          scaled(2) = scaled(2) - dnint(scaled(2))
1431 <          scaled(3) = scaled(3) - dnint(scaled(3))
1429 >          scaled(1) = scaled(1) - anint(scaled(1), kind=dp)
1430 >          scaled(2) = scaled(2) - anint(scaled(2), kind=dp)
1431 >          scaled(3) = scaled(3) - anint(scaled(3), kind=dp)
1432  
1433            ! calc the wrapped real coordinates from the wrapped scaled
1434            ! coordinates

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines