45 |
|
|
46 |
|
!! @author Charles F. Vardeman II |
47 |
|
!! @author Matthew Meineke |
48 |
< |
!! @version $Id: doForces.F90,v 1.51 2005-10-10 21:20:46 chuckv Exp $, $Date: 2005-10-10 21:20:46 $, $Name: not supported by cvs2svn $, $Revision: 1.51 $ |
48 |
> |
!! @version $Id: doForces.F90,v 1.53 2005-10-11 22:00:30 chuckv Exp $, $Date: 2005-10-11 22:00:30 $, $Name: not supported by cvs2svn $, $Revision: 1.53 $ |
49 |
|
|
50 |
|
|
51 |
|
module doForces |
185 |
|
|
186 |
|
if (.not. allocated(InteractionHash)) then |
187 |
|
allocate(InteractionHash(nAtypes,nAtypes)) |
188 |
+ |
else |
189 |
+ |
deallocate(InteractionHash) |
190 |
+ |
allocate(InteractionHash(nAtypes,nAtypes)) |
191 |
|
endif |
192 |
|
|
193 |
|
if (.not. allocated(atypeMaxCutoff)) then |
194 |
+ |
allocate(atypeMaxCutoff(nAtypes)) |
195 |
+ |
else |
196 |
+ |
deallocate(atypeMaxCutoff) |
197 |
|
allocate(atypeMaxCutoff(nAtypes)) |
198 |
|
endif |
199 |
|
|
271 |
|
logical :: GtypeFound |
272 |
|
|
273 |
|
integer :: myStatus, nAtypes, i, j, istart, iend, jstart, jend |
274 |
< |
integer :: n_in_i, me_i, ia, g, atom1 |
274 |
> |
integer :: n_in_i, me_i, ia, g, atom1, ja, n_in_j,me_j |
275 |
|
integer :: nGroupsInRow |
276 |
|
integer :: nGroupsInCol |
277 |
|
integer :: nGroupTypesRow,nGroupTypesCol |
383 |
|
|
384 |
|
#ifdef IS_MPI |
385 |
|
! We only allocate new storage if we are in MPI because Ncol /= Nrow |
386 |
< |
if(.not.allocated(groupToGtypeCol)) then |
386 |
> |
if(.not.associated(groupToGtypeCol)) then |
387 |
|
allocate(groupToGtypeCol(jend)) |
388 |
|
else |
389 |
|
deallocate(groupToGtypeCol) |
390 |
|
allocate(groupToGtypeCol(jend)) |
391 |
|
end if |
392 |
|
|
393 |
< |
if(.not.allocated(groupToGtypeCol)) then |
393 |
> |
if(.not.associated(groupToGtypeCol)) then |
394 |
|
allocate(groupToGtypeCol(jend)) |
395 |
|
else |
396 |
|
deallocate(groupToGtypeCol) |
397 |
|
allocate(groupToGtypeCol(jend)) |
398 |
|
end if |
399 |
< |
if(.not.allocated(gtypeMaxCutoffCol)) then |
399 |
> |
if(.not.associated(gtypeMaxCutoffCol)) then |
400 |
|
allocate(gtypeMaxCutoffCol(jend)) |
401 |
|
else |
402 |
|
deallocate(gtypeMaxCutoffCol) |