OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
r2r_count.F File Reference
#include "implicit_f.inc"
#include "com04_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine r2r_count (passe, iparts, ipartc, ipartg, igrpp_r2r, pm_stack, iworksh, igrnod, igrsurf, igrslin, igrbric, ixs10, ixs20, ixs16)

Function/Subroutine Documentation

◆ r2r_count()

subroutine r2r_count ( integer passe,
integer, dimension(*) iparts,
integer, dimension(*) ipartc,
integer, dimension(*) ipartg,
integer, dimension(2,*) igrpp_r2r,
pm_stack,
integer, dimension(*) iworksh,
type (group_), dimension(ngrnod) igrnod,
type (surf_), dimension(nsurf) igrsurf,
type (surf_), dimension(nslin) igrslin,
type (group_), dimension(ngrbric) igrbric,
integer, dimension(*) ixs10,
integer, dimension(*) ixs20,
integer, dimension(*) ixs16 )

Definition at line 35 of file r2r_count.F.

39C-----------------------------------------------
40C M o d u l e s
41C-----------------------------------------------
42 USE restmod
43 USE nod2el_mod
44 USE r2r_mod
45 USE groupdef_mod
46C-----------------------------------------------
47C I m p l i c i t T y p e s
48C-----------------------------------------------
49#include "implicit_f.inc"
50C-----------------------------------------------
51C C o m m o n B l o c k s
52C-----------------------------------------------
53#include "com04_c.inc"
54C-----------------------------------------------
55C D u m m y A r g u m e n t s
56C-----------------------------------------------
57 INTEGER IPARTS(*),IPARTC(*),IPARTG(*),PASSE,IGRPP_R2R(2,*),
58 . IWORKSH(*),IXS10(*), IXS16(*), IXS20(*)
60 . pm_stack(*)
61C-----------------------------------------------
62 TYPE (GROUP_) , DIMENSION(NGRNOD) :: IGRNOD
63 TYPE (SURF_) , DIMENSION(NSURF) :: IGRSURF
64 TYPE (SURF_) , DIMENSION(NSLIN) :: IGRSLIN
65 TYPE (GROUP_) , DIMENSION(NGRBRIC) :: IGRBRIC
66C-----------------------------------------------
67C L o c a l V a r i a b l e s
68C-----------------------------------------------
69 INTEGER I,J,L,IP,CUR_ID,CUR_TYP,TAG1,TAG2,COMPT,CCPL
70 INTEGER ID_ELC,ID_ELTG,ID_ELS,IRECT(4,1)
71 INTEGER CCPL_T4_EXPO,CCPL_T4_IMPO,OFF
73C=======================================================================
74C---Precounting of nodes/elements/surfaces/lines kept after split-------
75C=======================================================================
76
77 off = npart + numnod
78
79C--------------------------------------------------------------------C
80C------Precounting of nb of tagged nodes of GRNOD--------------------C
81C--------------------------------------------------------------------C
82 DO i=1,ngrnod
83
84 compt = 0
85 ccpl = 0
86 ccpl_t4_expo = 0
87 ccpl_t4_impo = 0
88 DO j=1,igrnod(i)%NENTITY
89 cur_id = igrnod(i)%ENTITY(j)
90 IF (tagno(cur_id+npart)>=0) compt=compt+1
91 IF (tagno(cur_id+npart)>1) ccpl=ccpl+1
92 IF (tagno(cur_id+npart)<=0) ccpl=ccpl+1
93 IF ((tagno(cur_id+npart)==2).AND.(tagno(cur_id+off)==-1)) ccpl_t4_impo = ccpl_t4_impo + 1
94 IF ((tagno(cur_id+npart)==2).AND.(tagno(cur_id+off)==1)) ccpl_t4_expo = ccpl_t4_expo + 1
95 END DO
96 igrnod(i)%R2R_ALL = compt ! temporary storage before split
97 igrnod(i)%R2R_SHARE = ccpl ! temporary storage before split
98 igrpp_r2r(1,i) = ccpl_t4_expo
99 igrpp_r2r(2,i) = ccpl_t4_impo
100 ENDDO
101
102C--------------------------------------------------------------------C
103C------Precounting of internal and external surfaces of the domain---C
104C--------------------------------------------------------------------C
105
106 IF (passe==0) THEN
107 ALLOCATE(isurf_r2r(5,nsurf))
108 DO i=1,nsurf
109 compt = 0
110 DO j=1,igrsurf(i)%NSEG
111 IF (igrsurf(i)%ELTYP(j) == 0) THEN
112C -> case of surfaces defined by segments -> identification of elements attached to segments <--
113 DO l=1,4
114 irect(l,1)=igrsurf(i)%NODES(j,l)
115 END DO
116 CALL insol3(x,irect,ixs,0,id_els,1,
117 . area,0,knod2els,nod2els,0,
118 . ixs10,ixs16,ixs20)
119 CALL incoq3(irect,ixc,ixtg ,0,id_elc,
120 . id_eltg,1,geo,pm,knod2elc ,
122 . pm_stack , iworksh)
123C -> temporary storage if element found type in segment type <--
124 IF (id_els/=0) THEN
125 igrsurf(i)%ELTYP(j) = 11
126 igrsurf(i)%ELEM(j) = id_els
127 ENDIF
128 IF (id_elc/=0) THEN
129 igrsurf(i)%ELTYP(j) = 13
130 igrsurf(i)%ELEM(j) = id_elc
131 ENDIF
132 IF (id_eltg/=0) THEN
133 igrsurf(i)%ELTYP(j) = 17
134 igrsurf(i)%ELEM(j) = id_eltg
135 ENDIF
136 ENDIF
137C -> counting of segments initially in the domain <--
138 cur_id = igrsurf(i)%ELEM(j)
139 cur_typ = igrsurf(i)%ELTYP(j)
140 ip = 0
141 IF (cur_typ>10) cur_typ=cur_typ-10
142 IF (cur_typ==1) ip = iparts(cur_id)
143 IF (cur_typ==3) ip = ipartc(cur_id)
144 IF (cur_typ==7) ip = ipartg(cur_id)
145 IF (ip>0) THEN
146 IF (tagno(ip)==1) compt=compt+1
147 ENDIF
148 END DO
149 isurf_r2r(1,i) = 0
150 isurf_r2r(2,i) = 0
151 isurf_r2r(3,i) = compt
152 END DO
153 ENDIF
154
155C-------At each pass - number of added segments is counted--------------C
156
157 DO i=1,nsurf
158 compt = 0
159 ccpl = 0
160 ccpl_t4_expo = 0
161 ccpl_t4_impo = 0
162 DO j=1,igrsurf(i)%NSEG
163 cur_id = igrsurf(i)%ELEM(j)
164 cur_typ= igrsurf(i)%ELTYP(j)
165 ip = 0
166 IF (cur_typ>10) cur_typ=cur_typ-10
167 IF (cur_typ==1) ip = iparts(cur_id)
168 IF (cur_typ==3) ip = ipartc(cur_id)
169 IF (cur_typ==7) ip = ipartg(cur_id)
170 IF (ip>0) THEN
171 IF (tagno(ip)==0) THEN
172 IF (cur_typ==1) ip = tag_els(cur_id+npart)
173 IF (cur_typ==3) ip = tag_elc(cur_id+npart)
174 IF (cur_typ==7) ip = tag_elg(cur_id+npart)
175 IF (ip>0) compt=compt+1
176 IF (ip==1) ccpl_t4_impo=ccpl_t4_impo+1
177 ELSE
178 IF (cur_typ==1) ip = tag_els(cur_id+npart)
179 IF (cur_typ==3) ip = tag_elc(cur_id+npart)
180 IF (cur_typ==7) ip = tag_elg(cur_id+npart)
181 IF (ip>0) ccpl=ccpl+1
182 IF (ip==1) ccpl_t4_expo=ccpl_t4_expo+1
183 ENDIF
184 ENDIF
185 END DO
186 isurf_r2r(1,i) = isurf_r2r(3,i) + compt
187 isurf_r2r(2,i) = isurf_r2r(3,i) - ccpl
188 isurf_r2r(4,i) = ccpl_t4_expo
189 isurf_r2r(5,i) = ccpl_t4_impo
190 END DO
191
192C--------------------------------------------------------------------C
193C------Precounting of internal and external lines of the domain------C
194C--------------------------------------------------------------------C
195
196 IF (passe==0) THEN
197 ALLOCATE(islin_r2r(2,nslin))
198 ENDIF
199
200C-------At each pass - number of added lined is counted--------------C
201
202 DO i=1,nslin
203 compt = 0
204 ccpl = 0
205 DO j=1,igrslin(i)%NSEG
206 tag1 = tagno(igrslin(i)%NODES(j,1)+npart)
207 tag2 = tagno(igrslin(i)%NODES(j,2)+npart)
208 IF ((tag1==1).AND.(tag2/=-1)) THEN
209 compt=compt+1
210 ELSEIF ((tag1/=-1).AND.(tag2==1)) THEN
211 compt=compt+1
212 ELSEIF ((tag1/=-1).AND.(tag2/=-1)) THEN
213 ccpl=ccpl+1
214 ENDIF
215 END DO
216
217 islin_r2r(1,i) = compt + ccpl
218 islin_r2r(2,i) = compt
219 END DO
220
221C--------------------------------------------------------------------C
222C------Precounting of grbric and external lines of the domain--------C
223C--------------------------------------------------------------------C
224
225 IF (passe==0) THEN
226 ALLOCATE(igrbric_r2r(5,ngrbric))
227 DO i=1,ngrbric
228 compt = 0
229 DO j=1,igrbric(i)%NENTITY
230C -> counting of elements initially in the domain <--
231 cur_id = igrbric(i)%ENTITY(j)
232 IF (tagno(iparts(cur_id))==1) compt=compt+1
233 END DO
234 igrbric_r2r(1,i) = 0
235 igrbric_r2r(2,i) = 0
236 igrbric_r2r(3,i) = compt
237 END DO
238 ENDIF
239
240C-------At each pass - number of added elements is counted------------C
241
242 DO i=1,ngrbric
243 compt = 0
244 ccpl = 0
245 ccpl_t4_expo = 0
246 ccpl_t4_impo = 0
247 DO j=1,igrbric(i)%NENTITY
248 cur_id = igrbric(i)%ENTITY(j)
249 ip = iparts(cur_id)
250 IF (ip>0) THEN
251 IF (tagno(ip)==0) THEN
252 IF (tag_els(cur_id+npart)>0) compt=compt+1
253 IF (tag_els(cur_id+npart)==1) ccpl_t4_impo=ccpl_t4_impo+1
254 ELSE
255 IF (tag_els(cur_id+npart)>0) ccpl=ccpl+1
256 IF (tag_els(cur_id+npart)==1) ccpl_t4_expo=ccpl_t4_expo+1
257 ENDIF
258 ENDIF
259 END DO
260 igrbric_r2r(1,i) = igrbric_r2r(3,i) + compt
261 igrbric_r2r(2,i) = igrbric_r2r(3,i) - ccpl
262 igrbric_r2r(4,i) = ccpl_t4_expo
263 igrbric_r2r(5,i) = ccpl_t4_impo
264 END DO
265
266C-----------
267 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine area(d1, x, x2, y, y2, eint, stif0)
subroutine incoq3(irect, ixc, ixtg, nint, nel, neltg, is, geo, pm, knod2elc, knod2eltg, nod2elc, nod2eltg, thk, nty, igeo, pm_stack, iworksh)
Definition incoq3.F:45
subroutine insol3(x, irect, ixs, nint, nel, i, area, noint, knod2els, nod2els, ir, ixs10, ixs16, ixs20)
Definition insol3.F:43
integer, dimension(:), allocatable knod2elc
Definition nod2el_mod.F:58
integer, dimension(:), allocatable knod2els
Definition nod2el_mod.F:58
integer, dimension(:), allocatable nod2eltg
Definition nod2el_mod.F:58
integer, dimension(:), allocatable nod2elc
Definition nod2el_mod.F:58
integer, dimension(:), allocatable nod2els
Definition nod2el_mod.F:58
integer, dimension(:), allocatable knod2eltg
Definition nod2el_mod.F:58
integer, dimension(:), allocatable tag_els
Definition r2r_mod.F:133
integer, dimension(:), allocatable tag_elg
Definition r2r_mod.F:135
integer, dimension(:), allocatable tagno
Definition r2r_mod.F:132
integer, dimension(:), allocatable tag_elc
Definition r2r_mod.F:133
integer, dimension(:,:), allocatable igrbric_r2r
Definition r2r_mod.F:143
integer, dimension(:,:), allocatable isurf_r2r
Definition r2r_mod.F:143
integer, dimension(:,:), allocatable islin_r2r
Definition r2r_mod.F:143
integer, dimension(:), allocatable, target ixs
Definition restart_mod.F:60
integer, dimension(:), allocatable, target ixtg
Definition restart_mod.F:60
integer, dimension(:), allocatable igeo
Definition restart_mod.F:83
integer, dimension(:), allocatable ixc
Definition restart_mod.F:60