OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
w_igrav.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/.
23C
24!||====================================================================
25!|| w_igrav ../starter/source/restart/ddsplit/w_igrav.F
26!||--- called by ------------------------------------------------------
27!|| ddsplit ../starter/source/restart/ddsplit/ddsplit.F
28!||--- calls -----------------------------------------------------
29!||====================================================================
30 SUBROUTINE w_igrav(
31 . IGRAV,LGRAV,NODLOCAL,PROC,LLGRAV_L,LEN_IA,NUMNOD_L)
32C-----------------------------------------------
33C M o d u l e s
34C-----------------------------------------------
35
36C-----------------------------------------------
37C I m p l i c i t T y p e s
38C-----------------------------------------------
39#include "implicit_f.inc"
40C-----------------------------------------------
41C C o m m o n B l o c k s
42C-----------------------------------------------
43#include "com04_c.inc"
44#include "param_c.inc"
45C-----------------------------------------------
46C D u m m y A r g u m e n t s
47C-----------------------------------------------
48 INTEGER PROC, LEN_IA, LLGRAV_L,NUMNOD_L,
49 . igrav(nigrv,*), lgrav(*), nodlocal(*)
50C-----------------------------------------------
51C F u n c t i o n
52C-----------------------------------------------
53! INTEGER NLOCAL
54! EXTERNAL NLOCAL
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58 INTEGER I, J, IAD, IADL, NL, N, NLL, NN, IGRTMP(NIGRV,NGRAV)
59 INTEGER, DIMENSION(:), ALLOCATABLE :: LGRTMP ! LLGRAV_L
60C
61 ALLOCATE(lgrtmp(llgrav_l))
62 iadl = 1
63 DO i = 1, ngrav
64 nl = igrav(1,i)
65 iad= igrav(4,i)
66 DO j = 1, nigrv
67 igrtmp(j,i) = igrav(j,i)
68 ENDDO
69 nll = 0
70 DO j = 1, nl
71 nn = lgrav(iad+j-1)
72 n = abs(nn)
73 IF (nodlocal(n)/=0.AND.nodlocal(n)<=numnod_l)THEN
74 IF(nn>0) THEN
75 lgrtmp(iadl+nll) = nodlocal(n)
76 ELSE
77 lgrtmp(iadl+nll) = -nodlocal(n)
78 ENDIF
79 nll = nll + 1
80 ENDIF
81 ENDDO
82 igrtmp(1,i) = nll
83 igrtmp(4,i) = iadl
84 iadl = iadl+nll
85 ENDDO
86C
87 CALL write_i_c(igrtmp,nigrv*ngrav)
88 CALL write_i_c(lgrtmp,iadl-1)
89 len_ia = len_ia + nigrv*ngrav + iadl-1
90
91 DEALLOCATE(lgrtmp)
92C
93 RETURN
94 END
subroutine w_igrav(igrav, lgrav, nodlocal, proc, llgrav_l, len_ia, numnod_l)
Definition w_igrav.F:32
void write_i_c(int *w, int *len)