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

this closes lammps/#188
This commit is contained in:
Axel Kohlmeyer 2016-10-03 16:28:59 -04:00
parent 1985db4fb1
commit 03766dbda7
1 changed files with 10 additions and 0 deletions

View File

@ -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))