Commit 03766dbd authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

apply bugfix for MEAM provided by Wolfgang Verestek on lammps-users

this closes lammps/#188
parent 1985db4f
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -183,6 +183,16 @@ c
      real*8, external :: zbl
      real*8, external :: compute_phi

c check for previously allocated arrays and free them
      if(allocated(phir)) deallocate(phir)
      if(allocated(phirar)) deallocate(phirar)
      if(allocated(phirar1)) deallocate(phirar1)
      if(allocated(phirar2)) deallocate(phirar2)
      if(allocated(phirar3)) deallocate(phirar3)
      if(allocated(phirar4)) deallocate(phirar4)
      if(allocated(phirar5)) deallocate(phirar5)
      if(allocated(phirar6)) deallocate(phirar6)

c allocate memory for array that defines the potential
      allocate(phir(nr,(neltypes*(neltypes+1))/2))