42 use discretelement
, only: do_nsearch, des_periodic_walls
47 use discretelement
, only: ighost_updated
72 integer :: linter, lface, ii
74 integer,
save :: lcheckbuf = 0
78 IF (.not.((
numpes>1) .OR. des_periodic_walls))
RETURN 82 if (mod(lcheckbuf,100) == 0)
then 85 elseif (mod(lcheckbuf,5) == 0)
then 88 lcheckbuf = lcheckbuf + 1
91 do ii=1,
size(dsendbuf)
92 dsendbuf(ii)%facebuf(1) = 0
93 drecvbuf(ii)%facebuf(1) = 0
97 do linter = merge(2,3,
no_k),1,-1
98 do lface = linter*2-1,linter*2
99 if(.not.iexchflag(lface))cycle
100 call desmpi_pack_parcross(lface)
101 call desmpi_sendrecv_init(lface)
103 do lface = linter*2-1,linter*2
104 if(.not.iexchflag(lface)) cycle
106 call desmpi_unpack_parcross(lface)
109 do lface = linter*2-1,linter*2
110 if(dsendbuf(1+mod(lface,2))%facebuf(1).gt.0 .or. &
111 drecvbuf(1+mod(lface,2))%facebuf(1).gt.0)
then 125 do ii=1,
size(dsendbuf)
126 dsendbuf(ii)%facebuf(1) = 0
127 drecvbuf(ii)%facebuf(1) = 0
130 ighost_updated(:) = .false.
132 do linter = 1,merge(2,3,
no_k)
133 do lface = linter*2-1,linter*2
134 if(.not.iexchflag(lface))cycle
136 call desmpi_sendrecv_init(lface)
138 do lface = linter*2-1,linter*2
139 if(.not.iexchflag(lface)) cycle
145 do lface = linter*2-1,linter*2
146 if(dsendbuf(1+mod(lface,2))%facebuf(1) .gt.0.or.&
147 drecvbuf(1+mod(lface,2))%facebuf(1).gt.0)
then 176 use discretelement
, only: dimn
187 logical,
intent(in) :: check_global
192 INTEGER :: lface, lindx, lijk
202 REAL :: lfactor = 0.5
203 DOUBLE PRECISION,
PARAMETER :: ONEMBo8 = 131072.0
208 ltot_ind = isendindices(1,lface)
210 do lindx = 2,ltot_ind+1
211 lijk = isendindices(lindx,lface)
212 lparcnt = lparcnt +
dg_pic(lijk)%isize
214 if(lparcnt > lmaxcnt) lmaxcnt = lparcnt
223 if(
allocated(dsendbuf(1+mod(lface,2))%facebuf))
then 224 deallocate(dsendbuf(1+mod(lface,2))%&
225 facebuf,drecvbuf(1+mod(lface,2))%facebuf)
227 allocate(dsendbuf(1+mod(lface,2))%facebuf(imaxbuf),&
228 drecvbuf(1+mod(lface,2))%facebuf(imaxbuf))
231 WRITE(
err_msg, 1000) imaxbuf/onembo8, &
232 100.0d0+100.0d0*dble(imaxbuf-pbuf)/dble(pbuf)
235 1000
FORMAT(/
'Resizeing DES MPI buffers: ',f7.1,
' MB (+',f5.1
'%)')
249 use discretelement
, only: dimn
250 use discretelement
, only: des_pos_new, des_pos_old
251 use discretelement
, only: des_vel_new, des_vel_old
252 use discretelement
, only: omega_new
253 use discretelement
, only: particle_orientation
254 use discretelement
, only: orientation,init_orientation
255 use discretelement
, only: fc
256 use discretelement
, only: do_old
257 use discretelement
, only: pip
258 use discretelement
, only: ighost_cnt
259 use discretelement
, only: des_usr_var_size, des_usr_var
261 use discretelement
, only: pijk
268 use discretelement
, only: ighost_updated
280 integer ltot_ind,lface,lindx,lijk,lcurpar,lpicloc
284 ltot_ind = irecvindices(1,lface)
285 do lindx = 2,ltot_ind+1
286 lijk = irecvindices(lindx,lface)
287 do lpicloc =1,
dg_pic(lijk)%isize
288 lcurpar =
dg_pic(lijk)%p(lpicloc)
289 if(ighost_updated(lcurpar)) cycle
291 ighost_cnt = ighost_cnt-1
292 call set_nonexistent(lcurpar)
294 des_pos_new(lcurpar,:)=0
295 pijk(lcurpar,:) = -10
297 des_pos_old(lcurpar,:)=0
298 des_vel_old(lcurpar,:)=0
300 des_vel_new(lcurpar,:)=0
301 omega_new(lcurpar,:)=0
303 IF(particle_orientation) &
304 orientation(1:3,lcurpar) = init_orientation
312 IF(des_usr_var_size > 0)&
313 des_usr_var(:,lcurpar)= 0
333 use discretelement
, only: des_explicitly_coupled
363 IF(.NOT.des_explicitly_coupled)
THEN 368 CALL des_collect_gdata(des_r_gp)
369 CALL des_collect_gdata(des_r_gc)
370 CALL des_collect_gdata(des_r_phase)
372 CALL des_collect_gdata(des_sum_r_g)
double precision, dimension(:), allocatable conv_sc
double precision, dimension(:), allocatable ep_g
double precision, dimension(:), allocatable des_t_s
subroutine desmpi_sendrecv_init(pface, pdebug)
subroutine, public desmpi_unpack_parcross(pface)
double precision, dimension(:), allocatable des_hor_g
subroutine desgrid_pic(plocate)
subroutine desmpi_sendrecv_wait(pface, pdebug)
subroutine, public desmpi_pack_parcross(PFACE)
subroutine des_par_exchange()
logical, dimension(dim_m) solve_ros
logical, dimension(:), allocatable iexchflag
double precision, dimension(:), allocatable des_sum_r_g
subroutine desmpi_cleanup
type(iap2), dimension(:), allocatable dg_pic
subroutine, public desmpi_unpack_ghostpar(pface)
subroutine, public desmpi_pack_ghostpar(PFACE)
subroutine des_mpi_barrier
type(array), dimension(:), allocatable dsendbuf
type(array), dimension(:), allocatable drecvbuf
integer, dimension(:,:), allocatable isendindices
double precision, dimension(:,:), allocatable des_r_gc
double precision, dimension(:,:), allocatable des_x_s
double precision, dimension(:,:), allocatable ro_s
double precision, dimension(:,:), allocatable des_r_phase
subroutine desmpi_check_sendrecvbuf(check_global)
integer, parameter ibufoffset
character(len=line_length), dimension(line_count) err_msg
subroutine desmpi_send_recv_field_vars
integer, dimension(:,:), allocatable irecvindices
double precision, dimension(:,:), allocatable rop_s
double precision, dimension(:,:), allocatable des_r_gp
double precision, dimension(:), allocatable rop_g
double precision, parameter zero
subroutine flush_err_msg(DEBUG, HEADER, FOOTER, ABORT, LOG, CALL_TREE)