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

Go to the source code of this file.

Functions/Subroutines

subroutine alew1 (d, v, w, ale_nn_connect, nale, nodft, nodlt, nbrcvois, nbsdvois, lnrcvois, lnsdvois)

Function/Subroutine Documentation

◆ alew1()

subroutine alew1 ( d,
v,
w,
type(t_connectivity), intent(in) ale_nn_connect,
integer, dimension(numnod) nale,
integer nodft,
integer nodlt,
integer, dimension(*) nbrcvois,
integer, dimension(*) nbsdvois,
integer, dimension(*) lnrcvois,
integer, dimension(*) lnsdvois )

Definition at line 33 of file alew1.F.

37C-----------------------------------------------
38C M o d u l e s
39C-----------------------------------------------
41 USE ale_mod
42C-----------------------------------------------
43C D e s c r i p t i o n
44C-----------------------------------------------
45C Compute Grid for /ALE/GRID/DISP
46C
47C X,D,V are allocated to SX,SD,DV=3*(NUMNOD_L+NUMVVOIS_L)
48C in grid subroutine it may needed to access nodes which
49C are connected to a remote elem. They are sored in X(1:3,NUMNOD+1:)
50C Consequently X is defined here X(3,SX/3) instead of X(3,NUMNOD) as usually
51C-----------------------------------------------
52C I m p l i c i t T y p e s
53C-----------------------------------------------
54#include "implicit_f.inc"
55C-----------------------------------------------
56C C o m m o n B l o c k s
57C-----------------------------------------------
58#include "com01_c.inc"
59#include "com04_c.inc"
60#include "com08_c.inc"
61#include "tabsiz_c.inc"
62C-----------------------------------------------
63C D u m m y A r g u m e n t s
64C-----------------------------------------------
65! SPMD CASE : SX >= 3*NUMNOD (SX = 3*(NUMNOD_L+NRCVVOIS_L))
66! X(1:3,1:NUMNOD) : local nodes
67! (1:3, NUMNOD+1:) additional nodes (also on adjacent domains but connected to the boundary of the current domain)
68! idem with D(SD), and V(SV)
69C-----------------------------------------------
70 INTEGER NALE(NUMNOD), NODFT, NODLT,
71 . NBRCVOIS(*),NBSDVOIS(*),
72 . LNRCVOIS(*),LNSDVOIS(*)
73 my_real d(3,sd/3), v(3,sv/3), w(3,sw/3)
74 TYPE(t_connectivity), INTENT(IN) :: ALE_NN_CONNECT
75C-----------------------------------------------
76C L o c a l V a r i a b l e s
77C-----------------------------------------------
78 INTEGER I, LENCOM
79 my_real dx, dy, dz,fac
80 INTEGER :: IAD, IAD1, IAD2, NODE_ID
81 my_real :: dx_max, dx_min
82 my_real :: dy_max, dy_min
83 my_real :: dz_max, dz_min
84C-----------------------------------------------
85C S o u r c e L i n e s
86C-----------------------------------------------
87
88C SPMD : COMM D
89 IF(nspmd > 1)THEN
90!$OMP SINGLE
91 lencom = nbrcvois(nspmd+1)+nbsdvois(nspmd+1)
92 CALL spmd_xvois(d,nbrcvois,nbsdvois,lnrcvois,lnsdvois,lencom)
93!$OMP END SINGLE
94 END IF
95 fac=one/dt2/three
96 DO i = nodft, nodlt
97 IF(iabs(nale(i)) == 1) THEN
98 iad1 = ale_nn_connect%IAD_CONNECT(i)
99 iad2 = ale_nn_connect%IAD_CONNECT(i + 1) - 1
100 dx_max = -huge(zero)
101 dx_min = huge(zero)
102 dy_max = -huge(zero)
103 dy_min = huge(zero)
104 dz_max = -huge(zero)
105 dz_min = huge(zero)
106 DO iad = iad1, iad2
107 node_id = ale_nn_connect%CONNECTED(iad)
108 dx_max = max(dx_max, d(1, node_id))
109 dx_min = min(dx_min, d(1, node_id))
110 dy_max = max(dy_max, d(2, node_id))
111 dy_min = min(dy_min, d(2, node_id))
112 dz_max = max(dz_max, d(3, node_id))
113 dz_min = min(dz_min, d(3, node_id))
114 ENDDO
115 dx = fac * (dx_max + dx_min - two * d(1, i))
116 dy = fac * (dy_max + dy_min - two * d(2, i))
117 dz = fac * (dz_max + dz_min - two * d(3, i))
118 w(1,i)=sign(one,dx)*min(abs(dx),ale%GRID%ALPHA)
119 w(2,i)=sign(one,dy)*min(abs(dy),ale%GRID%ALPHA)
120 w(3,i)=sign(one,dz)*min(abs(dz),ale%GRID%ALPHA)
121 ELSEIF(nale(i) == 0)THEN
122 w(1,i)=v(1,i)
123 w(2,i)=v(2,i)
124 w(3,i)=v(3,i)
125 ELSE
126 w(1,i)=zero
127 w(2,i)=zero
128 w(3,i)=zero
129 ENDIF
130C
131 ENDDO
132C
133 RETURN
#define my_real
Definition cppsort.cpp:32
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
type(ale_) ale
Definition ale_mod.F:249
subroutine spmd_xvois(x, nbrcvois, nbsdvois, lnrcvois, lnsdvois, lencom)
Definition spmd_cfd.F:40