49     subroutine setup_mpi_jump(ne_dg_loc, el_new, nnode, node_proc, nel_loc, loc_el_num, &
 
   50                           nnloc, loc_n_num, ncs,cs,&
 
   51                           nsend_jump, node_send_jump, nrecv_jump, node_recv_jump,&
 
   52                           nproc, proc_send_jump, proc_recv_jump, id, mpi_file)
 
   59     type(
el4loop), 
dimension(ne_dg_loc), 
intent(in) :: el_new
 
   61     character*70 :: filename, mpi_file, filename_new
 
   63     integer*4 :: nel_loc, ncs, nsend_jump, nrecv_jump, nproc, id, ne_dg_loc, nnode, nnloc
 
   64     integer*4 :: i,j,k,ie,ip,ic,ieloc
 
   65     integer*4 :: it,ir,im, tt, ttt
 
   66     integer*4 :: unitfile, ncs_mpi, nelem_mpi, pos     
 
   68     integer*4, 
dimension(:), 
allocatable :: i4vec
 
   69     integer*4, 
dimension(:), 
allocatable :: cs_mpi
 
   70     integer*4, 
dimension(nel_loc) :: loc_el_num
 
   71     integer*4, 
dimension(nnloc) :: loc_n_num(nnloc)
 
   72     integer*4, 
dimension(nnode) :: node_proc
 
   73     integer*4, 
dimension(0:ncs) :: cs
 
   74     integer*4, 
dimension(nsend_jump) :: node_send_jump
 
   75     integer*4, 
dimension(nrecv_jump) :: node_recv_jump
 
   76     integer*4, 
dimension(nproc) :: proc_send_jump, proc_recv_jump
 
   80        if ((ip -1).eq.id) 
then 
   81           proc_recv_jump(ip) = 0
 
   84           filename = 
'DGCS000000.mpi' 
   86           if (ip-1 .lt. 10) 
then                                         
   87               write(filename(10:10),
'(i1)') ip-1                
 
   88           else if (ip-1 .lt. 100) 
then                                 
   89               write(filename(9:10),
'(i2)') ip-1
 
   90           else if (ip-1 .lt. 1000) 
then                                 
   91               write(filename(8:10),
'(i3)') ip-1
 
   92           else if (ip-1 .lt. 10000) 
then                                 
   93               write(filename(7:10),
'(i4)') ip-1
 
   94           else if (ip-1 .lt. 100000) 
then                                 
   95               write(filename(6:10),
'(i5)') ip-1
 
   96           else if (ip-1 .lt. 1000000) 
then                                 
   97               write(filename(5:10),
'(i6)') ip-1
 
  100           if(len_trim(mpi_file) .ne. 70) 
then                                                                                   
  101              filename_new = mpi_file(1:len_trim(mpi_file)) // 
'/' // filename
 
  103              filename_new = filename
 
  106           open(unitfile,file=filename_new)        
 
  107           read(unitfile,*) ncs_mpi
 
  108           allocate(cs_mpi(0:ncs_mpi))
 
  111               read(unitfile,*) cs_mpi(i)
 
  116           allocate(i4vec(ncs_mpi))
 
  117           nelem_mpi = cs_mpi(0)-1
 
  125              do it = 1, el_new(im)%num_of_ne
 
  127                 ie = el_new(im)%el_conf(it,1)
 
  129                 call check_mpi(ncs_mpi, cs_mpi, ie, tt, pos) 
 
  133                    do i = cs_mpi(pos -1) +1, cs_mpi(pos) -1
 
  137                           if(ic .ge. 1) 
call check_vector(ic, i4vec(1:ic), cs_mpi(i), ttt)
 
  140                             i4vec(ic) = cs_mpi(i)
 
  155                 if (i4vec(j).lt.i4vec(i)) 
then 
  166              if (i4vec(i).ne.i4vec(j)) 
then 
  174           proc_recv_jump(ip) = j
 
  176           if (nrecv_jump .ne. 0) 
then 
  179                 ic = ic + proc_recv_jump(i)
 
  182              do i = 1, proc_recv_jump(ip)
 
  183                 node_recv_jump(ic +i) = i4vec(i)
 
  187           deallocate(cs_mpi, i4vec) 
 
  192     if (nrecv_jump.eq.0) 
then 
  194           nrecv_jump = nrecv_jump + proc_recv_jump(i)
 
  203        if ((ip -1).eq.id) 
then 
  204           proc_send_jump(ip) = 0
 
  207           filename = 
'DGCS000000.mpi' 
  209           if (ip-1 .lt. 10) 
then                                         
  210               write(filename(10:10),
'(i1)') ip-1                
 
  211           else if (ip-1 .lt. 100) 
then                                 
  212               write(filename(9:10),
'(i2)') ip-1
 
  213           else if (ip-1 .lt. 1000) 
then                                 
  214               write(filename(8:10),
'(i3)') ip-1
 
  215           else if (ip-1 .lt. 10000) 
then                                 
  216               write(filename(7:10),
'(i4)') ip-1
 
  217           else if (ip-1 .lt. 100000) 
then                                 
  218               write(filename(6:10),
'(i5)') ip-1
 
  219           else if (ip-1 .lt. 1000000) 
then                                 
  220               write(filename(5:10),
'(i6)') ip-1
 
  223           if(len_trim(mpi_file) .ne. 70) 
then                                                                                   
  224             filename_new = mpi_file(1:len_trim(mpi_file)) // 
'/' // filename
 
  226             filename_new = filename
 
  229           open(unitfile,file=filename_new)        
 
  230           read(unitfile,*) ncs_mpi
 
  231           allocate(cs_mpi(0:ncs_mpi))
 
  234               read(unitfile,*) cs_mpi(i)
 
  245              do it = 1, el_new(im)%num_of_ne    
 
  246                 ie = el_new(im)%el_conf(it,1)
 
  248                 call check_mpi(ncs_mpi, cs_mpi, ie, tt, pos) 
 
  253                    do i = cs(ieloc -1) +1, cs(ieloc) -1
 
  257                           if(ic .ge. 1)  
call check_vector(ic, i4vec(1:ic), loc_n_num(cs(i)), ttt)
 
  261                                i4vec(ic) = loc_n_num(cs(i))
 
  274                 if (i4vec(j).lt.i4vec(i)) 
then 
  284              if (i4vec(i).ne.i4vec(j)) 
then 
  292           proc_send_jump(ip) = j
 
  294           if (nsend_jump.ne.0) 
then 
  297                 ic = ic +proc_send_jump(i)
 
  300              do i = 1, proc_send_jump(ip)
 
  301                 node_send_jump(ic +i) = i4vec(i)
 
  310     if (nsend_jump.eq.0) 
then 
  312           nsend_jump = nsend_jump +proc_send_jump(i)
 
 
subroutine setup_mpi_jump(ne_dg_loc, el_new, nnode, node_proc, nel_loc, loc_el_num, nnloc, loc_n_num, ncs, cs, nsend_jump, node_send_jump, nrecv_jump, node_recv_jump, nproc, proc_send_jump, proc_recv_jump, id, mpi_file)
Routine used to setup the communication buffer structure.