--- trunk/OOPSE/libmdtools/neighborLists.F90 2003/03/21 17:42:12 378 +++ trunk/OOPSE/libmdtools/neighborLists.F90 2003/04/04 19:57:01 459 @@ -6,7 +6,7 @@ !! @author Charles F. Vardeman II !! @author Matthew Meineke !! @author J. Daniel Gezelter -!! @version $Id: neighborLists.F90,v 1.1.1.1 2003-03-21 17:42:12 mmeineke Exp $, +!! @version $Id: neighborLists.F90,v 1.2 2003-04-04 19:57:01 mmeineke Exp $, module neighborLists @@ -32,7 +32,7 @@ module neighborLists integer, dimension(:),public, pointer :: list => null() !! Position array of previous positions for check. Allocated first time !! into saveNeighborList. - real( kind = dp ), dimension(:,:), allocatable , save :: q0 + real( kind = dp ), dimension(:,:), allocatable, save :: q0 !! Current list size integer, save :: listSize !--------------MODULE ACCESS--------------------------> @@ -196,12 +196,15 @@ contains !! Saves neighbor list for comparison in check. !! Save_neighborList will work even if the number of !! local atoms has changed. - subroutine saveNeighborList(q) - real(kind = dp ), dimension(:,:), intent(in) :: q + subroutine saveNeighborList(natoms, q) + + integer :: natoms + real(kind = dp ), dimension(3,natoms), intent(in) :: q integer :: list_size + !! get size of list - list_size = size(q) + list_size = natoms if (.not. allocated(q0)) then allocate(q0(3,list_size))