52 use discretelement
, only: particle_orientation
53 use discretelement
, only: des_usr_var_size
63 integer :: lmaxlen1,lmaxlen2,lmaxarea,lmaxghostpar,ii
65 DOUBLE PRECISION,
PARAMETER :: ONEMBo8 = 131072.0
70 ighostpacketsize = 15 + des_usr_var_size
72 ighostpacketsize = ighostpacketsize + 1
75 iparticlepacketsize = 30 + des_usr_var_size
79 iparticlepacketsize = iparticlepacketsize + 15
81 iparticlepacketsize = iparticlepacketsize + 1
83 iparticlepacketsize = iparticlepacketsize + 1
84 IF(particle_orientation) &
85 iparticlepacketsize = iparticlepacketsize + 3
86 IF(des_explicitly_coupled)
THEN 87 iparticlepacketsize = iparticlepacketsize + 3
88 IF(
energy_eq)iparticlepacketsize = iparticlepacketsize + 1
104 lmaxlen1 = max(lmaxlen1,lmaxlen2)
110 lmaxarea = lmaxlen1*lmaxlen2 + 10
114 imaxbuf = lmaxghostpar*lmaxarea*ighostpacketsize
116 WRITE(
err_msg, 1000) imaxbuf/onembo8, onembo8/ighostpacketsize, &
120 1000
FORMAT(/
'DES MPI send/recv buffer: ',f7.1,
' MB',/
' o ',f6.0,1x, &
121 'Ghost Particles/MB',/
' o ',f6.0,1x,
'Particles/MB',/
' o ', &
122 f6.0,1x,
'Neighbor Pairs/MB')
125 allocate (dsendbuf(2));
126 allocate (drecvbuf(2));
127 do ii=1,
size(dsendbuf)
128 allocate (dsendbuf(ii)%facebuf(imaxbuf));
129 allocate (drecvbuf(ii)%facebuf(imaxbuf));
132 allocate (isendindices(lmaxarea,lfaces)); isendindices=0
133 allocate (irecvindices(lmaxarea,lfaces)); irecvindices=0
135 allocate (isendreq(lfaces)); isendreq=0
136 allocate (irecvreq(lfaces)); irecvreq=0
137 allocate (isendcnt(lfaces)); isendcnt=0
139 allocate (dcycl_offset(lfaces,dimn)); dcycl_offset=0.0
140 allocate (ineighproc(lfaces)); ineighproc=0
141 allocate (iexchflag(lfaces)); iexchflag=.false.
144 allocate(iscattercnts(0:
numpes-1)); iscattercnts=0
145 allocate(igathercnts(0:
numpes-1)); igathercnts=0
146 allocate(idispls(0:
numpes-1)); idispls=0
166 integer lijkproc,liproc,ljproc,lkproc
167 integer li,lj,lk,lis,lie,ljs,lje,lks,lke,lcount,lface
168 integer listart1,liend1,ljstart1,ljend1,lkstart1,lkend1
169 integer listart2,liend2,ljstart2,ljend2,lkstart2,lkend2
183 if(liproc.lt.
nodesi-1)
then 191 if(ljproc.lt.
nodesj-1)
then 199 if(lkproc.lt.
nodesk-1)
then 206 if (des_periodic_walls_x)
then 212 if(liproc.eq.
nodesi-1)
then 218 if (des_periodic_walls_y)
then 224 if(ljproc.eq.
nodesj-1)
then 230 if (des_periodic_walls_z)
then 236 if(lkproc.eq.
nodesk-1)
then 255 IF(.NOT.des_periodic_walls_x)
THEN 260 IF(.NOT.des_periodic_walls_y)
THEN 265 IF(do_k .AND. .NOT.des_periodic_walls_z)
THEN 398 integer lcurpar,lproc,lbuf,lpacketsize
399 integer lproc_parcnt(0:
numpes-1),lpar_proc(particles)
404 rdimn = merge(2,3, no_k)
407 lpacketsize = 2*rdimn + 2
415 do lcurpar = 1,particles
421 lpar_proc(lcurpar) = lproc
422 lproc_parcnt(lproc) = lproc_parcnt(lproc) + 1
426 if (lpar_proc(lcurpar).eq.-1)
then 432 do lcurpar = 1,particles
440 lpar_proc(lcurpar) = lproc
441 lproc_parcnt(lproc) = lproc_parcnt(lproc) + 1
445 if (lpar_proc(lcurpar).eq.-1)
then 455 pip = lproc_parcnt(
mype)
457 max_pip = max(pip,max_pip)
461 allocate (
drootbuf(particles*lpacketsize))
476 do lcurpar = 1,particles
477 lproc = lpar_proc(lcurpar)
478 lbuf =
idispls(lproc)+lproc_parcnt(lproc)*lpacketsize+1
490 lbuf = (lcurpar-1)*lpacketsize+1
491 des_radius(lcurpar) =
dprocbuf(lbuf); lbuf = lbuf+1
492 ro_sol(lcurpar) =
dprocbuf(lbuf); lbuf = lbuf+1
493 des_pos_new(lcurpar,1:rdimn) =
dprocbuf(lbuf:lbuf+rdimn-1); lbuf
495 call set_normal(lcurpar)
499 500
FORMAT(/2x,
'From: DES_SCATTER_PARTICLE: (0)',/2x,&
500 'ERROR: Unable to locate the particle (no. ',i10,&
501 ') inside the domain')
502 501
FORMAT(/2x,
'From: DES_SCATTER_PARTICLE: (1)',/2x,&
503 'ERROR: Unable to locate the particle (no. ',i10,&
504 ') inside the domain')
552 ighost_updated(:) = .false.
555 do lface = linter*2-1,linter*2
558 call desmpi_sendrecv_init(lface)
560 do lface = linter*2-1,linter*2
566 do lface = linter*2-1,linter*2
integer, dimension(:), allocatable istart1_all
integer, dimension(:), allocatable kstart1_all
integer function procijk(fi, fj, fk)
subroutine desmpi_scatterv(ptype, pdebug)
subroutine des_mpi_stop(myid)
integer, dimension(:), allocatable kend1_all
integer, parameter des_interp_garg
subroutine desmpi_sendrecv_init(pface, pdebug)
double precision, dimension(:), allocatable dprocbuf
integer iparticlepacketsize
subroutine desgrid_pic(plocate)
subroutine desmpi_sendrecv_wait(pface, pdebug)
integer function iofproc(fijk)
double precision, dimension(:), allocatable dpar_rad
logical, dimension(:), allocatable iexchflag
subroutine, public desmpi_unpack_ghostpar(pface)
subroutine, public desmpi_pack_ghostpar(PFACE)
subroutine des_mpi_barrier
type(array), dimension(:), allocatable dsendbuf
subroutine des_scatter_particle
double precision, dimension(:), allocatable dpar_den
type(array), dimension(:), allocatable drecvbuf
integer, dimension(:,:), allocatable isendindices
integer function kofproc(fijk)
double precision, dimension(:,:), allocatable dpar_pos
integer function jofproc(fijk)
subroutine desmpi_setcomm()
integer, dimension(:), allocatable jstart1_all
subroutine desmpi_check_sendrecvbuf(check_global)
double precision, dimension(:,:), allocatable dcycl_offset
integer, dimension(:), allocatable idispls
integer, dimension(:), allocatable jend1_all
character(len=line_length), dimension(line_count) err_msg
integer, dimension(:), allocatable ineighproc
integer, dimension(:,:), allocatable irecvindices
integer function dg_funijk(fi, fj, fk)
double precision, dimension(:,:), allocatable dpar_vel
subroutine, public particle_grow(new_max_pip)
subroutine des_restart_ghost
double precision, dimension(:), allocatable drootbuf
integer, dimension(:), allocatable iend1_all
subroutine flush_err_msg(DEBUG, HEADER, FOOTER, ABORT, LOG, CALL_TREE)
integer, dimension(:), allocatable iscattercnts