OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
fixtemp.F File Reference
#include "implicit_f.inc"
#include "mvsiz_p.inc"
#include "com01_c.inc"
#include "com04_c.inc"
#include "com08_c.inc"
#include "param_c.inc"
#include "parit_c.inc"
#include "vectorize.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine fixtemp (python, ibft, val, temp, npc, tf, nsensor, sensor_tab, glob_therm, snpc)

Function/Subroutine Documentation

◆ fixtemp()

subroutine fixtemp ( type(python_) python,
integer, dimension(glob_therm%nift,*) ibft,
val,
temp,
integer, dimension(*) npc,
tf,
integer, intent(in) nsensor,
type (sensor_str_), dimension(nsensor), intent(in) sensor_tab,
type (glob_therm_), intent(inout) glob_therm,
integer, intent(in) snpc )

Definition at line 38 of file fixtemp.F.

40C-----------------------------------------------
41C M o d u l e s
42C-----------------------------------------------
43 USE redef3_mod, only: get_python_funct_id
44 USE sensor_mod
45 use glob_therm_mod
46 USE python_funct_mod
47 USE vinter_mixed_mod
48C-----------------------------------------------
49C I m p l i c i t T y p e s
50C-----------------------------------------------
51#include "implicit_f.inc"
52C-----------------------------------------------
53C G l o b a l P a r a m e t e r s
54C-----------------------------------------------
55#include "mvsiz_p.inc"
56C-----------------------------------------------
57C C o m m o n B l o c k s
58C-----------------------------------------------
59#include "com01_c.inc"
60#include "com04_c.inc"
61#include "com08_c.inc"
62#include "param_c.inc"
63#include "parit_c.inc"
64C-----------------------------------------------
65C D u m m y A r g u m e n t s
66C-----------------------------------------------
67 type(python_) :: PYTHON
68 type (glob_therm_) ,intent(inout) :: glob_therm
69 INTEGER ,INTENT(IN) :: NSENSOR
70 INTEGER NPC(*)
71 INTEGER IBFT(GLOB_THERM%NIFT,*)
72 my_real :: temp(*),tf(*)
73 my_real :: val(glob_therm%LFACTHER,*)
74 integer, intent(in) :: SNPC
75 TYPE (SENSOR_STR_) ,DIMENSION(NSENSOR) ,INTENT(IN) :: SENSOR_TAB
76C-----------------------------------------------
77C L o c a l V a r i a b l e s
78C-----------------------------------------------
79 INTEGER I,N,L,II, NN,ISENS,IC, IDEB, ISMOOTH
80 INTEGER ILENC(MVSIZ), IPOSC(MVSIZ), IADC(MVSIZ)
81 INTEGER INDEX(MVSIZ)
82 my_real fac, facx, startt, stopt, ts
83 my_real yc(mvsiz), tsc(mvsiz), dydxc(mvsiz)
84 integer :: pyid
85 logical :: any_python_func
86C-----------------------------------------------
87 ideb = 0
88 ismooth = 0
89C
90 DO nn=1,glob_therm%NFXTEMP,nvsiz
91 ic = 0
92 IF (nsensor > 0) THEN
93 DO ii = 1, min(glob_therm%NFXTEMP - ideb,nvsiz)
94 n = ii+ideb
95 startt = val(1,n)
96 stopt = val(2,n)
97C
98 isens = ibft(3,n)
99 IF (isens == 0)THEN
100 ts = tt*glob_therm%THEACCFACT - startt
101 ELSE
102 startt = startt + sensor_tab(isens)%TSTART
103 stopt = stopt + sensor_tab(isens)%TSTART
104 ts = tt*glob_therm%THEACCFACT -(startt + sensor_tab(isens)%TSTART)
105 ENDIF
106C
107 IF(tt*glob_therm%THEACCFACT < startt) cycle
108 IF(tt*glob_therm%THEACCFACT > stopt) cycle
109 facx = val(3,n)
110 i=iabs(ibft(1,n))
111 ic = ic + 1
112 index(ic)= n
113C TSC(IC) = (TS+DT2)*FACX
114 tsc(ic) = ts*facx
115 ENDDO
116 ELSE
117C sans aucun sensor
118 DO ii = 1, min(glob_therm%NFXTEMP-ideb,nvsiz)
119 n = ii+ideb
120 startt = val(1,n)
121 stopt = val(2,n)
122 IF (tt*glob_therm%THEACCFACT < startt) cycle
123 IF (tt*glob_therm%THEACCFACT > stopt) cycle
124 facx = val(3,n)
125 i=iabs(ibft(1,n))
126 ic = ic + 1
127 index(ic) = n
128 ts = tt*glob_therm%THEACCFACT - startt
129 tsc(ic) = ts*facx
130 ENDDO
131 ENDIF
132C
133 ideb = ideb + min(glob_therm%NFXTEMP-ideb,nvsiz)
134C
135 any_python_func = .false.
136 IF(ncycle == 0)THEN
137 DO ii=1,ic
138 n = index(ii)
139 l = ibft(2,n)
140 IF (l > 0) ismooth = npc(2*nfunct+l+1)
141 iposc(ii) = 0
142 pyid = get_python_funct_id(nfunct,l,npc,snpc)
143 if(pyid > 0) then
144 iadc(ii) =-pyid
145 ilenc(ii) =-pyid
146 any_python_func = .true.
147 else
148 iadc(ii) = npc(l) / 2 + 1
149 ilenc(ii) = npc(l+1) / 2 - iadc(ii) - iposc(ii)
150 endif
151 ENDDO
152 ELSE
153 DO ii=1,ic
154 n = index(ii)
155 l = ibft(2,n)
156 IF (l > 0) ismooth = npc(2*nfunct+l+1)
157 iposc(ii) = ibft(4,n)
158 pyid = get_python_funct_id(nfunct,l,npc,snpc)
159 if(pyid > 0) then
160 iadc(ii) =-pyid
161 ilenc(ii) =-pyid
162 any_python_func = .true.
163 else
164 iadc(ii) = npc(l) / 2 + 1
165 ilenc(ii) = npc(l+1) / 2 - iadc(ii) - iposc(ii)
166 endif
167 ENDDO
168 ENDIF
169
170 if(any_python_func) then
171 call vinter_mixed(python,tf,iadc,iposc,ilenc,ic,tsc,dydxc,yc)
172 else
173 IF (ismooth == 0) THEN
174 CALL vinter(tf,iadc,iposc,ilenc,ic,tsc,dydxc,yc)
175 ELSE
176 CALL vinter_smooth(tf,iadc,iposc,ilenc,ic,tsc,dydxc,yc)
177 ENDIF ! IF (ISMOOTH == 0)
178 ENDIF ! if(any_python_func)
179C
180 IF(ivector == 0) THEN
181 DO ii=1,ic
182 n = index(ii)
183 ibft(4,n) = iposc(ii)
184 fac = val(4,n)
185 yc(ii) = yc(ii) * fac
186 i=iabs(ibft(1,n))
187 temp(i) = yc(ii)
188 ENDDO
189 ELSE
190C partie vectorielle
191#include "vectorize.inc"
192 DO ii=1,ic
193 n = index(ii)
194 ibft(4,n) = iposc(ii)
195 fac = val(4,n)
196 yc(ii) = yc(ii) * fac
197 i=iabs(ibft(1,n))
198 temp(i) = yc(ii)
199 ENDDO
200 ENDIF
201C
202 ENDDO !NN=1,NFXTEMP
203C
204 RETURN
#define my_real
Definition cppsort.cpp:32
#define min(a, b)
Definition macros.h:20
subroutine vinter(tf, iad, ipos, ilen, nel, x, dydx, y)
Definition vinter.F:72
subroutine vinter_smooth(tf, iad, ipos, ilen, nel0, x, dydx, y)