Destroy the internal class variables.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(splpak_type), | intent(inout) | :: | me | |||
integer, | intent(in), | optional | :: | ndim |
subroutine destroy_splpak(me,ndim) class(splpak_type),intent(inout) :: me integer,intent(in),optional :: ndim if (allocated(me%dx)) deallocate(me%dx) if (allocated(me%dxin)) deallocate(me%dxin) if (allocated(me%ib)) deallocate(me%ib) if (allocated(me%ibmn)) deallocate(me%ibmn) if (allocated(me%ibmx)) deallocate(me%ibmx) if (present(ndim)) then allocate(me%dx (ndim)); me%dx = 0.0_wp allocate(me%dxin(ndim)); me%dxin = 0.0_wp allocate(me%ib (ndim)); me%ib = 0 allocate(me%ibmn(ndim)); me%ibmn = 0 allocate(me%ibmx(ndim)); me%ibmx = 0 end if me%mdim = 0 me%ilast = 0 me%isav = 0 me%iold = 0 me%np1 = 0 me%l = 0 me%il1 = 0 me%k = 0 me%k1 = 0 me%errsum = 0.0_wp end subroutine destroy_splpak