norm_1 Function

private pure function norm_1(me, fvec) result(f)

1-norm function

Arguments

Type IntentOptional Attributes Name
class(nlesolver_type), intent(in) :: me
real(kind=wp), intent(in), dimension(me%m) :: fvec

the function vector

Return Value real(kind=wp)

norm of the vector


Source Code

    pure function norm_1(me, fvec) result(f)

    class(nlesolver_type),intent(in) :: me
    real(wp),dimension(me%m),intent(in) :: fvec  !! the function vector
    real(wp) :: f  !! norm of the vector

    f = sum(abs(fvec))

    end function norm_1