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