OpenRadioss
2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
mindex.F
Go to the documentation of this file.
1
Copyright> OpenRadioss
2
Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3
Copyright>
4
Copyright> This program is free software: you can redistribute it and/or modify
5
Copyright> it under the terms of the GNU Affero General Public License as published by
6
Copyright> the Free Software Foundation, either version 3 of the License, or
7
Copyright> (at your option) any later version.
8
Copyright>
9
Copyright> This program is distributed in the hope that it will be useful,
10
Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11
Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
Copyright> GNU Affero General Public License for more details.
13
Copyright>
14
Copyright> You should have received a copy of the GNU Affero General Public License
15
Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16
Copyright>
17
Copyright>
18
Copyright> Commercial Alternative: Altair Radioss Software
19
Copyright>
20
Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21
Copyright> software under a commercial license. Contact Altair to discuss further if the
22
Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23
C
24
!||====================================================================
25
!|| mindex ../starter/source/materials/mat/mat026/mindex.F
26
!||====================================================================
27
INTEGER
FUNCTION
mindex
(AA,NI,NJ,A)
28
C RECHERCHE D'INDEX
29
C-----------------------------------------------
30
C I m p l i c i t T y p e s
31
C-----------------------------------------------
32
#include "implicit_f.inc"
33
C-----------------------------------------------
34
C D u m m y A r g u m e n t s
35
C-----------------------------------------------
36
INTEGER
ni, nj
37
C REAL
38
my_real
39
. aa(ni,nj), a
40
C-----------------------------------------------
41
C L o c a l V a r i a b l e s
42
C-----------------------------------------------
43
INTEGER
i1, i2, i3
44
C REAL
45
my_real
46
. a1, a2, a3
47
i1 = 1
48
i2 = nj
49
a1 = aa(1,i1)
50
a2 = aa(1,i2)
51
IF
(a2>=a1)
THEN
52
1
CONTINUE
53
i3 = (i1 + i2)/2
54
a3 = aa(1,i3)
55
IF
(a3>=a)
THEN
56
i2 = i3
57
a2 = a3
58
ELSE
59
i1 = i3
60
a1 = a3
61
ENDIF
62
IF
(i2-i1>1)
GOTO
1
63
ELSE
64
2
CONTINUE
65
i3 = (i1 + i2)/2
66
a3 = aa(1,i3)
67
IF
(a3<a)
THEN
68
i2 = i3
69
a2 = a3
70
ELSE
71
i1 = i3
72
a1 = a3
73
ENDIF
74
IF
(i2-i1>1)
GOTO
2
75
ENDIF
76
C
77
mindex
=i1
78
RETURN
79
END
my_real
#define my_real
Definition
cppsort.cpp:32
mindex
integer function mindex(aa, ni, nj, a)
Definition
mindex.F:28
starter
source
materials
mat
mat026
mindex.F
Generated by
1.15.0