Info function for the gradients.
Used to restore the segments back to their unperturbed state when perturbing the opt vars.
Note
This may not be strictly necessary for this particular problem... ... need to think about this some more ...
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(numdiff_type), | intent(inout) | :: | me | |||
integer, | intent(in), | dimension(:) | :: | column |
the columns being computed. |
|
integer, | intent(in) | :: | i |
perturbing these columns for the |
||
real(kind=wp), | intent(in), | dimension(:) | :: | x |
the nominal variable vector |
subroutine halo_grad_info(me,column,i,x) implicit none class(numdiff_type),intent(inout) :: me integer,dimension(:),intent(in) :: column !! the columns being computed. integer,intent(in) :: i !! perturbing these columns for the `i`th time (1,2,...) real(wp),dimension(:),intent(in) :: x !! the nominal variable vector integer :: iseg !! segment number counter select type (me) class is (mission_type) ! restore data to all the segments ! from the unperturbed mission: ! [just in case] do iseg=1,size(me%segs) call me%segs(iseg)%uncache() end do class default error stop 'invalid class in halo_grad_info' end select end subroutine halo_grad_info