ETS  \$Id: Doxyfile 2162 2020-02-26 14:16:09Z g2dpc $
 All Classes Files Functions Variables Pages
user_maximum.f90
Go to the documentation of this file.
1 function user_maximum(nn, ff) result(f_user_maximum)
2 !----------------------------------------------------------------------------!
3 ! Search for the maximum of a function ff !
4 !----------------------------------------------------------------------------!
5 
6  use itm_types
7 
8  implicit none
9 
10  integer(itm_i4) :: i, nn
11 
12  real(r8) :: ff(nn)
13  real(r8) :: maximum
14  real(r8) :: f_user_maximum
15 
16  maximum = ff(1)
17  do i = 2, nn
18  maximum = max(maximum, ff(i))
19  end do
20 
21  f_user_maximum = maximum
22 
23 end function user_maximum
real(r8) function user_maximum(nn, ff)
Definition: user_maximum.f90:1