OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
r2r_domdec.F File Reference
#include "implicit_f.inc"
#include "com01_c.inc"
#include "com04_c.inc"
#include "param_c.inc"
#include "r2r_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine r2r_domdec (iexter, igrnod, frontb_r2r, dt_r2r, flag)

Function/Subroutine Documentation

◆ r2r_domdec()

subroutine r2r_domdec ( integer, dimension(nr2r,*) iexter,
type (group_), dimension(ngrnod) igrnod,
integer, dimension(sfrontb_r2r,*) frontb_r2r,
dt_r2r,
integer flag )

Definition at line 38 of file r2r_domdec.F.

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
#define my_real
Definition cppsort.cpp:32
subroutine plist_ifront(tab, n, cpt)
Definition ddtools.F:153
integer function nlocal(n, p)
Definition ddtools.F:349
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 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
integer function usr2sys(iu, itabm1, mess, id)
Definition sysfus.F:160