OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
r2r_domdec.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!|| r2r_domdec ../starter/source/coupling/rad2rad/r2r_domdec.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../starter/source/starter/lectur.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| ifrontplus ../starter/source/spmd/node/frontplus.F
30!|| nlocal ../starter/source/spmd/node/ddtools.F
31!|| plist_ifront ../starter/source/spmd/node/ddtools.F
32!|| usr2sys ../starter/source/system/sysfus.F
33!||--- uses -----------------------------------------------------
34!|| message_mod ../starter/share/message_module/message_mod.F
35!|| r2r_mod ../starter/share/modules1/r2r_mod.F
36!|| restmod ../starter/share/modules1/restart_mod.F
37!||====================================================================
38 SUBROUTINE r2r_domdec(IEXTER,IGRNOD,FRONTB_R2R,DT_R2R,FLAG)
39C-----------------------------------------------
40C M o d u l e s
41C-----------------------------------------------
42 USE restmod
43 USE message_mod
44 USE r2r_mod
45 USE groupdef_mod
47C-----------------------------------------------
48C I m p l i c i t T y p e s
49C-----------------------------------------------
50#include "implicit_f.inc"
51C-----------------------------------------------
52C C o m m o n B l o c k s
53C-----------------------------------------------
54#include "com01_c.inc"
55#include "com04_c.inc"
56#include "param_c.inc"
57#include "r2r_c.inc"
58C-----------------------------------------------
59C D u m m y A r g u m e n t s
60C-----------------------------------------------
61 INTEGER IEXTER(NR2R,*),FLAG,FRONTB_R2R(SFRONTB_R2R,*)
63 . dt_r2r(4,*)
64 TYPE (GROUP_) , DIMENSION(NGRNOD) :: IGRNOD
65C-----------------------------------------------
66C L o c a l V a r i a b l e s
67C-----------------------------------------------
68 INTEGER REF,I,J,K,L,IDG,NJ,NJS,ERR,DOMLEN,FL_EXIT,SPLIST
69 CHARACTER NAM*150,CHRUN*4,MESS*40
70 INTEGER, DIMENSION(:), ALLOCATABLE :: PLIST
71C-----------------------------------------------
72
73C E x t e r n a l F u n c t i o n s
74C-----------------------------------------------
75 INTEGER USR2SYS
76 INTEGER NLOCAL
77 INTEGER :: LEN_TMP_NAME
78 CHARACTER(len=4096) :: TMP_NAME
79C-----------------------------------------------
80
81 ref = 991982
82
83 WRITE(chrun,'(I4.4)') irun
84 IF (ipid==0) THEN
85 nam = trim(dom_name)//'_'//chrun//'.domdec'
86 domlen = len_trim(dom_name)+12
87 ELSE
88C-----------only 1 subdomain
89 nam=dom_name(isubdom(8,1):isubdom(8,1)+
90 . isubdom(7,1)-1)//'_'//chrun//'.domdec'
91 domlen = isubdom(7,1)+12
92 ENDIF
93
94 tmp_name=outfile_name(1:outfile_name_len)//nam(1:len_trim(nam))
95 len_tmp_name = outfile_name_len+len_trim(nam)
96 OPEN(unit=ref,file=tmp_name(1:len_tmp_name),
97 . access='SEQUENTIAL',form='FORMATTED',status='UNKNOWN')
98
99 IF (flag == 1) THEN
100C-------------------------------------
101 ALLOCATE(plist(nspmd))
102 plist(1:nspmd) = -1
103C------ Information for FSI
104 WRITE(ref,1303,iostat=err) flg_fsi
105C------ Information for speedup computation
106 DO i=1,4
107 WRITE(ref,1304,iostat=err) dt_r2r(i,1)
108 END DO
109C------
110 DO i=1,nr2rlnk
111 idg = iexter(1,i)
112C-- 70 -> nlocal link - nodes already defined in link type 4
113 IF (iexter(5,i) /= 70) THEN
114 DO j=1,igrnod(idg)%NENTITY
115 nj = igrnod(idg)%ENTITY(j)
116 fl_exit = 0
117 splist=0
118 CALL plist_ifront(plist,nj,splist)
119C
120 WRITE(ref,1302,iostat=err) itab(nj),splist
121 DO l=1,splist
122 k = plist(l)
123 WRITE(ref,1303,iostat=err) (k)
124 IF (err/=0) THEN
125 CALL ancmsg(msgid=950,
126 . msgtype=msgerror,
127 . anmode=aninfo_blind_1)
128 fl_exit = 1
129 EXIT
130 ENDIF
131 ENDDO
132 IF (fl_exit==1) EXIT
133 END DO
134 ENDIF
135 END DO
136C
137 CLOSE(unit=ref,status='KEEP')
138 DEALLOCATE(plist)
139
140 ELSEIF (flag == 0) THEN
141C------ Information for FSI
142 READ(ref,1303,iostat=err) flg_fsi
143C------ Information for speedup computation
144 DO i=1,4
145 READ(ref,1304,iostat=err) dt_r2r(i,1)
146 END DO
147C
148 DO i=1,nr2rlnk
149 idg = iexter(1,i)
150C-- 70 -> nlocal link - nodes already defined in link type 4
151 IF (iexter(5,i) /= 70) THEN
152 DO j=1,igrnod(idg)%NENTITY
153 fl_exit = 0
154 READ(ref,1302,iostat=err) njs,splist
155 nj = usr2sys(njs,itabm1,mess,0)
156 DO k=1,nspmd
157 frontb_r2r(nj,k) = idg
158 END DO
159 DO l=1,splist
160 READ(ref,1303,iostat=err) k
161 IF (err/=0) THEN
162 CALL ancmsg(msgid=950,
163 . msgtype=msgerror,
164 . anmode=aninfo_blind_1)
165 fl_exit = 1
166 EXIT
167 ENDIF
168 frontb_r2r(nj,k) = -1
169 IF (nlocal(nj,k)/=1) CALL ifrontplus(nj,k)
170 ENDDO
171 IF (fl_exit==1) EXIT
172 END DO
173 ELSE
174 DO j=1,igrnod(idg)%NENTITY
175 nj = igrnod(idg)%ENTITY(j)
176 DO k=1,nspmd
177 IF (frontb_r2r(nj,k) > 0) frontb_r2r(nj,k) = frontb_r2r(nj,k) + ngrnod*idg
178 END DO
179 END DO
180 ENDIF
181 END DO
182 CLOSE(unit=ref,status='KEEP')
183
184 ELSE
185C------------------------------------
186 CLOSE(unit=ref,status='DELETE')
187
188C-------------------------------------
189 ENDIF
190
191C--------------------------------------------------------------C
192 RETURN
193
1941302 FORMAT( 1x,i20,i9)
1951303 FORMAT( 1x,i9)
1961304 FORMAT( 1x,e9.4)
197
198C--------------------------------------------------------------C
199
200 RETURN
201
202C-----------
203
204 RETURN
205 END SUBROUTINE r2r_domdec
#define my_real
Definition cppsort.cpp:32
subroutine plist_ifront(tab, n, cpt)
Definition ddtools.F:153
subroutine ifrontplus(n, p)
Definition frontplus.F:100
character(len=outfile_char_len) outfile_name
integer outfile_name_len
integer, dimension(:,:), allocatable isubdom
Definition r2r_mod.F:144
integer, dimension(:), allocatable, target itabm1
Definition restart_mod.F:60
integer, dimension(:), allocatable itab
Definition restart_mod.F:60
subroutine r2r_domdec(iexter, igrnod, frontb_r2r, dt_r2r, flag)
Definition r2r_domdec.F:39
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:889