halo_grad_info Subroutine

public subroutine halo_grad_info(me, column, i, x)

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 ...

Arguments

Type IntentOptional 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 ith time (1,2,...)

real(kind=wp), intent(in), dimension(:) :: x

the nominal variable vector


Calls

proc~~halo_grad_info~~CallsGraph proc~halo_grad_info halo_grad_info uncache uncache proc~halo_grad_info->uncache

Source Code

    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