OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
w_rbyk.F File Reference
#include "implicit_f.inc"
#include "com04_c.inc"
#include "param_c.inc"
#include "tabsiz_c.inc"
#include "lagmult.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine w_rbyk (npby, lpby, nodlocal, proc, nslarb_l, len_ia)

Function/Subroutine Documentation

◆ w_rbyk()

subroutine w_rbyk ( integer, dimension(nnpby,*) npby,
integer, dimension(*) lpby,
integer, dimension(*) nodlocal,
integer proc,
integer nslarb_l,
integer len_ia )

Definition at line 30 of file w_rbyk.F.

31C-----------------------------------------------
32C M o d u l e s
33C-----------------------------------------------
34
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38#include "implicit_f.inc"
39C-----------------------------------------------
40C C o m m o n B l o c k s
41C-----------------------------------------------
42#include "com04_c.inc"
43#include "param_c.inc"
44#include "tabsiz_c.inc"
45#include "lagmult.inc"
46C-----------------------------------------------
47C D u m m y A r g u m e n t s
48C-----------------------------------------------
49 INTEGER PROC, LEN_IA, NSLARB_L, NODLOCAL(*),
50 . NPBY(NNPBY,*), LPBY(*)
51C-----------------------------------------------
52C F u n c t i o n
53C-----------------------------------------------
54 INTEGER NLOCAL
55 EXTERNAL nlocal
56C-----------------------------------------------
57C L o c a l V a r i a b l e s
58C-----------------------------------------------
59 INTEGER NSL, K, KK, N, NN, NSL_L, J, M, ILP
60 INTEGER, DIMENSION(:), ALLOCATABLE :: LPBY_L
61 INTEGER, DIMENSION(:,:), ALLOCATABLE :: NPBY_L
62C
63! -------------------------
64! allocate 1d array
65 ALLOCATE( lpby_l(nslarb_l) )
66! allocate 2d array
67 ALLOCATE( npby_l(nnpby,nrbykin) )
68! -------------------------
69 ilp = 0
70 k = 0
71 DO n = 1, nrbykin
72 DO j = 3, nnpby
73 npby_l(j,n) = npby(j,n)
74 ENDDO
75 npby_l(11,n)=ilp
76C
77 nsl=npby(2,n)
78 npby_l(19,n) = nsl
79 nsl_l = 0
80 DO kk = 1, nsl
81 nn = lpby(k+kk)
82 IF(nlocal(nn,proc+1)==1)THEN
83 nsl_l = nsl_l + 1
84 lpby_l(nsl_l+ilp) = nodlocal(nn)
85 ENDIF
86 ENDDO
87 npby_l(2,n) = nsl_l
88 m = npby(1,n)
89C Skip useless rigid bodies
90 IF(nsl_l==0.AND.nlocal(m,proc+1)==0)THEN
91 npby_l(1,n) = -m
92 ELSE
93 npby_l(1,n) = nodlocal(m)
94 ENDIF
95 k = k + nsl
96 ilp = ilp + nsl_l
97 ENDDO
98C
99 CALL write_i_c(npby_l,nnpby*nrbykin)
100
101C write RBY LAG
102 IF(nrbylag > 0 .AND. proc == 0) THEN
103 k = slpby
104 DO n = nrbykin+1, nrbykin+nrbylag
105 m = npby(1,n)
106 IF(m /= 0)npby(1,n)=nodlocal(m)
107 nsl=npby(2,n)
108 DO kk = 1, nsl
109 nn = lpby(k+kk)
110 IF(nn /= 0)lpby(k+kk) = nodlocal(nn)
111 END DO
112 k = k + 3*nsl
113 END DO
114 CALL write_i_c(npby(1,nrbykin+1),nnpby*nrbylag)
115 END IF
116
117 CALL write_i_c(lpby_l,nslarb_l)
118 len_ia = len_ia + nnpby*nrbykin + nslarb_l
119
120 IF(nrbylag > 0 .AND. proc == 0) THEN
121 CALL write_i_c(lpby(slpby+1),slpbyl)
122 len_ia = len_ia + nnpby*nrbylag + slpbyl
123 END IF
124C
125 DEALLOCATE( lpby_l )
126 DEALLOCATE( npby_l )
127 RETURN
integer function nlocal(n, p)
Definition ddtools.F:349
void write_i_c(int *w, int *len)