OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_table1_0.F File Reference
#include "implicit_f.inc"
#include "scr17_c.inc"
#include "units_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine hm_read_table1_0 (ntable0, ntable, table, nfunct, npc, pld, l, nom_opt, unitab, lsubmodel)

Function/Subroutine Documentation

◆ hm_read_table1_0()

subroutine hm_read_table1_0 ( integer ntable0,
integer ntable,
type(ttable), dimension(*) table,
integer nfunct,
integer, dimension(*) npc,
pld,
integer l,
integer, dimension(lnopt1,*) nom_opt,
type (unit_type_), intent(in) unitab,
type(submodel_data), dimension(nsubmod), intent(in) lsubmodel )

Definition at line 40 of file hm_read_table1_0.F.

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 ITYPE, IBID, NFUNCT0
74 INTEGER I, J, K, II, N, NDIM, NX(4), NY, JREC, NPTS, STAT, LL
75 INTEGER IERROR, NF, IDFUNC, NP
76 my_real bid, f5(5), time, funct
77 CHARACTER(LEN=NCHARTITLE) :: TITR,TITR1
78 CHARACTER(LEN=NCHARFIELD) :: KEY
79 CHARACTER MESS*40
80 DATA mess/' FUNCTION & TABLE DEFINITION '/
81 LOGICAL :: IS_ENCRYPTED, IS_AVAILABLE
82C======================================================================|
83 is_encrypted = .false.
84 is_available = .false.
85
86 CALL hm_option_start('/TABLE/0')
87 DO i=1,ntable0
88 CALL hm_option_read_key(lsubmodel,
89 . option_titr = titr,
90 . option_id = ll)
91 CALL hm_option_is_encrypted(is_encrypted)
92C-----------------------------------------------
93 nx(1) = 0
94 nx(2) = 0
95 nx(3) = 0
96 nx(4) = 0
97 CALL hm_get_intv('ORDER', ndim, is_available, lsubmodel)
98 IF(ndim/=1.AND.ndim/=2.AND.ndim/=3.AND.ndim/=4)THEN
99 CALL ancmsg(msgid=777,
100 . msgtype=msgerror,
101 . anmode=aninfo_blind_1,
102 . i1=ll,
103 . c1=titr)
104 END IF
105 IF(ndim > 0)CALL hm_get_intv('N1', nx(1), is_available, lsubmodel)
106 IF(ndim==1)THEN
107 l=l+1
108 npts=nx(1)
109 npc(nfunct+l+1)=ll
110 npc(l+1)=npc(l)
111c read abscissa values
112 DO n = 1, npts
113 CALL hm_get_float_array_index('temparray2d_n1',PLD(NPC(L)+ 2*N-2),N,IS_AVAILABLE, LSUBMODEL, UNITAB)
114 END DO
115c read ordinate values
116 DO N = 1, NPTS
117 CALL HM_GET_FLOAT_ARRAY_INDEX('eng_funct_yvalues',PLD(NPC(L)+2*N-1),N,IS_AVAILABLE,LSUBMODEL,UNITAB)
118 END DO
119 NPC(L+1)=NPC(L)+2*NPTS
120C build table structure
121 TABLE(L)%NOTABLE=LL
122 TABLE(L)%NDIM =1
123
124 ALLOCATE(TABLE(L)%X(1),STAT=stat)
125 IF (STAT /= 0) CALL ANCMSG(MSGID=268,ANMODE=ANINFO,
126 . MSGTYPE=MSGERROR,
127 . C1='table')
128 ALLOCATE(TABLE(L)%X(1)%VALUES(NPTS),STAT=stat)
129 IF (STAT /= 0) CALL ANCMSG(MSGID=268,ANMODE=ANINFO,
130 . MSGTYPE=MSGERROR,
131 . C1='table')
132
133 ALLOCATE(TABLE(L)%Y,STAT=stat)
134 IF (STAT /= 0) CALL ANCMSG(MSGID=268,ANMODE=ANINFO,
135 . MSGTYPE=MSGERROR,
136 . C1='table')
137 ALLOCATE(TABLE(L)%Y%VALUES(NPTS),STAT=stat)
138 IF (STAT /= 0) CALL ANCMSG(MSGID=268,ANMODE=ANINFO,
139 . MSGTYPE=MSGERROR,
140 . C1='table')
141
142 DO N=1,NPTS
143 TABLE(L)%X(1)%VALUES(N)=PLD(NPC(L)+2*N-2)
144 TABLE(L)%Y%VALUES(N) =PLD(NPC(L)+2*N-1)
145 END DO
146C
147 IF (IS_ENCRYPTED)THEN
148 WRITE(IOUT,'(5x,a,//)')'confidential data'
149 ELSE
150 WRITE(IOUT,2100) TABLE(L)%NOTABLE, TABLE(L)%NDIM
151 DO K=1,TABLE(L)%NDIM
152 NX(K)=SIZE( TABLE(L)%X(K)%VALUES )
153 WRITE(IOUT,2200) K
154 WRITE(IOUT,2250) (TABLE(L)%X(K)%VALUES(N),N=1,NX(K))
155 END DO
156 NY=SIZE(TABLE(L)%Y%VALUES)
157 WRITE(IOUT,2300)
158 WRITE(IOUT,2350) (TABLE(L)%Y%VALUES(N),N=1,NY)
159 END IF!(IS_ENCRYPTED > 0)
160 ENDIF!(NDIM==1)
161 ENDDO !I=1,NTABLE0
162 RETURN
163C-----------------------------------------------------------------
1642000 FORMAT(//
165 . ' tables'/
166 . ' ------'/
167 . ' number of tables . . . . . . . . . . =',I10/)
1682100 FORMAT(/' table id . . . . . . . . . . . . . . =',I10/
169 . ' number of parameters . . . . . . . . =',I10/)
1702200 FORMAT(/' values for PARAMETER number. . . . . .',I4,':'/)
1712250 FORMAT((3X,5(1X,G20.13))/)
1722300 FORMAT(/' ordinate values . . . . . . . . . . . :'/)
1732350 FORMAT((3X,5(1X,G20.13))/)
#define my_real
Definition cppsort.cpp:32
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)
initmumps id
for(i8=*sizetab-1;i8 >=0;i8--)
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:889