OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
aconv3.F File Reference
#include "implicit_f.inc"
#include "mvsiz_p.inc"
#include "comlock.inc"
#include "inter22.inc"
#include "com01_c.inc"
#include "com04_c.inc"
#include "com08_c.inc"
#include "vect01_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine aconv3 (vtot, phi, flux, flu1, ixs, ale_connect, ioff, qmv, iflg, tag22, nvar, itask)

Function/Subroutine Documentation

◆ aconv3()

subroutine aconv3 ( vtot,
phi,
flux,
flu1,
integer, dimension(nixs,numels) ixs,
type(t_ale_connectivity), intent(in) ale_connect,
integer ioff,
qmv,
integer iflg,
tag22,
integer nvar,
integer itask )

Definition at line 35 of file aconv3.F.

38C-----------------------------------------------
39C M o d u l e s
40C-----------------------------------------------
41 USE i22tri_mod ! , use only : ibug22_convec
42 USE alefvm_mod
44 use element_mod , only : nixs
45C-----------------------------------------------
46C I m p l i c i t T y p e s
47C-----------------------------------------------
48#include "implicit_f.inc"
49#include "mvsiz_p.inc"
50#include "comlock.inc"
51#include "inter22.inc"
52C-----------------------------------------------
53C D u m m y A r g u m e n t s
54C-----------------------------------------------
55 INTEGER IOFF, IFLG,IXS(NIXS,NUMELS),NVAR,ITASK
56 my_real vtot(*), phi(*), flux(6,*), flu1(*), qmv(12,*), tag22(mvsiz)
57 TYPE(t_ale_connectivity), INTENT(IN) :: ALE_CONNECT
58C-----------------------------------------------
59C C o m m o n B l o c k s
60C-----------------------------------------------
61#include "com01_c.inc"
62#include "com04_c.inc"
63#include "com08_c.inc"
64#include "vect01_c.inc"
65C-----------------------------------------------
66C L o c a l V a r i a b l e s
67C-----------------------------------------------
68 INTEGER :: I, IE, IV,J,IAD2,LGTH
69 my_real :: valvois(6,mvsiz),valel(mvsiz),vl(6,mvsiz), delta(mvsiz)
70 LOGICAL debug_outp
71C-----------------------------------------------
72C S o u r c e L i n e s
73C-----------------------------------------------
74
75 !---------------------------------------------------------!
76 ! CONVECTION !
77 !---------------------------------------------------------!
78 DO i=lft,llt
79 ie = nft+i
80 valel(i) = phi(ie)
81 ENDDO
82 DO i=lft,llt
83 ie = nft+i
84 iad2 = ale_connect%ee_connect%iad_connect(ie)
85 lgth = ale_connect%ee_connect%iad_connect(ie+1) - iad2
86 DO j=1,lgth
87
88 iv = ale_connect%ee_connect%connected(iad2 + j - 1)
89 IF(iv > 0)THEN
90 valvois(j,i) = phi(iv)
91 ELSEIF(iv == 0)THEN
92 valvois(j,i) = phi(ie)
93 ELSE
94 !-IV is segment ID
95 ! ebcs PHI(NUMEL + 1:NSEGFLU) is filled in aconve.F using SEGVAR (filled in ebcs[0-9][0-9].F)
96 valvois(j,i) = phi(-iv+ioff)
97 ENDIF
98 ENDDO
99 ENDDO
100
101 DO i=lft,llt
102 vl(1,i) = valvois(1,i)*flux(1,i)
103 vl(2,i) = valvois(2,i)*flux(2,i)
104 vl(3,i) = valvois(3,i)*flux(3,i)
105 vl(4,i) = valvois(4,i)*flux(4,i)
106 vl(5,i) = valvois(5,i)*flux(5,i)
107 vl(6,i) = valvois(6,i)*flux(6,i)
108 delta(i) = half * dt1 *(-valel(i)*flu1(i) - vl(1,i)-vl(2,i)-vl(3,i)-vl(4,i)-vl(5,i)-vl(6,i))
109 ENDDO
110
111 IF(alefvm_param%IEnabled/=0)THEN
112 IF(nvar==2)THEN
113 DO i=lft,llt
114 delta(i) = delta(i) + (alefvm_param%IWFEXT)*dt1*alefvm_buffer%WFEXT_CELL(i+nft)
115 ENDDO
116 ENDIF
117 ENDIF
118
119 IF(int22==0)THEN
120 DO i=lft,llt
121 vtot(i) = vtot(i) + delta(i)
122 ENDDO
123 ELSE
124 DO i=lft,llt
125 IF(tag22(i)==zero) vtot(i) = vtot(i) + delta(i) !can be optimized later (conditional test is currently within the loop)
126 ENDDO
127 ENDIF
128
129 IF(trimat > 0.AND.iflg == 1)THEN
130 DO i=lft,llt
131 qmv(1,i) = qmv(1,i) - vl(1,i) - valel(i)*qmv(07,i)
132 qmv(2,i) = qmv(2,i) - vl(2,i) - valel(i)*qmv(08,i)
133 qmv(3,i) = qmv(3,i) - vl(3,i) - valel(i)*qmv(09,i)
134 qmv(4,i) = qmv(4,i) - vl(4,i) - valel(i)*qmv(10,i)
135 qmv(5,i) = qmv(5,i) - vl(5,i) - valel(i)*qmv(11,i)
136 qmv(6,i) = qmv(6,i) - vl(6,i) - valel(i)*qmv(12,i)
137 ENDDO
138 ENDIF
139C-----------
140
141
142 !INTERFACE 22 ONLY / OUTPUT---------------!(OBSOLETE)
143 !---------------------------------------------------------!
144 ! DEBUG OUTPUT !
145 !---------------------------------------------------------!
146 !INTERFACE 22 ONLY - OUTPUT---------------!
147 debug_outp = .false.
148 if(int22>0)then
149 debug_outp=.false.
150 if(ibug22_convec /= 0 .AND. ibug22_nvar==nvar)then
151 debug_outp=.true.
152 endif
153
154 if(debug_outp .AND. ibug22_nvar==nvar)then
155
156 call my_barrier
157
158 if(itask==0)then
159 if(ibug22_nvar==nvar)then
160 do i=lft,llt
161 if(int22>0)then;if (tag22(i)/=zero)then;cycle ;endif;endif
162 if(ibug22_convec == ixs(11,i+nft) .OR. ibug22_convec == -1)then
163 if((ibug22_convec==ixs(11,nft+i).OR.ibug22_convec==-1) .AND. nvar==1)then
164 if(delta(i) == zero)cycle
165 !if(int22>0)then;if (tag22(i)==zero)then;print *," UNCUT";endif;endif
166 print *, " brique=", ixs(11,nft+i)
167 print *, " nvar=", nvar
168 print *, " dval=", delta(i)
169 print *, " was:", vtot(i)-delta(i)
170 print *, " is:", vtot(i)
171 print *, " ------------------------"
172 endif
173 endif
174 enddo
175 endif!(IBUG22_NVAR==NVAR)
176 endif !itask
177
178 call my_barrier
179
180 if(itask==1)then
181 if(ibug22_nvar==nvar)then
182 do i=lft,llt
183 if(int22>0)then;if (tag22(i)/=zero)then;cycle ;endif;endif
184 if(ibug22_convec == ixs(11,i+nft) .OR. ibug22_convec == -1)then
185 if((ibug22_convec==ixs(11,nft+i).OR.ibug22_convec==-1) .AND. nvar==1)then
186 if(delta(i) == zero)cycle
187 !if(int22>0)then;if (tag22(i)==zero)then;print *," UNCUT";endif;endif
188 print *, " brique=", ixs(11,nft+i)
189 print *, " nvar=", nvar
190 print *, " dval=", delta(i)
191 print *, " was:", vtot(i)-delta(i)
192 print *, " is:", vtot(i)
193 print *, " ------------------------"
194 endif
195 endif
196 enddo
197 endif!(IBUG22_NVAR==NVAR)
198 endif !itask
199
200 call my_barrier
201
202 if(itask==2)then
203 if(ibug22_nvar==nvar)then
204 do i=lft,llt
205 if(int22>0)then;if (tag22(i)/=zero)then;cycle ;endif;endif
206 if(ibug22_convec == ixs(11,i+nft) .OR. ibug22_convec == -1)then
207 if((ibug22_convec==ixs(11,nft+i).OR.ibug22_convec==-1) .AND. nvar==1)then
208 if(delta(i) == zero)cycle
209 !if(int22>0)then;if (tag22(i)==zero)then;print *," UNCUT";endif;endif
210 print *, " brique=", ixs(11,nft+i)
211 print *, " nvar=", nvar
212 print *, " dval=", delta(i)
213 print *, " was:", vtot(i)-delta(i)
214 print *, " is:", vtot(i)
215 print *, " ------------------------"
216 endif
217 endif
218 enddo
219 endif!(IBUG22_NVAR==NVAR)
220 endif !itask
221
222 call my_barrier
223
224 if(itask==3)then
225 if(ibug22_nvar==nvar)then
226 do i=lft,llt
227 if(int22>0)then;if (tag22(i)/=zero)then;cycle ;endif;endif
228 if(ibug22_convec == ixs(11,i+nft) .OR. ibug22_convec == -1)then
229 if((ibug22_convec==ixs(11,nft+i).OR.ibug22_convec==-1) .AND. nvar==1)then
230 if(delta(i) == zero)cycle
231 !if(int22>0)then;if (tag22(i)==zero)then;print *," UNCUT";endif;endif
232 print *, " brique=", ixs(11,nft+i)
233 print *, " nvar=", nvar
234 print *, " dval=", delta(i)
235 print *, " was:", vtot(i)-delta(i)
236 print *, " is:", vtot(i)
237 print *, " ------------------------"
238 endif
239 endif
240 enddo
241 endif!(IBUG22_NVAR==NVAR)
242 endif !itask
243
244 endif!(debug_outp==.true.)
245 endif!(int22>0)
246 !-----------------------------------------!
247
248C-----------------------------------------------
249 RETURN
#define my_real
Definition cppsort.cpp:32
type(alefvm_buffer_), target alefvm_buffer
Definition alefvm_mod.F:120
type(alefvm_param_), target alefvm_param
Definition alefvm_mod.F:121
integer function nvar(text)
Definition nvar.F:32
subroutine my_barrier
Definition machine.F:31