USER_PROBLEM: Deallocate perturbation vectors only if pert=2.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2021-11-25 14:03:09 -03:00
parent 0317aff8a0
commit a7be0cc2f4

View File

@ -437,9 +437,12 @@ module user_problem
close(runit)
deallocate(kx, ky, kz, ux, uy, uz, ph, stat = status)
call print_message(loc, &
if (pert == 2) then
deallocate(kx, ky, kz, ux, uy, uz, ph, stat = status)
if (status /= 0) &
call print_message(loc, &
"Could not deallocate space for perturbation vectors!")
end if
!-------------------------------------------------------------------------------
!