OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_table1_0.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/.
23!||====================================================================
24!|| hm_read_table1_0 ../starter/source/tools/curve/hm_read_table1_0.F
25!||--- called by ------------------------------------------------------
26!|| hm_read_table1 ../starter/source/tools/curve/hm_read_table.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| hm_get_float_array_index ../starter/source/devtools/hm_reader/hm_get_float_array_index.F
30!|| hm_get_intv ../starter/source/devtools/hm_reader/hm_get_intv.F
31!|| hm_option_is_encrypted ../starter/source/devtools/hm_reader/hm_option_is_encrypted.F
32!|| hm_option_read_key ../starter/source/devtools/hm_reader/hm_option_read_key.F
33!|| hm_option_start ../starter/source/devtools/hm_reader/hm_option_start.F
34!||--- uses -----------------------------------------------------
35!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.F
36!|| message_mod ../starter/share/message_module/message_mod.F
37!|| submodel_mod ../starter/share/modules1/submodel_mod.F
38!|| table_mod ../starter/share/modules1/table_mod.F
39!||====================================================================
40 SUBROUTINE hm_read_table1_0(NTABLE0, NTABLE, TABLE ,NFUNCT,
41 . NPC ,PLD, L,
42 . NOM_OPT,UNITAB, LSUBMODEL)
43C-----------------------------------------------
44C M o d u l e s
45C-----------------------------------------------
46 USE table_mod
47 USE message_mod
48 USE submodel_mod
50 USE unitab_mod
52C-----------------------------------------------
53C I m p l i c i t T y p e s
54C-----------------------------------------------
55#include "implicit_f.inc"
56C-----------------------------------------------
57C D u m m y A r g u m e n t s
58C-----------------------------------------------
59 INTEGER L,NTABLE,NTABLE0,NFUNCT,NPC(*)
60 my_real PLD(*)
61 TYPE(ttable) TABLE(*)
62 INTEGER NOM_OPT(LNOPT1,*)
63 TYPE(submodel_data), DIMENSION(NSUBMOD), INTENT(IN) :: LSUBMODEL
64 TYPE (UNIT_TYPE_), INTENT(IN) :: UNITAB
65C-----------------------------------------------
66C C o m m o n B l o c k s
67C-----------------------------------------------
68#include "scr17_c.inc"
69#include "units_c.inc"
70C-----------------------------------------------
71C L o c a l V a r i a b l e s
72C-----------------------------------------------
73 INTEGER I, K, N, NDIM, NX(4), NY, NPTS, STAT, LL
74 CHARACTER(LEN=NCHARTITLE) :: TITR
75 CHARACTER MESS*40
76 DATA mess/' FUNCTION & TABLE DEFINITION '/
77 LOGICAL :: IS_ENCRYPTED, IS_AVAILABLE
78C======================================================================|
79 is_encrypted = .false.
80 is_available = .false.
81
82 CALL hm_option_start('/TABLE/0')
83 DO i=1,ntable0
84 CALL hm_option_read_key(lsubmodel,
85 . option_titr = titr,
86 . option_id = ll)
87 CALL hm_option_is_encrypted(is_encrypted)
88C-----------------------------------------------
89 nx(1) = 0
90 nx(2) = 0
91 nx(3) = 0
92 nx(4) = 0
93 CALL hm_get_intv('ORDER', ndim, is_available, lsubmodel)
94 IF(ndim/=1.AND.ndim/=2.AND.ndim/=3.AND.ndim/=4)THEN
95 CALL ancmsg(msgid=777,
96 . msgtype=msgerror,
97 . anmode=aninfo_blind_1,
98 . i1=ll,
99 . c1=titr)
100 END IF
101 IF(ndim > 0)CALL hm_get_intv('N1', nx(1), is_available, lsubmodel)
102 IF(ndim==1)THEN
103 l=l+1
104 npts=nx(1)
105 npc(nfunct+l+1)=ll
106 npc(l+1)=npc(l)
107c read abscissa values
108 DO n = 1, npts
109 CALL hm_get_float_array_index('temparray2d_N1',pld(npc(l)+ 2*n-2),n,is_available, lsubmodel, unitab)
110 END DO
111c read ordinate values
112 DO n = 1, npts
113 CALL hm_get_float_array_index('ENG_FUNCT_yValues',pld(npc(l)+2*n-1),n,is_available,lsubmodel,unitab)
114 END DO
115 npc(l+1)=npc(l)+2*npts
116C build table structure
117 table(l)%NOTABLE=ll
118 table(l)%NDIM =1
119
120 ALLOCATE(table(l)%X(1),stat=stat)
121 IF (stat /= 0) CALL ancmsg(msgid=268,anmode=aninfo,
122 . msgtype=msgerror,
123 . c1='TABLE')
124 ALLOCATE(table(l)%X(1)%VALUES(npts),stat=stat)
125 IF (stat /= 0) CALL ancmsg(msgid=268,anmode=aninfo,
126 . msgtype=msgerror,
127 . c1='TABLE')
128
129 ALLOCATE(table(l)%Y,stat=stat)
130 IF (stat /= 0) CALL ancmsg(msgid=268,anmode=aninfo,
131 . msgtype=msgerror,
132 . c1='TABLE')
133 ALLOCATE(table(l)%Y%VALUES(npts),stat=stat)
134 IF (stat /= 0) CALL ancmsg(msgid=268,anmode=aninfo,
135 . msgtype=msgerror,
136 . c1='TABLE')
137
138 DO n=1,npts
139 table(l)%X(1)%VALUES(n)=pld(npc(l)+2*n-2)
140 table(l)%Y%VALUES(n) =pld(npc(l)+2*n-1)
141 END DO
142C
143 IF (is_encrypted)THEN
144 WRITE(iout,'(5X,A,//)')'CONFIDENTIAL DATA'
145 ELSE
146 WRITE(iout,2100) table(l)%NOTABLE, table(l)%NDIM
147 DO k=1,table(l)%NDIM
148 nx(k)=SIZE( table(l)%X(k)%VALUES )
149 WRITE(iout,2200) k
150 WRITE(iout,2250) (table(l)%X(k)%VALUES(n),n=1,nx(k))
151 END DO
152 ny=SIZE(table(l)%Y%VALUES)
153 WRITE(iout,2300)
154 WRITE(iout,2350) (table(l)%Y%VALUES(n),n=1,ny)
155 END if!(IS_ENCRYPTED > 0)
156 endif!(NDIM==1)
157 ENDDO !I=1,NTABLE0
158 RETURN
159C-----------------------------------------------------------------
1602100 FORMAT(/' TABLE ID . . . . . . . . . . . . . . =',i10/
161 . ' NUMBER OF PARAMETERS . . . . . . . . =',i10/)
1622200 FORMAT(/' VALUES FOR PARAMETER NUMBER. . . . . .',i4,':'/)
1632250 FORMAT((3x,5(1x,g20.13))/)
1642300 FORMAT(/' ORDINATE VALUES . . . . . . . . . . . :'/)
1652350 FORMAT((3x,5(1x,g20.13))/)
166 END
if(complex_arithmetic) id
subroutine hm_get_float_array_index(name, rval, index, is_available, lsubmodel, unitab)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_is_encrypted(is_encrypted)
subroutine hm_option_start(entity_type)
subroutine hm_read_table1_0(ntable0, ntable, table, nfunct, npc, pld, l, nom_opt, unitab, lsubmodel)
integer, parameter nchartitle
integer, parameter ncharfield
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:895