OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
new_link.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!|| new_link ../starter/source/coupling/rad2rad/new_link.F
25!||--- called by ------------------------------------------------------
26!|| r2r_group ../starter/source/coupling/rad2rad/r2r_group.F
27!||--- uses -----------------------------------------------------
28!|| r2r_mod ../starter/share/modules1/r2r_mod.F
29!|| restmod ../starter/share/modules1/restart_mod.F
30!||====================================================================
31 SUBROUTINE new_link(NUM,N,K)
32C-----------------------------------------------
33C M o d u l e s
34C-----------------------------------------------
35 USE restmod
36 USE r2r_mod
37C-----------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C C o m m o n B l o c k s
43C-----------------------------------------------
44#include "com04_c.inc"
45#include "r2r_c.inc"
46C-----------------------------------------------
47C D u m m y A r g u m e n t s
48C-----------------------------------------------
49 INTEGER NUM,N,K
50C-----------------------------------------------
51C L o c a l V a r i a b l e s
52C-----------------------------------------------
53 INTEGER I,J,NUM_LINK
54 INTEGER, DIMENSION(:,:), ALLOCATABLE :: IEX_TEMP
55C-----------------------------------------------
56
57C----- Storage of IEXLNK in IEX_TEMP---------------------------C
58
59 ALLOCATE(iex_temp(5,nr2rlnk+1))
60
61 DO i=1,nr2rlnk
62 DO j=1,5
63 iex_temp(j,i)=iexlnk(5*(i-1)+j)
64 END DO
65 END DO
66
67C----- Storage of new link information
68
69 iex_temp(1,nr2rlnk+1) = num
70 iex_temp(3,nr2rlnk+1) = 0
71 iex_temp(4,nr2rlnk+1) = n
72 iex_temp(5,nr2rlnk+1) = 4
73 IF (k == 2) THEN
74 iex_temp(5,nr2rlnk+1) = 40
75 ELSEIF ((k == 3).OR.(k == 4)) THEN
76 IF (flg_swale==0) THEN
77C--> contact with void elements in subdomain - order of domains is inverted
78 iex_temp(3,nr2rlnk+1) = n
79 iex_temp(4,nr2rlnk+1) = 0
80 iex_temp(5,nr2rlnk+1) = 5
81 IF (k == 4) iex_temp(5,nr2rlnk+1) = 50
82 ELSE
83 iex_temp(5,nr2rlnk+1) = 60
84 ENDIF
85 ELSEIF (k == 5) THEN
86 iex_temp(5,nr2rlnk+1) = 70
87 ENDIF
88
89C----- Generation of a new link
90
91 num_link = 1
92 DO i=1,nr2rlnk
93 IF (num_link<=iex_temp(2,i)) num_link = iex_temp(2,i)+1
94 END DO
95
96 iex_temp(2,nr2rlnk+1) = num_link
97
98C----- Storage of IEX_TEMP in IEXLNK---------------------------C
99 DEALLOCATE(iexlnk)
100 ALLOCATE(iexlnk(5*(nr2rlnk+1)))
101 nr2rlnk = nr2rlnk+1
102
103 DO i=1,nr2rlnk
104 DO j=1,5
105 iexlnk(5*(i-1)+j)=iex_temp(j,i)
106 END DO
107 END DO
108
109C------------------------------------------------------------------
110
111 DEALLOCATE(iex_temp)
112
113C-----------
114 RETURN
115 END SUBROUTINE new_link
integer, dimension(:), allocatable iexlnk
Definition restart_mod.F:60