67
68
69
74 use element_mod , only : nixs,nixc,nixtg
75
76
77
78#include "implicit_f.inc"
79#include "com04_c.inc"
80#include "sphcom.inc"
81
82
83
84 INTEGER IPARTS(*),IPARTC(*),IPARTG(*),NB,VAL,GR_ID,
85 . FLAG,CONT,MODIF,IPARTSP(*),F2,ITAGL(*),EANI2(*)
86
87 TYPE (GROUP_), DIMENSION(NGRNOD) :: IGRNOD
88 TYPE (SURF_) :: IGRSURF
89
90
91
92 INTEGER J,K,L,NI,FACE(4),SUM,CUR_ID,ELTAG,CUR_10,CUR_20,CUR_16,OFFSET
93
94
95 IF (flag==0) THEN
96
97
98
99
100
101 DO j=1,nb
102 face(1) = igrsurf%NODES(j,1)
103 face(2) = igrsurf%NODES(j,2)
104 face(3) = igrsurf%NODES(j,3)
105 face(4) = igrsurf%NODES(j,4)
106 IF (face(4)==0) face(4)=face(3)
107 ni = face(1)
108 eltag = 0
109
110
113 DO k = 1,4
114 itagl(face(k)) = 0
115 END DO
116 DO k = 2,9
117 itagl(
ixs(nixs*(cur_id-1)+k)) = 1
118 END DO
119 IF (eani2(cur_id)==10) THEN
120 offset = nixs*numels
121 cur_10 = cur_id-numels8
122 DO k=1,6
123 itagl(
ixs(offset+6*(cur_10-1)+k)) = 1
124 ENDDO
125 ELSEIF (eani2(cur_id)==20) THEN
126 offset = nixs*numels+6*numels10
127 cur_20 = cur_id-(numels8+numels10)
128 DO k=1,12
129 itagl(
ixs(offset+12*(cur_20-1)+k)) = 1
130 ENDDO
131 ELSEIF (eani2(cur_id)==16) THEN
132 offset = nixs*numels+6*numels10+12*numels20
133 cur_16 = cur_id-(numels8+numels10+numels20)
134 DO k=1,8
135 itagl(
ixs(offset+8*(cur_16-1)+k)) = 1
136 ENDDO
137 ENDIF
138 sum=itagl(face(1))+itagl(face(2))+itagl(face(3))+itagl(face(4))
139 IF (sum==4) eltag = 1
140 IF ((
tag_els(cur_id+npart)<(1+cont)).AND.
141 . (
tagno(iparts(cur_id))/=val).AND.(sum==4))
THEN
143 ENDIF
144 END DO
145
146
149 DO k = 1,4
150 itagl(face(k)) = 0
151 END DO
152 DO k = 2,5
153 itagl(
ixc(nixc*(cur_id-1)+k)) = 1
154 END DO
155 sum=itagl(face(1))+itagl(face(2))+itagl(face(3))+itagl(face(4))
156 IF (sum==4) eltag = 1
157 IF ((
tag_elc(cur_id+npart)<(1+cont)).AND.
158 . (
tagno(ipartc(cur_id))/=val).AND.(sum==4))
THEN
160 ENDIF
161 END DO
162
165 DO k = 1,4
166 itagl(face(k)) = 0
167 END DO
168 DO k = 2,4
169 itagl(
ixtg(nixtg*(cur_id-1)+k)) = 1
170 END DO
171 sum=itagl(face(1))+itagl(face(2))+itagl(face(3))+itagl(face(4))
172 IF (sum==4) eltag = 1
173 IF ((
tag_elg(cur_id+npart)<(1+cont)).AND.
174 . (
tagno(ipartg(cur_id))/=val).AND.(sum==4))
THEN
176 ENDIF
177 END DO
178
179
180 IF (eltag==0) THEN
181 DO k = 1,4
182 IF (
tagno(face(k)+npart)==-1)
THEN
184 ENDIF
185 END DO
186 ENDIF
187
188 END DO
189
190 ELSE
191
192
193
194
195
196 DO j=1,nb
197 ni = igrnod(gr_id)%ENTITY(j)
198
201 IF ((
tag_els(cur_id+npart)<(1+cont)).AND.
202 . (
tagno(iparts(cur_id))/=val))
THEN
204 ENDIF
205 END DO
206
209 IF ((
tag_elc(cur_id+npart)<(1+cont)).AND.
210 . (
tagno(ipartc(cur_id))/=val))
THEN
212 ENDIF
213 END DO
214
217 IF ((
tag_elg(cur_id+npart)<(1+cont)).AND.
218 . (
tagno(ipartg(cur_id))/=val))
THEN
220 ENDIF
221 END DO
222
223 IF (numsph>0) THEN
225 IF ((
tag_elsp(cur_id+npart)<(1+cont)).AND.
226 . (
tagno(ipartsp(cur_id))/=val))
THEN
228 ENDIF
229 ENDIF
230 END DO
231
232 ENDIF
233
234
235 RETURN
integer, dimension(:), allocatable knod2elc
integer, dimension(:), allocatable knod2els
integer, dimension(:), allocatable nod2eltg
integer, dimension(:), allocatable nod2elc
integer, dimension(:), allocatable nod2els
integer, dimension(:), allocatable knod2eltg
integer, dimension(:), allocatable tag_els
integer, dimension(:), allocatable tag_elg
integer, dimension(:), allocatable tagno
integer, dimension(:), allocatable tag_elc
integer, dimension(:), allocatable tag_elsp
integer, dimension(:), allocatable, target ixs
integer, dimension(:), allocatable, target ixtg
integer, dimension(:), allocatable nod2sp
integer, dimension(:), allocatable ixc
subroutine modif_tag(tag, new_tag, modif)