6 |
|
!! @author Charles F. Vardeman II |
7 |
|
!! @author Matthew Meineke |
8 |
|
!! @author J. Daniel Gezelter |
9 |
< |
!! @version $Id: neighborLists.F90,v 1.5 2003-03-20 00:02:39 chuckv Exp $, |
9 |
> |
!! @version $Id: neighborLists.F90,v 1.6 2003-03-20 19:50:42 chuckv Exp $, |
10 |
|
|
11 |
|
module neighborLists |
12 |
|
|
23 |
|
!! should be. |
24 |
|
integer, parameter :: listMultiplier = 80 |
25 |
|
!! Maximum number of times we should reallocate neighbor list. |
26 |
< |
integer, parameter :: maxAllocations = 5 |
26 |
> |
integer, parameter :: maxAllocations = 10 |
27 |
|
!! Number of times we have allocated the neighbor list. |
28 |
|
integer, save :: nAllocations = 0 |
29 |
|
!! Pointer array to location in list for atom i. |
54 |
|
integer, dimension(:), pointer :: newList => null() |
55 |
|
error = 0 |
56 |
|
|
57 |
< |
|
57 |
> |
write(*,*) "Inside expand nlist ", nAllocations |
58 |
|
!! First time through we should allocate point and list. |
59 |
|
!! If one is associated and one is not, something is wrong |
60 |
|
!! and return a error. |
61 |
+ |
|
62 |
|
#ifndef IS_MPI !!/Non MPI |
63 |
|
if (.not. associated(point) .and. & |
64 |
|
.not. associated(list) ) then |
106 |
|
return |
107 |
|
else !! Expand the list. |
108 |
|
oldSize = size(list) |
109 |
< |
|
109 |
> |
write(*,*) "Expanding list time, size = ", nAllocations,oldSize |
110 |
|
#ifndef IS_MPI !!Not MPI |
111 |
|
newSize = listMultiplier * natoms + oldSize |
112 |
|
allocate(newList(newSize), stat=alloc_error) |