EMPIRE DA  v1.9.1
Data assimilation codes using EMPIRE communication
 All Classes Files Functions Variables Pages
objective_gradient.f90
Go to the documentation of this file.
1 subroutine objective_gradient(n,x,g)
2 implicit none
3 integer, parameter :: rk = kind(1.0d0)
4 integer, intent(in) :: n
5 real(kind=rk), dimension(n), intent(in) :: x
6 real(kind=rk), dimension(n), intent(out) :: g
7 ! Rosenbrock function gradient
8 g(1) = 200*(x(2) - x(1)**2)*(-2*x(1)) - 2*(1 - x(1))
9 g(2) = 200*(x(2) - x(1)**2)
10 
11 end subroutine objective_gradient
subroutine objective_gradient(n, x, g)