set_dpert Subroutine

private subroutine set_dpert(me, dpert)

Change the dpert vector. Can be used after the class has been initialized to change the perturbation step sizes (e.g., after an iteration).

Type Bound

numdiff_type

Arguments

Type IntentOptional Attributes Name
class(numdiff_type), intent(inout) :: me
real(kind=wp), intent(in), dimension(:) :: dpert

perturbation vector for x


Calls

proc~~set_dpert~~CallsGraph proc~set_dpert numerical_differentiation_module::numdiff_type%set_dpert proc~raise_exception numerical_differentiation_module::numdiff_type%raise_exception proc~set_dpert->proc~raise_exception

Source Code

    subroutine set_dpert(me,dpert)

    class(numdiff_type),intent(inout) :: me
    real(wp),dimension(:),intent(in) :: dpert !! perturbation vector for `x`

    if (size(dpert)/=me%n) then
        call me%raise_exception(29,'set_dpert',&
            'incorrect size of dpert array')
    else
        me%dpert = abs(dpert) ! update
    end if

    end subroutine set_dpert