OpenRadioss
2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
lecfun.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
!||====================================================================
24
!|| lecfun ../engine/source/tools/curve/lecfun.F
25
!||--- called by ------------------------------------------------------
26
!|| lectur ../engine/source/input/lectur.F
27
!||--- calls -----------------------------------------------------
28
!|| ancmsg ../engine/source/output/message/message.F
29
!|| arret ../engine/source/system/arret.F
30
!||--- uses -----------------------------------------------------
31
!|| message_mod ../engine/share/message_module/message_mod.F
32
!|| table_mod ../engine/share/modules/table_mod.F
33
!||====================================================================
34
SUBROUTINE
lecfun
(NPC,PLD,NFCT,NPTST,TABLE)
35
C-----------------------------------------------
36
C M o d u l e s
37
C-----------------------------------------------
38
USE
table_mod
39
USE
message_mod
40
C-----------------------------------------------
41
C I m p l i c i t T y p e s
42
C-----------------------------------------------
43
#include "implicit_f.inc"
44
C-----------------------------------------------
45
C D u m m y A r g u m e n t s
46
C-----------------------------------------------
47
INTEGER
NFCT, NPTST
48
INTEGER
NPC(*)
49
C REAL
50
my_real
51
. pld(*)
52
TYPE
(
ttable
) TABLE(*)
53
C-----------------------------------------------
54
C C o m m o n B l o c k s
55
C-----------------------------------------------
56
#include "com04_c.inc
"
57
#include "
units_c.inc
"
58
#include "
warn_c.inc
"
59
#include "
task_c.inc
"
60
C-----------------------------------------------
61
C L o c a l V a r i a b l e s
62
C-----------------------------------------------
63
INTEGER L, LL, NPTS, I, J, IK, K, LLNEW, NPTSNEW,
64
. OK
65
C REAL
66
my_real
67
. TIME, FUNCT
68
C-----------------------------------------------
69
IF(ISPMD==0)
70
. WRITE (IOUT,2000) NFCT
71
C
72
DO K=1,NFCT
73
READ (IIN,'(2I10)') LLNEW,NPTSNEW
74
IF(ISPMD==0)
75
. WRITE (IOUT,2200) LLNEW,NPTSNEW
76
OK=0
77
DO L=1,NFUNCT
78
LL=NPC(NFUNCT+L+1)
79
IF(LL==LLNEW)THEN
80
OK=1
81
NPTS = (NPC(L+1)-NPC(L))/2
82
IF(NPTS==NPTSNEW)THEN
83
I=NPC(L)
84
DO J=1,NPTSNEW
85
C
86
READ(IIN,'(2F16.0)') TIME,FUNCT
87
IF(ISPMD==0)
88
. WRITE(IOUT,'(3X,G12.4,2X,G12.4)') TIME,FUNCT
89
C
90
PLD(I)=TIME
91
.AND.
IF(J>1PLD(I)<=PLD(I-2)) THEN
92
IERR=IERR+1
93
IK=J/2+1
94
IF(ISPMD==0)
95
. CALL ANCMSG(MSGID=105,ANMODE=ANINFO_BLIND,
96
. I1=LL,I2=IK,I3=IK-1)
97
CALL ARRET(2)
98
ENDIF
99
I=I+1
100
PLD(I)=FUNCT
101
I=I+1
102
ENDDO
103
ELSE
104
IERR=IERR+1
105
IF(ISPMD==0)THEN
106
CALL ANCMSG(MSGID=106,ANMODE=ANINFO_BLIND,
107
. I1=LL)
108
END IF
109
CALL ARRET(2)
110
ENDIF
111
ENDIF
112
ENDDO
113
IF(OK==0)THEN
114
IF(ISPMD==0)THEN
115
IERR=IERR+1
116
CALL ANCMSG(MSGID=107,ANMODE=ANINFO,
117
. I1=LL)
118
END IF
119
ENDIF
120
C
121
OK=0
122
DO L=1,NFUNCT
123
C
124
C By Table Construction (L) == Function no L
125
LL=TABLE(L)%NOTABLE
126
IF(LL==LLNEW)THEN
127
OK=1
128
NPTS = SIZE(TABLE(L)%X(1)%VALUES)
129
IF(NPTS==NPTSNEW)THEN
130
I=NPC(L)
131
DO J=1,NPTSNEW/2
132
TABLE(L)%X(1)%VALUES(J)=PLD(I)
133
.AND.
IF(J>1
134
. TABLE(L)%X(1)%VALUES(J)<=TABLE(L)%X(1)%VALUES(J-1))THEN
135
IERR=IERR+1
136
IK=J
137
IF(ISPMD==0)
138
. CALL ANCMSG(MSGID=105,ANMODE=ANINFO_BLIND,
139
. I1=LL,I2=IK,I3=IK-1)
140
CALL ARRET(2)
141
ENDIF
142
I=I+1
143
TABLE(L)%Y%VALUES(J)=PLD(I)
144
I=I+1
145
ENDDO
146
ELSE
147
IERR=IERR+1
148
IF(ISPMD==0)THEN
149
CALL ANCMSG(MSGID=106,ANMODE=ANINFO_BLIND,
150
. I1=LL)
151
END IF
152
CALL ARRET(2)
153
ENDIF
154
ENDIF
155
ENDDO
156
IF(OK==0)THEN
157
IF(ISPMD==0)THEN
158
IERR=IERR+1
159
CALL ANCMSG(MSGID=107,ANMODE=ANINFO,
160
. I1=LL)
161
END IF
162
ENDIF
163
ENDDO
164
C
165
RETURN
166
C
167
2000 FORMAT(' NEW LOAD CURVES' //
168
. ' NUMBER OF NEW LOAD CURVES. . . . . . =' ,I10 /)
169
2200 FORMAT(///' LOAD FUNCTION NUMBER. . . . . =',I10/
170
. ' NUMBER OF TIME POINTS . . . . =',I8//
171
. ' TIME VALUE ' /)
172
END
my_real
#define my_real
Definition
cppsort.cpp:32
lecfun
subroutine lecfun(npc, pld, nfct, nptst, table)
Definition
lecfun.F:35
message_mod
Definition
message_mod.F:1257
table_mod
Definition
table_mod.F:113
table_mod::ttable
Definition
table_mod.F:126
engine
source
tools
curve
lecfun.F
Generated by
1.15.0