Wrapper for the constraint violation function (use by 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 |
the function indices to
compute in the full |
subroutine my_func(me,x,f,funcs_to_compute) implicit none 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 !! the function indices to !! compute in the full `f` vector select type (me) class is (mission_type) call me%constraint_violations(x,f,funcs_to_compute) class default error stop 'invalid class in halo_grad' end select end subroutine my_func