45 |
|
|
46 |
|
!! @author Charles F. Vardeman II |
47 |
|
!! @author Matthew Meineke |
48 |
< |
!! @version $Id: doForces.F90,v 1.23 2005-07-03 20:53:43 chuckv Exp $, $Date: 2005-07-03 20:53:43 $, $Name: not supported by cvs2svn $, $Revision: 1.23 $ |
48 |
> |
!! @version $Id: doForces.F90,v 1.24 2005-07-28 22:12:45 chuckv Exp $, $Date: 2005-07-28 22:12:45 $, $Name: not supported by cvs2svn $, $Revision: 1.24 $ |
49 |
|
|
50 |
|
|
51 |
|
module doForces |
150 |
|
|
151 |
|
subroutine createInteractionMap(status) |
152 |
|
integer :: nAtypes |
153 |
< |
integer :: status |
153 |
> |
integer, intent(out) :: status |
154 |
|
integer :: i |
155 |
|
integer :: j |
156 |
|
integer :: ihash |
171 |
|
logical :: j_is_EAM |
172 |
|
logical :: j_is_Shape |
173 |
|
|
174 |
+ |
status = 0 |
175 |
|
|
176 |
|
if (.not. associated(atypes)) then |
177 |
|
call handleError("atype", "atypes was not present before call of createDefaultInteractionMap!") |
250 |
|
end subroutine createInteractionMap |
251 |
|
|
252 |
|
! Query each potential and return the cutoff for that potential. We build the neighbor list based on the largest cutoff value for that atype. Each potential can decide whether to calculate the force for that atype based upon it's own cutoff. |
253 |
< |
subroutine createRcuts(defaultRList) |
253 |
> |
subroutine createRcuts(defaultRList,stat) |
254 |
|
real(kind=dp), intent(in), optional :: defaultRList |
255 |
|
integer :: iMap |
256 |
|
integer :: map_i,map_j |
257 |
|
real(kind=dp) :: thisRCut = 0.0_dp |
258 |
|
real(kind=dp) :: actualCutoff = 0.0_dp |
259 |
+ |
integer, intent(out) :: stat |
260 |
|
integer :: nAtypes |
261 |
+ |
integer :: myStatus |
262 |
|
|
263 |
< |
if(.not. allocated(InteractionMap)) return |
263 |
> |
stat = 0 |
264 |
> |
if (.not. haveInteractionMap) then |
265 |
> |
|
266 |
> |
call createInteractionMap(myStatus) |
267 |
> |
|
268 |
> |
if (myStatus .ne. 0) then |
269 |
> |
write(default_error, *) 'createInteractionMap failed in doForces!' |
270 |
> |
stat = -1 |
271 |
> |
return |
272 |
> |
endif |
273 |
> |
endif |
274 |
> |
|
275 |
|
|
276 |
|
nAtypes = getSize(atypes) |
277 |
|
! If we pass a default rcut, set all atypes to that cutoff distance |
743 |
|
|
744 |
|
if (update_nlist) then |
745 |
|
#ifdef IS_MPI |
746 |
+ |
me_i = atid_row(i) |
747 |
|
jstart = 1 |
748 |
|
jend = nGroupsInCol |
749 |
|
#else |
750 |
+ |
me_i = atid(i) |
751 |
|
jstart = i+1 |
752 |
|
jend = nGroups |
753 |
|
#endif |
766 |
|
endif |
767 |
|
|
768 |
|
#ifdef IS_MPI |
769 |
+ |
me_j = atid_col(j) |
770 |
|
call get_interatomic_vector(q_group_Row(:,i), & |
771 |
|
q_group_Col(:,j), d_grp, rgrpsq) |
772 |
|
#else |
773 |
+ |
me_j = atid(j) |
774 |
|
call get_interatomic_vector(q_group(:,i), & |
775 |
|
q_group(:,j), d_grp, rgrpsq) |
776 |
|
#endif |