OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
alefvm_main.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!|| alefvm_main ../engine/source/ale/alefvm/alefvm_main.F
25!||--- called by ------------------------------------------------------
26!|| resol ../engine/source/engine/resol.F
27!||--- calls -----------------------------------------------------
28!|| alefvm_scheme ../engine/source/ale/alefvm/alefvm_scheme.F
29!|| alefvm_sfint3 ../engine/source/ale/alefvm/alefvm_sfint3.F
30!|| alefvm_sfint3_int22 ../engine/source/ale/alefvm/alefvm_sfint3_int22.F
31!|| initbuf ../engine/share/resol/initbuf.F
32!|| my_barrier ../engine/source/system/machine.F
33!||--- uses -----------------------------------------------------
34!|| ale_connectivity_mod ../common_source/modules/ale/ale_connectivity_mod.F
35!|| alefvm_mod ../common_source/modules/ale/alefvm_mod.F
36!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.F90
37!|| element_mod ../common_source/modules/elements/element_mod.F90
38!|| i22tri_mod ../common_source/modules/interfaces/cut-cell-search_mod.F
39!|| initbuf_mod ../engine/share/resol/initbuf.F
40!|| intbufdef_mod ../common_source/modules/interfaces/intbufdef_mod.F90
41!|| segvar_mod ../engine/share/modules/segvar_mod.F
42!||====================================================================
43 SUBROUTINE alefvm_main(
44 1 X , V ,
45 2 ELBUF_TAB , VR ,
46 3 ALE_CONNECT, IPARG , IXS ,
47 4 NALE ,
48 5 ITASK , NODFT , NODLT ,IPM, NV46 ,MSNF )
49C-----------------------------------------------
50C D e s c r i p t i o n
51C-----------------------------------------------
52C 'alefvm' is related to a collocated scheme (built from FVM and based on Godunov scheme)
53C which was temporarily introduced for experimental option /INTER/TYPE22 (FSI coupling with cut cell method)
54C This cut cell method is not completed, abandoned, and is not an official option.
55C There is no other use for this scheme which is automatically enabled when /INTER/TYPE22 is defined (INT22>0 => IALEFVM=1).
56C
57C This subroutine is treating an uncut cell.
58C-----------------------------------------------
59C M o d u l e s
60C-----------------------------------------------
61 USE initbuf_mod
62 USE elbufdef_mod
63 USE intbufdef_mod
64 USE alefvm_mod
65 USE i22tri_mod
66 USE segvar_mod
68 use element_mod , only : nixs
69C-----------------------------------------------
70C I m p l i c i t T y p e s
71C-----------------------------------------------
72#include "implicit_f.inc"
73#include "comlock.inc"
74C-----------------------------------------------
75C C o m m o n B l o c k s
76C-----------------------------------------------
77#include "com01_c.inc"
78#include "com04_c.inc"
79#include "param_c.inc"
80#include "vect01_c.inc"
81#include "scr17_c.inc"
82#include "task_c.inc"
83#include "inter22.inc"
84C-----------------------------------------------
85C D u m m y A r g u m e n t s
86C-----------------------------------------------
87 INTEGER IXS(NIXS,*),IPARG(NPARG,NGROUP),NALE(*),NODFT,ITASK,NV46,NODLT,IPM(NPROPMI,NUMMAT)
88
89 my_real X(3,*),V(3,*),VR(3,*),MSNF(*)
90 TYPE(ELBUF_STRUCT_), TARGET, DIMENSION(NGROUP) :: ELBUF_TAB
91 TYPE(t_ale_connectivity), INTENT(IN) :: ALE_CONNECT
92C-----------------------------------------------
93C L o c a l V a r i a b l e s
94C-----------------------------------------------
95 INTEGER N, NG, NF1,
96 . isolnod, nel,
97 . istra
98 INTEGER IPLA
99 INTEGER IALEFVM_FLG, IMAT,NSG,NVC
100 my_real
101 . bid
102
103 TYPE(g_bufel_) ,POINTER :: GBUF
104 TYPE(l_bufel_) ,POINTER :: LBUF
105
106 INTEGER :: NIN,NBF,NBL,tNB
107C-----------------------------------------------
108C P r e - C o n d i t i o n
109C-----------------------------------------------
110 IF(alefvm_param%IEnabled==0)RETURN
111C-----------------------------------------------
112C S o u r c e L i n e s
113C-----------------------------------------------
114
115 !---------------------------------------------------------!
116 ! 2. INIT/PARAMETERS !
117 !---------------------------------------------------------!
118 nin = 1
119 bid = zero
120 !---------------------------------------------------------!
121 ! 3. INIT/MULTITHREADING !
122 !---------------------------------------------------------!
123 nbf = 1+itask*nb/nthread
124 nbl = (itask+1)*nb/nthread
125 nbl = min(nbl,nb)
126 tnb = nbl-nbf+1
127
128 CALL my_barrier
129
130 IF(int22/=0)THEN
131 CALL alefvm_sfint3_int22(ixs, nv46, itask, nbf, nbl, nin)
132 ENDIF
133
134
135 !---------------------------------------------
136 ! ALEFVM : FINITE VOLUME FOR MOMENTUM
137 !---------------------------------------------
138
139 alefvm_buffer%VERTEX(1:4,1:numnod) = zero ! for alefvm_expand_momentum.F => vel on nodes
140
141 IF(alefvm_param%Ienabled > 0) THEN
142 CALL my_barrier
143
144 DO ng=itask+1,ngroup,nthread
145 CALL initbuf(
146 1 iparg ,ng ,
147 2 mtn ,nel ,nft ,iad ,ity ,
148 3 npt ,jale ,ismstr ,jeul ,jtur ,
149 4 jthe ,jlag ,jmult ,jhbe ,jivf ,
150 5 nvaux ,jpor ,jcvt ,jclose ,ipla ,
151 6 irep ,iint ,igtyp ,israt ,isrot ,
152 7 icsen ,isorth ,isorthg ,ifailure,jsms
153 . )
154 gbuf => elbuf_tab(ng)%GBUF
155 IF (iparg(8,ng) == 1) cycle
156 IF (jlag == 1 .OR. ity>2) cycle
157 nsg = iparg(10,ng)
158 nvc = iparg(19,ng)
159 isolnod = iparg(28,ng)
160 istra = iparg(44,ng)
161 jsph = 0
162 isph2sol = 0
163 ipartsph = iparg(69,ng)
164 lft = 1
165 llt = nel
166 nf1 = nft+1
167 IF(ity == 1 .AND. isolnod == 4)THEN
168 !CALL S4FORC3()
169
170 ELSEIF(ity == 1 .AND. isolnod /= 4)THEN
171 lbuf => elbuf_tab(ng)%BUFLY(1)%LBUF(1,1,1)
172 imat = ixs(1,nft+lft) !all elem in group does have same material id.
173 ialefvm_flg = ipm(251,imat)
174 IF (ialefvm_flg <= 1) cycle
175 CALL alefvm_sfint3(
176 1 ixs , nv46 , ale_connect , ialefvm_flg,
177 2 ipm , iparg , ng ,
178 3 x , gbuf%TAG22 ,nel )
179 CALL alefvm_scheme(
180 1 ixs , ialefvm_flg,
181 2 gbuf%MOM, gbuf%VOL, gbuf%RHO,
182 3 ipm , gbuf%TAG22 ,
183 4 lbuf%SSP,gbuf%SIG , nel )
184 ELSEIF (ity == 2 .AND. jmult == 0) THEN
185 !CALL QFORC2()
186 ELSEIF(ity == 2 .AND. jmult /= 0)THEN
187 !CALL BFORC2()
188 ENDIF
189 enddo!next NG
190 endif!IF (ILAW11 /= 0) THEN
191
192 CALL my_barrier
193
194
195
196 DO n=nodft,nodlt
197 IF(alefvm_buffer%VERTEX(4,n) == zero .OR. nale(n)==0)cycle
198 v(1,n) = alefvm_buffer%VERTEX(1,n)
199 v(2,n) = alefvm_buffer%VERTEX(2,n)
200 v(3,n) = alefvm_buffer%VERTEX(3,n)
201 ENDDO
202
203#include "vectorize.inc"
204 !---TRANSLATIONS---!
205 DO n=nodft,nodlt
206 IF(msnf(n)<=zero)cycle
207 IF(nale(n)==0)cycle
208 v(1,n) = v(1,n) / msnf(n)
209 v(2,n) = v(2,n) / msnf(n)
210 v(3,n) = v(3,n) / msnf(n)
211 ENDDO
212 IF (iroddl/=0) THEN
213#include "vectorize.inc"
214 !---TROTATIONS---!
215 DO n=nodft,nodlt
216 IF(nale(n)==0)cycle
217 vr(1,n) = zero
218 vr(2,n) = zero
219 vr(3,n) = zero
220 ENDDO
221 ENDIF
222
223 CALL my_barrier
224 alefvm_buffer%VERTEX(4,1:numnod) = zero ! was needed for alefvm_expand_momentum.F reset here for gravity on next cycle
225
226 RETURN
227 END
subroutine alefvm_main(x, v, elbuf_tab, vr, ale_connect, iparg, ixs, nale, itask, nodft, nodlt, ipm, nv46, msnf)
Definition alefvm_main.F:49
subroutine alefvm_scheme(ixs, ialefvm_flg, mom, vol, rho, ipm, iad22, ssp, sig, nel)
subroutine alefvm_sfint3(ixs, nv46, ale_connect, ialefvm_flg, ipm, iparg, ng, x, iad22, nel)
subroutine alefvm_sfint3_int22(ixs, nv46, itask, nbf, nbl, nin)
#define min(a, b)
Definition macros.h:20
type(alefvm_buffer_), target alefvm_buffer
Definition alefvm_mod.F:120
type(alefvm_param_), target alefvm_param
Definition alefvm_mod.F:121
subroutine initbuf(iparg, ng, mtn, llt, nft, iad, ity, npt, jale, ismstr, jeul, jtur, jthe, jlag, jmult, jhbe, jivf, mid, jpor, jcvt, jclose, jpla, irep, iint, igtyp, israt, isrot, icsen, isorth, isorthg, ifailure, jsms)
Definition initbuf.F:261
subroutine my_barrier
Definition machine.F:31