Problem function interface for numdiff
| Type | Intent | Optional | 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 |
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