my_func Subroutine

subroutine my_func(me, x, f, funcs_to_compute)

Problem function interface for numdiff

Arguments

Type IntentOptional Attributes Name
class(numdiff_type), intent(inout) :: me
real(kind=wp), intent(in), dimension(:) :: x
real(kind=wp), intent(out), dimension(:) :: f
integer, intent(in), dimension(:) :: funcs_to_compute

Calls

proc~~my_func~2~~CallsGraph proc~my_func~2 test2::my_func proc~func test2::func proc~my_func~2->proc~func

Source Code

    subroutine my_func(me,x,f,funcs_to_compute)
        !! Problem function interface for numdiff
        class(numdiff_type),intent(inout) :: me
        real(wp),dimension(:),intent(in)  :: x
        real(wp),dimension(:),intent(out) :: f
        integer,dimension(:),intent(in)   :: funcs_to_compute
        if (any(funcs_to_compute==1)) f(1) = func(x(1))
        func_evals = func_evals + 1
    end subroutine my_func