132 |
|
public :: calc_eam_prepair_rho |
133 |
|
public :: calc_eam_preforce_Frho |
134 |
|
public :: clean_EAM |
135 |
+ |
public :: destroyEAMTypes |
136 |
|
|
137 |
|
contains |
138 |
|
|
199 |
|
end subroutine newEAMtype |
200 |
|
|
201 |
|
|
202 |
+ |
! kills all eam types entered and sets simulation to uninitalized |
203 |
+ |
subroutine destroyEAMtypes() |
204 |
+ |
integer :: i |
205 |
+ |
type(EAMType), pointer :: tempEAMType=>null() |
206 |
+ |
|
207 |
+ |
do i = 1, EAMList%n_eam_types |
208 |
+ |
tempEAMType => eamList%EAMParams(i) |
209 |
+ |
call deallocate_EAMType(tempEAMType) |
210 |
+ |
end do |
211 |
+ |
if(associated( eamList%EAMParams)) deallocate( eamList%EAMParams) |
212 |
+ |
eamList%EAMParams => null() |
213 |
+ |
|
214 |
+ |
eamList%n_eam_types = 0 |
215 |
+ |
eamList%currentAddition = 0 |
216 |
+ |
|
217 |
+ |
end subroutine destroyEAMtypes |
218 |
|
|
219 |
|
subroutine init_EAM_FF(status) |
220 |
|
integer :: status |
519 |
|
type (EAMtype), pointer :: thisEAMType |
520 |
|
|
521 |
|
! free Arrays in reverse order of allocation... |
522 |
< |
deallocate(thisEAMType%eam_phi_r_pp) |
523 |
< |
deallocate(thisEAMType%eam_rho_r_pp) |
524 |
< |
deallocate(thisEAMType%eam_Z_r_pp) |
525 |
< |
deallocate(thisEAMType%eam_F_rho_pp) |
526 |
< |
deallocate(thisEAMType%eam_phi_r) |
527 |
< |
deallocate(thisEAMType%eam_rho_r) |
528 |
< |
deallocate(thisEAMType%eam_Z_r) |
529 |
< |
deallocate(thisEAMType%eam_F_rho) |
530 |
< |
deallocate(thisEAMType%eam_rhovals) |
531 |
< |
deallocate(thisEAMType%eam_rvals) |
522 |
> |
if(associated(thisEAMType%eam_phi_r_pp)) deallocate(thisEAMType%eam_phi_r_pp) |
523 |
> |
if(associated(thisEAMType%eam_rho_r_pp)) deallocate(thisEAMType%eam_rho_r_pp) |
524 |
> |
if(associated(thisEAMType%eam_Z_r_pp)) deallocate(thisEAMType%eam_Z_r_pp) |
525 |
> |
if(associated(thisEAMType%eam_F_rho_pp)) deallocate(thisEAMType%eam_F_rho_pp) |
526 |
> |
if(associated(thisEAMType%eam_phi_r)) deallocate(thisEAMType%eam_phi_r) |
527 |
> |
if(associated(thisEAMType%eam_rho_r)) deallocate(thisEAMType%eam_rho_r) |
528 |
> |
if(associated(thisEAMType%eam_Z_r)) deallocate(thisEAMType%eam_Z_r) |
529 |
> |
if(associated(thisEAMType%eam_F_rho)) deallocate(thisEAMType%eam_F_rho) |
530 |
> |
if(associated(thisEAMType%eam_rhovals)) deallocate(thisEAMType%eam_rhovals) |
531 |
> |
if(associated(thisEAMType%eam_rvals)) deallocate(thisEAMType%eam_rvals) |
532 |
|
|
533 |
|
end subroutine deallocate_EAMType |
534 |
|
|
1022 |
|
|
1023 |
|
end subroutine eam_spline |
1024 |
|
|
1008 |
– |
|
1009 |
– |
|
1010 |
– |
|
1025 |
|
end module eam |
1012 |
– |
|
1013 |
– |
subroutine newEAMtype(lattice_constant,eam_nrho,eam_drho,eam_nr,& |
1014 |
– |
eam_dr,rcut,eam_Z_r,eam_rho_r,eam_F_rho,& |
1015 |
– |
eam_ident,status) |
1016 |
– |
use definitions, ONLY : dp |
1017 |
– |
use eam, ONLY : module_newEAMtype => newEAMtype |
1018 |
– |
real (kind = dp ) :: lattice_constant |
1019 |
– |
integer :: eam_nrho |
1020 |
– |
real (kind = dp ) :: eam_drho |
1021 |
– |
integer :: eam_nr |
1022 |
– |
real (kind = dp ) :: eam_dr |
1023 |
– |
real (kind = dp ) :: rcut |
1024 |
– |
real (kind = dp ), dimension(eam_nr) :: eam_Z_r |
1025 |
– |
real (kind = dp ), dimension(eam_nr) :: eam_rho_r |
1026 |
– |
real (kind = dp ), dimension(eam_nrho) :: eam_F_rho |
1027 |
– |
integer :: eam_ident |
1028 |
– |
integer :: status |
1029 |
– |
|
1030 |
– |
|
1031 |
– |
call module_newEAMtype(lattice_constant,eam_nrho,eam_drho,eam_nr,& |
1032 |
– |
eam_dr,rcut,eam_Z_r,eam_rho_r,eam_F_rho,& |
1033 |
– |
eam_ident,status) |
1034 |
– |
|
1035 |
– |
end subroutine newEAMtype |