OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
alew6.F File Reference
#include "implicit_f.inc"
#include "spmd_c.inc"
#include "com01_c.inc"
#include "com04_c.inc"
#include "com08_c.inc"
#include "param_c.inc"
#include "task_c.inc"
#include "tabsiz_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine alew6 (x, v, w, wa, xcell, xface, ale_ne_connect, nale, nodft, nodlt, itask, nercvois, nesdvois, lercvois, lesdvois, elbuf_tab, iparg, ixs, ixq)

Function/Subroutine Documentation

◆ alew6()

subroutine alew6 ( x,
v,
w,
wa,
xcell,
xface,
type(t_connectivity), intent(in) ale_ne_connect,
integer, dimension(numnod) nale,
integer nodft,
integer nodlt,
integer itask,
integer, dimension(*), intent(in) nercvois,
integer, dimension(*), intent(in) nesdvois,
integer, dimension(*), intent(in) lercvois,
integer, dimension(*), intent(in) lesdvois,
type(elbuf_struct_), dimension(ngroup) elbuf_tab,
integer, dimension(nparg,ngroup) iparg,
integer, dimension(nixs,numels) ixs,
integer, dimension(nixq,numelq) ixq )

Definition at line 39 of file alew6.F.

45C-----------------------------------------------
46C D e s c r i p t i o n
47C-----------------------------------------------
48C VOLUME GRID SMOOTHING
49C Compute Grid for /ALE/GRID/VOLUME
50C
51C X,D,V are allocated to SX,SD,DV=3*(NUMNOD_L+NUMVVOIS_L)
52C in grid subroutine it may needed to access nodes which
53C are connected to a remote elem. They are sored in X(1:3,NUMNOD+1:)
54C Consequently X is defined here X(3,SX/3) instead of X(3,NUMNOD) as usually
55C-----------------------------------------------
56C M o d u l e s
57C-----------------------------------------------
59 USE elbufdef_mod
60 use element_mod , only : nixs,nixq
61C-----------------------------------------------
62C I m p l i c i t T y p e s
63C-----------------------------------------------
64#include "implicit_f.inc"
65#include "spmd_c.inc"
66C-----------------------------------------------
67C C o m m o n B l o c k s
68C-----------------------------------------------
69#include "com01_c.inc"
70#include "com04_c.inc"
71#include "com08_c.inc"
72#include "param_c.inc"
73#include "task_c.inc"
74#include "tabsiz_c.inc"
75C-----------------------------------------------
76C D u m m y A r g u m e n t s
77C-----------------------------------------------
78! SPMD CASE : SX >= 3*NUMNOD (SX = 3*(NUMNOD_L+NRCVVOIS_L))
79! X(1:3,1:NUMNOD) : local nodes
80! (1:3, NUMNOD+1:) additional nodes (also on adjacent domains but connected to the boundary of the current domain)
81! idem with D(SD), and V(SV)
82C-----------------------------------------------
83 INTEGER NALE(NUMNOD), NODFT, NODLT, ITASK,
84 . IPARG(NPARG,NGROUP),IXS(NIXS,NUMELS),IXQ(NIXQ,NUMELQ)
85 my_real x(3,sx/3), v(3,sv/3), w(3,sw/3), wa(3,*), xcell(3, *), xface(3,6,*)
86 TYPE(t_connectivity), INTENT(IN) :: ALE_NE_CONNECT
87 INTEGER, INTENT(IN) :: NERCVOIS(*), NESDVOIS(*), LERCVOIS(*), LESDVOIS(*)
88 TYPE(ELBUF_STRUCT_), DIMENSION(NGROUP) :: ELBUF_TAB
89C-----------------------------------------------
90C L o c a l V a r i a b l e s
91C-----------------------------------------------
92 INTEGER I, LENCOM
93 INTEGER :: IAD1, IAD2, NG, NEL, NFT, ITY, ISOLNOD, IEL, ELT_ID
94 my_real :: sum_vol, y1, y2, y3, y4, z1, z2, z3, z4, a1, a2
95C ---------------------------------------------
96C B e g i n n i n g o f S u b r o u t i n e
97C ---------------------------------------------
98 wa(1:3,nodft:nodlt)=x(1:3,nodft:nodlt)
99 CALL my_barrier
100 DO ng = itask + 1, ngroup, nthread
101 nel = iparg(2, ng)
102 nft = iparg(3, ng)
103 ity = iparg(5, ng)
104 isolnod = iparg(28, ng)
105 IF (ity == 1 .AND. isolnod /= 4) THEN
106 CALL centroid3(nel, nel, nft, ixs, x,
107 . xcell(:, 1 + nft : nel + nft),
108 . xface(:, :, 1 + nft : nel + nft))
109 ELSEIF (ity == 1 .AND. isolnod == 4) THEN
110 CALL centroid3t(nel, nel, nft, ixs, x,
111 . xcell(:, 1 + nft : nel + nft),
112 . xface(:, :, 1 + nft : nel + nft))
113 ELSEIF (ity == 2) THEN
114 CALL centroid2(nel, nel, nft, ixq, x,
115 . xcell(:, 1 + nft : nel + nft),
116 . xface(:, :, 1 + nft : nel + nft))
117 ENDIF
118 IF (ity == 1 .OR. ity == 2) THEN
119C Volume stored in XFACE for SMP reasons
120 IF (n2d /= 1) THEN
121 DO i = 1, nel
122 xface(1,1,i + nft) = elbuf_tab(ng)%GBUF%VOL(i)
123 ENDDO
124 ELSE
125 DO i = 1, nel
126 y1 = x(2, ixq(2, i + nft))
127 y2 = x(2, ixq(3, i + nft))
128 y3 = x(2, ixq(4, i + nft))
129 y4 = x(2, ixq(5, i + nft))
130 z1 = x(3, ixq(2, i + nft))
131 z2 = x(3, ixq(3, i + nft))
132 z3 = x(3, ixq(4, i + nft))
133 z4 = x(3, ixq(5, i + nft))
134 a1 =y2*(z3-z4)+y3*(z4-z2)+y4*(z2-z3)
135 a2 =y2*(z4-z1)+y4*(z1-z2)+y1*(z2-z4)
136 xface(1,1,i + nft) = (a1+a2)*half
137 ENDDO
138 ENDIF
139 ENDIF
140 ENDDO
141 CALL my_barrier
142 IF (nspmd > 1) THEN
143!$OMP MASTER
144 lencom = nercvois(nspmd + 1) + nesdvois(nspmd + 1)
145 CALL spmd_e1vois(xface(2,1,1:numels + numelq + ne_nsvois + ne_nqvois),
146 . nercvois, nesdvois, lercvois, lesdvois, lencom)
147 CALL spmd_envois(3, xcell,
148 . nercvois, nesdvois, lercvois, lesdvois, lencom)
149 CALL spmd_e1vois(xface(1,1,1:numels + numelq + ne_nsvois + ne_nqvois),
150 . nercvois, nesdvois, lercvois, lesdvois, lencom)
151!$OMP END MASTER
152 ENDIF
153 CALL my_barrier
154
155 DO i = nodft, nodlt
156 IF (iabs(nale(i)) == 1) THEN
157 x(1:3, i) = zero
158 sum_vol = zero
159 iad1 = ale_ne_connect%IAD_CONNECT(i)
160 iad2 = ale_ne_connect%IAD_CONNECT(i + 1) - 1
161 DO iel = iad1, iad2
162 elt_id = ale_ne_connect%CONNECTED(iel)
163 x(1:3, i) = x(1:3, i) + xface(1,1,elt_id) * xcell(1:3, elt_id)
164 sum_vol = sum_vol + xface(1,1,elt_id)
165 ENDDO
166 x(1:3, i) = x(1:3, i) / sum_vol
167 ENDIF
168 ENDDO
169 DO i = nodft, nodlt
170 IF ( iabs(nale(i)) == 1 .AND. dt2 > zero) THEN
171 w(1:3,i) = (x(1:3,i) - wa(1:3,i)) / dt2
172 ELSE IF (nale(i) == 0) THEN
173 w(1:3,i) = v(1:3,i)
174 ELSE
175 w(1:3, i) = zero
176 ENDIF
177 x(1:3,i) = wa(1:3,i)
178 ENDDO
179 CALL my_barrier
180
subroutine centroid3t(nel, length, nft, ixs, xgrid, elem_centroid, face_centroid)
Definition centroid.F:109
subroutine centroid3(nel, length, nft, ixs, xgrid, elem_centroid, face_centroid)
Definition centroid.F:33
subroutine centroid2(nel, length, nft, ixq, xgrid, elem_centroid, face_centroid)
Definition centroid.F:197
#define my_real
Definition cppsort.cpp:32
subroutine spmd_envois(dim, phi, nercvois, nesdvois, lercvois, lesdvois, lencom)
Definition spmd_cfd.F:695
subroutine spmd_e1vois(phi, nercvois, nesdvois, lercvois, lesdvois, lencom)
Definition spmd_cfd.F:375
subroutine my_barrier
Definition machine.F:31