4 |
|
|
5 |
|
!! @author Charles F. Vardeman II |
6 |
|
!! @author Matthew Meineke |
7 |
< |
!! @version $Id: do_Forces.F90,v 1.25 2003-07-24 19:57:35 chuckv Exp $, $Date: 2003-07-24 19:57:35 $, $Name: not supported by cvs2svn $, $Revision: 1.25 $ |
7 |
> |
!! @version $Id: do_Forces.F90,v 1.27 2003-08-07 00:47:33 chuckv Exp $, $Date: 2003-08-07 00:47:33 $, $Name: not supported by cvs2svn $, $Revision: 1.27 $ |
8 |
|
|
9 |
|
module do_Forces |
10 |
|
use force_globals |
19 |
|
use gb_pair |
20 |
|
use vector_class |
21 |
|
use eam |
22 |
+ |
use status |
23 |
|
#ifdef IS_MPI |
24 |
|
use mpiSimulation |
25 |
|
#endif |
143 |
|
return |
144 |
|
end if |
145 |
|
endif |
146 |
+ |
|
147 |
+ |
|
148 |
+ |
if (FF_uses_EAM) then |
149 |
+ |
call init_EAM_FF(my_status) |
150 |
+ |
if (my_status /= 0) then |
151 |
+ |
thisStat = -1 |
152 |
+ |
return |
153 |
+ |
end if |
154 |
+ |
endif |
155 |
+ |
|
156 |
+ |
|
157 |
|
|
158 |
|
if (FF_uses_GB) then |
159 |
|
call check_gb_pair_FF(my_status) |
174 |
|
return |
175 |
|
endif |
176 |
|
endif |
177 |
+ |
|
178 |
|
|
179 |
|
havePolicies = .true. |
180 |
|
if( haveRlist ) do_forces_initialized = .true. |
181 |
< |
|
181 |
> |
|
182 |
|
end subroutine init_FF |
183 |
|
|
184 |
|
|
235 |
|
nlocal = getNlocal() |
236 |
|
natoms = nlocal |
237 |
|
#endif |
238 |
< |
|
238 |
> |
|
239 |
|
call check_initialization(localError) |
240 |
|
if ( localError .ne. 0 ) then |
241 |
+ |
call handleError("do_force_loop","Not Initialized") |
242 |
|
error = -1 |
243 |
|
return |
244 |
|
end if |
247 |
|
do_pot = do_pot_c |
248 |
|
do_stress = do_stress_c |
249 |
|
|
250 |
+ |
|
251 |
|
! Gather all information needed by all force loops: |
252 |
|
|
253 |
|
#ifdef IS_MPI |
264 |
|
endif |
265 |
|
|
266 |
|
#endif |
267 |
< |
|
267 |
> |
|
268 |
|
if (FF_RequiresPrepairCalc() .and. SimRequiresPrepairCalc()) then |
269 |
|
!! See if we need to update neighbor lists |
270 |
|
call checkNeighborList(nlocal, q, listSkin, update_nlist) |
796 |
|
|
797 |
|
r = sqrt(rijsq) |
798 |
|
|
799 |
+ |
|
800 |
|
#ifdef IS_MPI |
801 |
|
if (tagRow(i) .eq. tagColumn(j)) then |
802 |
|
write(0,*) 'do_pair is doing', i , j, tagRow(i), tagColumn(j) |
828 |
|
integer :: nlocal |
829 |
|
real( kind = dp ) :: pot |
830 |
|
|
831 |
< |
if (FF_uses_EAM .and. SimUsesEAM()) then |
832 |
< |
call calc_EAM_preforce_Frho(nlocal,pot) |
833 |
< |
endif |
831 |
> |
if (FF_uses_EAM .and. SimUsesEAM()) then |
832 |
> |
call calc_EAM_preforce_Frho(nlocal,pot) |
833 |
> |
endif |
834 |
|
|
835 |
|
|
836 |
|
end subroutine do_preforce |
893 |
|
error = 0 |
894 |
|
! Make sure we are properly initialized. |
895 |
|
if (.not. do_forces_initialized) then |
896 |
+ |
write(*,*) "Forces not initialized" |
897 |
|
error = -1 |
898 |
|
return |
899 |
|
endif |