Use intrinsic norm2(x)
for computing the vector norm.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x |
pure function norm2_func(x) result(xmag) implicit none real(wp),dimension(:),intent(in) :: x real(wp) :: xmag xmag = norm2(x) end function norm2_func