swap Subroutine

private pure elemental subroutine swap(a, b)

Swap two real(wp) values.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(inout) :: a
real(kind=wp), intent(inout) :: b

Called by

proc~~swap~~CalledByGraph proc~swap root_module::swap proc~zhang root_module::zhang_solver%zhang proc~zhang->proc~swap

Source Code

    pure elemental subroutine swap(a,b)

    implicit none

    real(wp),intent(inout) :: a
    real(wp),intent(inout) :: b

    real(wp) :: tmp

    tmp = a
    a   = b
    b   = tmp

    end subroutine swap