Deallocate memoery and nullify pointers to the gradient variables.
subroutine destroy_gradients
!< Deallocate memoery and nullify pointers
!< to the gradient variables.
implicit none
DebugCall("destroy_gradients")
if(mu_ref/=0)then
call destroy_memory()
! unlink laminar grad pointer
call destroy_laminar_grad()
!unlink turublent grad pointer
select case (trim(turbulence))
case('none')
!do nothing
continue
case('sa', 'saBC')
call destroy_sa_grad()
case('sst', 'sst2003')
call destroy_sst_grad()
case('kkl')
call destroy_kkl_grad()
case DEFAULT
! call turbulence_read_error()
Fatal_error
end select
!Transition modeling
select case(trim(transition))
case('lctm2015')
call destroy_lctm2015_grad()
case('none','bc')
!do nothing
continue
case DEFAULT
Fatal_error
end Select
end if
end subroutine destroy_gradients