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