OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
w_rbyk.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!|| w_rbyk ../starter/source/restart/ddsplit/w_rbyk.F
25!||--- called by ------------------------------------------------------
26!|| ddsplit ../starter/source/restart/ddsplit/ddsplit.F
27!||--- calls -----------------------------------------------------
28!|| nlocal ../starter/source/spmd/node/ddtools.F
29!||====================================================================
30 SUBROUTINE w_rbyk(NPBY,LPBY,NODLOCAL,PROC,NSLARB_L,LEN_IA)
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
128 END
subroutine w_rbyk(npby, lpby, nodlocal, proc, nslarb_l, len_ia)
Definition w_rbyk.F:31
void write_i_c(int *w, int *len)