The TELEMAC-MASCARET system
trunk
sources
utils
bief
mini.f
Go to the documentation of this file.
1
! ***************
2
SUBROUTINE
mini
3
! ***************
4
!
5
&( xmin , imin , x , npoin )
6
!
7
!***********************************************************************
8
! BIEF V6P1 21/08/2010
9
!***********************************************************************
10
!
11
!brief LOOKS FOR THE LOWEST VALUE IN ARRAY X
12
!+ OF DIMENSION NPOIN.
13
!
14
!history E. PELTIER (LNH)
15
!+ 17/08/94
16
!+ V5P1
17
!+
18
!
19
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
20
!+ 13/07/2010
21
!+ V6P0
22
!+ Translation of French comments within the FORTRAN sources into
23
!+ English comments
24
!
25
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
26
!+ 21/08/2010
27
!+ V6P0
28
!+ Creation of DOXYGEN tags for automated documentation and
29
!+ cross-referencing of the FORTRAN sources
30
!
31
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32
!| IMIN |<--| INDEX OF MINIMUM
33
!| NPOIN |-->| DIMENSION OF X
34
!| X |-->| ARRAY WITH VALUES TO LOOK AT
35
!| XMIN |<--| THE MINIMUM
36
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37
!
38
USE
declarations_special
39
IMPLICIT NONE
40
!
41
!+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
42
!
43
INTEGER
,
INTENT(IN)
:: NPOIN
44
INTEGER
,
INTENT(INOUT)
:: IMIN
45
DOUBLE PRECISION
,
INTENT(INOUT)
:: XMIN
46
DOUBLE PRECISION
,
INTENT(IN)
:: X(npoin)
47
!
48
!+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
49
!
50
INTEGER
I
51
!
52
!-----------------------------------------------------------------------
53
!
54
xmin = x(1)
55
imin = 1
56
!
57
DO
i = 2, npoin
58
!
59
IF
(x(i).LT.xmin)
THEN
60
imin = i
61
xmin = x(i)
62
ENDIF
63
!
64
ENDDO
! I
65
!
66
!-----------------------------------------------------------------------
67
!
68
RETURN
69
END
declarations_special
Definition:
declarations_special.F:3
mini
subroutine mini(XMIN, IMIN, X, NPOIN)
Definition:
mini.f:7