PM Subroutine

public subroutine PM(p, r)

Modulus of p-vector.

Status: vector/matrix support routine.

History

  • IAU SOFA revision: 2000 November 25

Arguments

TypeIntentOptionalAttributesName
real(kind=wp), intent(in), dimension(3):: p

p-vector

real(kind=wp), intent(out) :: r

modulus


Called by

proc~~pm~~CalledByGraph proc~pm PM proc~fk524 FK524 proc~fk524->proc~pm proc~p2s P2S proc~p2s->proc~pm proc~pap PAP proc~pap->proc~pm proc~fk54z FK54Z proc~fk54z->proc~fk524

Contents

Source Code

PM

Source Code

    subroutine PM ( p, r )

    implicit none

    real(wp),dimension(3),intent(in) :: p !! p-vector
    real(wp),intent(out) :: r !! modulus

    integer :: i
    real(wp) :: w, c

    w = 0.0_wp
    do i=1,3
       c = p(i)
       w = w + c*c
    end do
    r = sqrt(w)

    end subroutine PM