collect_garbage_r1 Subroutine

private subroutine collect_garbage_r1(comm)

Arguments

Type IntentOptional AttributesName
type(rk_comm_real_1d) :: comm

Called by

proc~~collect_garbage_r1~~CalledByGraph proc~collect_garbage_r1 collect_garbage_r1 interface~collect_garbage collect_garbage interface~collect_garbage->proc~collect_garbage_r1 proc~upstream_calculate upstream_calculate proc~upstream_calculate->interface~collect_garbage

Contents

Source Code


Source Code

subroutine collect_garbage_r1(comm)
!
! Part of rksuite_90 v1.0 (Aug 1994)
!         software for initial value problems in ODEs
! Modified by I.Gladwell (Aug 2002)
!
! Authors: R.W. Brankin (NAG Ltd., Oxford, England)
!          I. Gladwell  (Math Dept., SMU, Dallas, TX, USA)
!          see main doc for contact details
!
type(rk_comm_real_1d) :: comm
!
if (associated(comm%thresh)) then
   deallocate(comm%thresh); nullify(comm%thresh)
end if
if (associated(comm%y)) then
   deallocate(comm%y); nullify(comm%y)
end if
if (associated(comm%yp)) then
   deallocate(comm%yp); nullify(comm%yp)
end if
if (associated(comm%ymax)) then
   deallocate(comm%ymax); nullify(comm%ymax)
end if
if (associated(comm%scratch)) then
   deallocate(comm%scratch); nullify(comm%scratch)
   nullify(comm%y_new); nullify(comm%yp_old); nullify(comm%vtemp)
end if
if (associated(comm%weights)) then
   deallocate(comm%weights); nullify(comm%weights)
end if
if (associated(comm%ytemp)) then
   deallocate(comm%ytemp); nullify(comm%ytemp)
end if
if (associated(comm%y_old)) then
   deallocate(comm%y_old); nullify(comm%y_old)
end if
if (associated(comm%err_estimates)) then
   deallocate(comm%err_estimates); nullify(comm%err_estimates)
   nullify(comm%v0)
end if
if (associated(comm%p,comm%stages(:,1:2))) then
   nullify(comm%p)
end if
if (associated(comm%ge_stages,comm%stages)) then
   deallocate(comm%stages); nullify(comm%stages); nullify(comm%ge_stages);
   nullify(comm%v1,comm%v2,comm%v3)
else if (associated(comm%ge_stages)) then
   deallocate(comm%ge_stages); nullify(comm%ge_stages)
end if
if (associated(comm%ge_y_new)) then
   deallocate(comm%ge_y_new); nullify(comm%ge_y_new)
end if
if (associated(comm%ge_assess)) then
   deallocate(comm%ge_assess); nullify(comm%ge_assess)
end if
if (associated(comm%ge_err_estimates)) then
   deallocate(comm%ge_err_estimates); nullify(comm%ge_err_estimates)
end if
if (associated(comm%ge_yp)) then
   deallocate(comm%ge_yp); nullify(comm%ge_yp)
end if
if (associated(comm%ge_y)) then
   deallocate(comm%ge_y); nullify(comm%ge_y)
end if
if (associated(comm%xstage)) then
   deallocate(comm%xstage); nullify(comm%xstage)
end if
if (associated(comm%p)) then
   deallocate(comm%p); nullify(comm%p)
end if
if (associated(comm%stages)) then
  deallocate(comm%stages); nullify(comm%stages)
end if
!
end subroutine collect_garbage_r1