EMPIRE DA  v1.9.1
Data assimilation codes using EMPIRE communication
 All Classes Files Functions Variables Pages
objective_function.f90
Go to the documentation of this file.
1 subroutine objective_function(n,x,f)
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), intent(out) :: f
7 
8 integer :: i
9 ! test function
10 
11 f=.25d0*( x(1)-1.d0 )**2
12 do 20 i=2, n
13  f = f + ( x(i)-x(i-1 )**2 )**2
14 20 continue
15  f = 4.d0*f
16 
17 
18 end subroutine objective_function
subroutine objective_function(n, x, f)