terminate Subroutine

private subroutine terminate(me)

A user-callable routine. When called, it will terminate all computations and return. The istat return code will be set to -1. This can be called in the function or the info function.

Type Bound

numdiff_type

Arguments

Type IntentOptional Attributes Name
class(numdiff_type), intent(inout) :: me

Source Code

    subroutine terminate(me)

    implicit none

    class(numdiff_type),intent(inout) :: me

    if (me%exception_raised) return ! check for existing exceptions

    me%istat = -1
    me%error_msg = 'Terminated by the user'
    me%exception_raised = .true.

    end subroutine terminate