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 ../engine/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
. a
40
C REAL
41
my_real
42
. aa(ni,nj)
43
C-----------------------------------------------
44
C L o c a l V a r i a b l e s
45
C-----------------------------------------------
46
INTEGER
i1, i2, i3
47
C REAL
48
my_real
49
. a1, a2, a3
50
C-----------------------------------------------
51
i1 = 1
52
i2 = nj
53
a1 = aa(1,i1)
54
a2 = aa(1,i2)
55
IF
(a2>=a1)
THEN
56
1
CONTINUE
57
i3 = (i1 + i2)/2
58
a3 = aa(1,i3)
59
IF
(a3>=a)
THEN
60
i2 = i3
61
a2 = a3
62
ELSE
63
i1 = i3
64
a1 = a3
65
ENDIF
66
IF
(i2-i1>1)
GOTO
1
67
ELSE
68
2
CONTINUE
69
i3 = (i1 + i2)/2
70
a3 = aa(1,i3)
71
IF
(a3<a)
THEN
72
i2 = i3
73
a2 = a3
74
ELSE
75
i1 = i3
76
a1 = a3
77
ENDIF
78
IF
(i2-i1>1)
GOTO
2
79
ENDIF
80
C
81
mindex
=i1
82
RETURN
83
END
my_real
#define my_real
Definition
cppsort.cpp:32
mindex
integer function mindex(aa, ni, nj, a)
Definition
mindex.F:28
engine
source
materials
mat
mat026
mindex.F
Generated by
1.15.0