52
53
54
58
59
60
61#include "implicit_f.inc"
62
63
64
65#include "units_c.inc"
66#include "com01_c.inc"
67#include "com04_c.inc"
68#include "com08_c.inc"
69#include "param_c.inc"
70#include "scr05_c.inc"
71#include "task_c.inc"
72#include "rad2r_c.inc"
73
74
75
76 INTEGER IEXLNK(NR2R,NR2RLNK),
77 . WEIGHT(*), DD_R2R(NSPMD+1,*), IAD_ELEM(2,*), FR_ELEM(*),
78 . DD_R2R_ELEM(*),SDD_R2R_ELEM,OFF_SPH_R2R(*),NUMSPH_GLO_R2R
79 INTEGER R2R_ON,NGLOB,NB
80
82 . v(3,*), vr(3,*), a(3,*) , ar(3,*), dx(3,*),
83 . ms(*) , in(*) , stx(*) , str(*), rby(*), x(3,*)
84 DOUBLE PRECISION XDP(3,*)
85
86 TYPE (GROUP_) , TARGET, DIMENSION(NGRNOD) :: IGRNOD
87 TYPE(NLOCAL_STR_), TARGET, INTENT(IN) :: NLOC_DMG
88
89
90
91 INTEGER I,IEX,IDP,IDG,NNG,OLD_ACTIV,BID,LENR,SIZE,NTOP
92
93 INTEGER, DIMENSION(:), POINTER :: GRNOD
94 my_real,
POINTER,
DIMENSION(:) :: msnl,vnl,fnl
95
96
97
98
99
100
101 IF ((r2r_siu==1).OR.(nspmd==1)) THEN
102 DO iex = 1, nr2rlnk
103 idg = iexlnk(1,iex)
104 idp = iexlnk(2,iex)
105 nng = igrnod(idg)%NENTITY
106 grnod => igrnod(idg)%ENTITY
107 IF (
nllnk(iex)==1)
THEN
108
109 msnl => nloc_dmg%MASS(1:nloc_dmg%L_NLOC)
110 vnl => nloc_dmg%VNL(1:nloc_dmg%L_NLOC)
111 fnl => nloc_dmg%FNL(1:nloc_dmg%L_NLOC,1)
113 . msnl,ncycle ,iex)
114 ELSEIF (iresp==1) THEN
115
117 . idp ,nng ,grnod ,a ,ar ,
118 . stx ,str ,v ,vr ,ms ,in ,
121 . off_sph_r2r ,numsph_glo_r2r, nrby)
122 ELSE
123
125 . idp ,nng ,grnod ,a ,ar ,
126 . stx ,str ,v ,vr ,ms ,in ,
129 . off_sph_r2r ,numsph_glo_r2r, nrby)
130 ENDIF
131 END DO
132 ELSE
133 DO iex = 1, nr2rlnk
134 idg = iexlnk(1,iex)
135 idp = iexlnk(2,iex)
136 nng = igrnod(idg)%NENTITY
137 grnod => igrnod(idg)%ENTITY
138 IF (iresp==1) THEN
139
141 . idp,nng,grnod ,a ,ar ,
142 . stx,str,v ,vr ,ms ,
143 . in ,xdp ,dd_r2r(1,iex),dd_r2r(nspmd+1,iex),weight,
145 ELSE
146
148 . idp,nng,grnod ,a ,ar ,
149 . stx,str,v ,vr ,ms ,
150 . in ,dx ,dd_r2r(1,iex),dd_r2r(nspmd+1,iex),weight,
152 ENDIF
153 END DO
154 ENDIF
155
156
157 IF ((r2r_siu==1).OR.(ispmd==0))
CALL r2r_sem_c()
158
159
160
161
162
163
164
165
166 IF(nspmd==1.OR.ispmd==0)THEN
168 old_activ = r2r_activ
169 r2r_on = 0
170
172
173 IF (old_activ == 1 .AND. r2r_activ == 0) THEN
174 WRITE(iout,*)' PROCESS DEACTIVATION'
175 ENDIF
176
177 IF (r2r_activ /= -1) THEN
178 DO WHILE (r2r_activ == 0)
180 ENDDO
181 IF (old_activ == 0 .AND. r2r_activ == 1) THEN
182 WRITE(iout,*)' PROCESS ACTIVATION'
183 ENDIF
184 END IF
185
186 IF (r2r_activ == 1) THEN
188
189 IF (r2r_siu==1) THEN
192 ENDIF
193 ENDIF
194 END IF
195
196 IF(nspmd>1)THEN
199 IF (r2r_activ == 1)
CALL spmd_ibcast(r2r_on,r2r_on,1,1,0,2)
200 END IF
201 IF (r2r_activ == -1) THEN
202 tt = tstop
203
204 ENDIF
205
206
207
208
209 IF ((r2r_siu==1).OR.(ispmd==0)) THEN
212 IF (r2r_siu==1) ntop = nthread
213 IF (r2r_siu==0) ntop = nthread*nspmd
215 ENDIF
216
217
218
220
221
222
223
224
225
226 IF ((r2r_siu==1).OR.(nspmd==1)) THEN
227 DO iex = 1, nr2rlnk
228 idg = iexlnk(1,iex)
229 idp = iexlnk(2,iex)
230 nng = igrnod(idg)%NENTITY
231 grnod => igrnod(idg)%ENTITY
232
234 . idp ,nng ,grnod,ms ,in ,
235 . stx ,str,
typlnk(iex),ncycle,iex)
236 END DO
237
238
239 IF ((sdd_r2r_elem>0).AND.(nspmd>1)) THEN
240 SIZE = 1 + iroddl*1
241 lenr = iad_elem(1,nspmd+1)-iad_elem(1,1)
242 IF (ncycle==0) THEN
244 1 a ,ar ,ms,in ,ms ,
245 2 iad_elem,fr_elem,SIZE ,
246 3 lenr ,dd_r2r,dd_r2r_elem,1)
247 ENDIF
249 1 a ,ar ,stx,str ,ms ,
250 2 iad_elem,fr_elem,SIZE ,
251 3 lenr ,dd_r2r,dd_r2r_elem,1)
252 ENDIF
253
254 ELSE
255
256 DO iex = 1, nr2rlnk
257 idg = iexlnk(1,iex)
258 idp = iexlnk(2,iex)
259 nng = igrnod(idg)%NENTITY
260 grnod => igrnod(idg)%ENTITY
261 nb = dd_r2r(nspmd+1,iex)
262 IF (ispmd==0) THEN
263 nglob=dd_r2r(nspmd+1,iex)+
dbno(iex)
264 ELSE
265 nglob=nng
266 ENDIF
268 . idp ,nng ,grnod ,ms ,in ,
269 . stx ,str ,dd_r2r(1,iex),nglob,weight,
271
272 END DO
273 ENDIF
274
275
276 RETURN
integer, dimension(:), allocatable nllnk
integer, dimension(:), allocatable rbylnk
integer, dimension(:), allocatable nbdof_nl
integer, dimension(:), allocatable rotlnk
integer, dimension(:), allocatable tag_rby
integer, dimension(:), allocatable iadd_nl
integer, dimension(:), allocatable add_rby
integer, dimension(:), allocatable typlnk
double precision, dimension(:,:), allocatable r2r_kine
integer, dimension(:), allocatable kinlnk
integer, dimension(:), allocatable dbno
subroutine send_data_spmd(idp, nng, grnod, a, ar, stx, str, v, vr, ms, in, dx, dd_r2r, nglob, weight, typ, flag_rot, flag_rby, rby, iex)
subroutine get_stiff_spmd(idp, nng, grnod, ms, in, stx, str, dd_r2r, nglob, weight, iad_elem, fr_elem, nb, iex, typ, flag_rot)
void r2r_unlock_threads_c(int *nthr)
void check_dtnoda_c(int *i7kglo)
void get_stiff_c(int *idp, int *nng, int *nodbuf, my_real_c *ms, my_real_c *ir, my_real_c *stx, my_real_c *str, int *typ, int *npas, int *iex)
void send_data_c(int *idp, int *nng, int *nodbuf, my_real_c *fx, my_real_c *fr, my_real_c *stx, my_real_c *str, my_real_c *vx, my_real_c *vr, my_real_c *ms, my_real_c *in, double *dx, my_real_c *x, int *typ, int *npas, my_real_c *rby, int *tag_rby, int *add_rby, int *rbylnk, int *kin, double *dr, my_real_c *dt2, int *iex, int *off_sph, int *numsph_glo, int *nrby)
void send_data_nl_c(int *idp, int *nng, int *iadd_nl, my_real_c *fx, my_real_c *vx, my_real_c *ms, int *npas, int *iex)
void send_ibuf_c(int *ibuf, int *len)
void get_ibuf_c(int *ibuf, int *len)
subroutine spmd_ibcast(tabi, tabr, n1, n2, from, add)
subroutine spmd_exch_r2r(a, ar, stifn, stifr, ms, iad_elem, fr_elem, size, lenr, dd_r2r, dd_r2r_elem, flag)