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