44 USE mpi
, only: mpi_comm_world, mpi_barrier
54 USE discretelement
, only: discrete_element
86 DOUBLE PRECISION :: DT_tmp
88 DOUBLE PRECISION :: TIME_SAVE
98 bdoing_postmfix = .false.
108 id_version =
'2016-1' 141 CALL cpu_time (cpu00)
203 1010
FORMAT(
'Message 1010: Read in data from .RES file for TIME = ',
204 'Time step number (NSTEP) =',i7)
227 ' MFIX: Do not know how to process' 235 call mpi_barrier(mpi_comm_world,
mpierr)
239 dt = max(dt_min,min(dt_max,
dt))
309 WRITE(*,*)
' RE-INDEXING CELLS FOR CARTESIAN GRID...' 382 IF (call_usr)
CALL usr0 454 run_status =
'DT < DT_MIN. Recovery not possible!' 484 INTEGER :: i1, i10, i100, i1000, i10000
487 i10000 = int(mype/10000)
488 i1000 = int((mype-i10000*10000)/1000)
489 i100 = int((mype-i10000*10000-i1000*1000)/100)
490 i10 = int((mype-i10000*10000-i1000*1000-i100*100)/10)
491 i1 = int((mype-i10000*10000-i1000*1000-i100*100-i10*10)/1)
499 fbname=char(i10000)//char(i1000)//char(i100)//char(i10)//char(i1)
550 INTEGER :: i, j, k, ijk, ijk_GL, ijk_PROC, ijk_IO
552 integer :: indxA, indxA_gl, indxB, indxB_gl, indxC, indxC_gl
553 integer :: indxD, indxD_gl, indxE, indxE_gl, indxF, indxF_gl
554 integer :: indxG, indxG_gl, indxH, indxH_gl
556 logical :: amgdbg = .true.
558 character(LEN=80) :: fname
563 fname =
"layout_xxxxx.txt" 564 write (fname(8:12),
'(i5.5)')
mype 565 open (unit=11,file=fname,status=
'unknown')
567 write (11,*)
' ********************************************' 568 write (11,*)
' ********************************************' 569 write (11,*)
' ********************************************' 570 write (11,*)
' ********************************************' 573 write (11,*)
' myPE = ' ,
mype 579 write(11,.AND..AND.
"('BLK1: Running from istart3,iend3 jstart3, jend3 kstart3, kend3')" 580 write(11,
"(' ( i , j, k) => ijk ijk_GL ijk_PROC ijk_IO')" 581 write(11,
"(' ==================== ===== ======= ======== ======')" 586 ijk_gl = funijk_gl(i,j,k)
587 ijk_proc = funijk_proc(i,j,k,
mype)
588 ijk_io = funijk_io(i,j,k)
589 write(11,
"(' (',I4,' , ',I4,' , ',I4,') => ',4(I8,' , '))" 595 write(11,
"(/,/,'BLK2: Print out Bottom, South, West, East, North, Top neighbors')" 596 write(11,
"(' ( i , j, k) => ijk ijk_GL B_of S_of W_of E_of N_of T_of')" 597 write(11,
"(' ==================== ===== ======= ====== ====== ====== ====== ====== ======')" 602 ijk_gl = funijk_gl(i,j,k)
603 write(11,
"(' (',I4,' , ',I4,' , ',I4,') => ',2(I7,' , '),6(I7,2X))" 610 write(11,
"(/,/,'BLK3: Print out km, jm, im, ip, jp, kp neighbors')" 611 write(11,
"(' ( i , j, k) => ijk ijk_GL km_of jm_of im_of ip_of jp_of kp_of')" 612 write(11,
"(' ==================== ===== ======= ====== ====== ====== ====== ====== ======')" 617 ijk_gl = funijk_gl(i,j,k)
618 write(11,
"(' (',I4,' , ',I4,' , ',I4,') => ',2(I7,' , '),6(I7,2X))" 625 write(11,
"(/,'BLK4a: Active Fluid Cells:FLUID_AT(ijk)=.T.',/,& 626 & ' ( i , j, k) => ijk [ x , , z]')" 627 write(11,
"(' ==================== ===== ====================')" 634 IF (fluid_at(ijk))
THEN 636 write(11,
"(' (',I4,' , ',I4,' , ',I4,') => ',I8,' [',E12.5,',',E12.5,' ]')" 640 write(11,.NOT.
"(/,'BLK4b: Cells that are (WALL_AT(IJK)) = .T.',/,& 641 & ' ( i , j, k) => ijk [ x , , z]')" 642 write(11,
"(' ==================== ===== ====================')" 648 IF (.NOT.wall_at(ijk))
THEN 650 write(11,
"(' (',I4,' , ',I4,' , ',I4,') => ',I8,' [',E12.5,',',E12.5,' ]')" 658 ijk_gl = funijk_gl(i,j,k)
694 write(11,
"('BLK5:')")
695 write(11,
"(57('='))")
696 write(11,
"('k= ',I5,/,57('='))") k
697 write(11,
"('B= ',I5,' (',I7,')',20X,'C= ',I5,' (',I7,')',/)" 701 write(11,
"(3X,'F= ',I5,' (',I7,')',12X,'G= ',I5,' (',I7,')')" 703 write(11,
"(4(9X,'|',29X,'|',/))")
704 write(11,
"(3X,'E= ',I5,' (',I7,')',12X,'H= ',I5,' (',I7,')',/)" 708 write(11,
"('A= ',I5,' (',I7,')',20X,'D= ',I5,' (',I7,')',/,/)" 737 write(11,
"(/,/,'BLK6: ========= ORIGINAL MFIX VARIABLES ===========')" 738 write(11,
"('PE ',I5,': imin1 = ',I6,3X,'imax1= ',I6,/,'PE ',I5,': jmin1 = ',I6,3X,'jmax1= ',I6)" 740 write(11,
"('PE ',I5,': kmin1 = ',I6,3X,'kmax1= ',I6)")
mype,
kmin1 741 write(11,
"('-----')")
742 write(11,
"('PE ',I5,': imin2 = ',I6,3X,'imax2= ',I6,/,'PE ',I5,': jmin2 = ',I6,3X,'jmax2= ',I6)" 744 write(11,
"('PE ',I5,': kmin2 = ',I6,3X,'kmax2= ',I6)")
mype,
kmin2 745 write(11,
"('----- Below xxx3 set is DMP extension ------------')" 746 write(11,
"('PE ',I5,': imin3 = ',I6,3X,'imax3= ',I6,/,'PE ',I5,': jmin3 = ',I6,3X,'jmax3= ',I6)" 748 write(11,
"('PE ',I5,': kmin3 = ',I6,3X,'kmax3= ',I6)")
mype,
kmin3 749 write(11,
"('----- End of Below xxx3 set is DMP extension -----')" 751 write(11,
"('PE ',I5,': ijmax2 = ',I6)")
mype,
ijmax2 752 write(11,
"('PE ',I5,': ijkmin1= ',I6,' ijkmax1= ',I12)")
mype,
ijkmin1 753 write(11,
"('PE ',I5,': ',6X,' ijkmax2= ',I12)")
mype,
ijkmax2 754 write(11,
"('PE ',I5,': ',6X,' ijkmax3= ',I12)")
mype,
ijkmax3 755 write(11,
"('PE ',I5,': ijkmin4= ',I6,' ijkmax4= ',I12)")
mype,
ijkmin4 758 write(11,
"(/,/,' ========= DMP EXTENSION VARIABLES ===========')" 760 write(11,
"('PE ',I5,': ijksize3 = ',I6,3X,'ijksize3_all = ',I6)" 761 write(11,
"('PE ',I5,': ijksize4 = ',I6,3X,'ijksize4_all = ',I6)" 762 write(11,
"('PE ',I5,': ijkstart3 = ',I6,3X,'ijkend3 = ',I6)")
763 write(11,
"('PE ',I5,': ijkstart3_all = ',I6,3X,'ijkstart4_all = ',I6)" 764 write(11,
"('PE ',I5,': istart_all = ',I6,3X,'iend_all = ',I6,/,'PE ',I5,': jstart_all = ',I6,3X,'jend_all = ',I6)" 766 write(11,
"('PE ',I5,': kstart_all = ',I6,3X,'kend_all = ',I6,/,'----------------------')" 769 write(11,
"('PE ',I5,': istart1_all= ',I6,3X,'iend1_all= ',I6,/,'PE ',I5,': jstart1_all= ',I6,3X,'jend3_all= ',I6)" 771 write(11,
"('PE ',I5,': kstart1_all= ',I6,3X,'kend1_all= ',I6,/,'----------------------')" 774 write(11,
"('PE ',I5,': istart2_all= ',I6,3X,'iend2_all= ',I6,/,'PE ',I5,': jstart2_all= ',I6,3X,'jend3_all= ',I6)" 776 write(11,
"('PE ',I5,': kstart2_all= ',I6,3X,'kend2_all= ',I6,/,'----------------------')" 779 write(11,
"('PE ',I5,': istart3_all= ',I6,3X,'iend3_all= ',I6,/,'PE ',I5,': jstart3_all= ',I6,3X,'jend3_all= ',I6)" 781 write(11,
"('PE ',I5,': kstart3_all= ',I6,3X,'kend3_all= ',I6,/,'----------------------')" 784 write(11,
"('PE ',I5,': istart1= ',I6,3X,'iend1= ',I6,/,'PE ',I5,': jstart1= ',I6,3X,'jend1= ',I6)" 786 write(11,
"('PE ',I5,': kstart1= ',I6,3X,'kend1= ',I6,/,'----------------------')" 788 write(11,
"('PE ',I5,': istart2= ',I6,3X,'iend2= ',I6,/,'PE ',I5,': jstart2= ',I6,3X,'jend2= ',I6)" 790 write(11,
"('PE ',I5,': kstart2= ',I6,3X,'kend2= ',I6,/,'----------------------')" 792 write(11,
"('PE ',I5,': istart3= ',I6,3X,'iend3= ',I6,/,'PE ',I5,': jstart3= ',I6,3X,'jend3= ',I6)" 794 write(11,
"('PE ',I5,': kstart3= ',I6,3X,'kend3= ',I6,/,'----------------------')" 839 INTEGER :: i, j, k, ijk, ijk_GL, ijk_PROC, ijk_IO
841 character(LEN=80) :: fname
847 fname =
"p_info_xxxxx.txt" 848 write (fname(8:12),
'(i5.5)')
mype 849 open (unit=11,file=fname,status=
'unknown')
851 write (11,*)
mype ,
' = myPE' 857 write(11,.AND..AND.
"('BLK1: Running from istart3,iend3 jstart3, jend3 kstart3, kend3')" 858 write(11,
"(' ( i , j, k) ijk ijk_GL ijk_PROC ijk_IO')" 859 write(11,
"(' ==================== ===== ======= ======== ======')" 864 ijk_gl = funijk_gl(i,j,k)
865 ijk_proc = funijk_proc(i,j,k,
mype)
866 ijk_io = funijk_io(i,j,k)
867 write(11,
"(' ',I4,' ',I4,' ',I4,' ',4(I8,' '))" 895 character(len=100000),
intent(in) :: str
896 character :: aa(100000)
897 character :: do_mpi_bcast(100000)
906 call mpi_bcast(aa,100000,mpi_character,0,mpi_comm_world,ierr)
910 do_mpi_bcast(ii:ii) = aa(ii)
930 character(len=*),
intent(in) :: filename
950 CHARACTER(LEN=80),
INTENT(IN) :: ARG
955 print *,
"TOO MANY COMMAND LINE ARGUMENTS" integer, dimension(:), allocatable istart1_all
subroutine write_spx0(L, UNIT_ADD)
integer, dimension(:), allocatable kstart1_all
subroutine mark_phase_4_cor(PHASE_4_P_G, PHASE_4_P_S, DO_CONT, MCP, DO_P_S, SWITCH_4_P_G, SWITCH_4_P_S)
subroutine parallel_init()
double precision time_nlog
subroutine init_output_vars
integer, dimension(:), allocatable i_of
subroutine report_best_processor_size
double precision, dimension(:), allocatable e_n
subroutine setup_vtk_no_cutcell
subroutine update_dashboard(NIT, TLEFT, TUNIT)
subroutine output_manager(EXIT_SIGNAL, FINISHED)
integer, dimension(:), allocatable kend1_all
subroutine get_corner_cells()
integer, dimension(:), allocatable istart2_all
double precision, dimension(:,:), allocatable d_n
subroutine set_increments3
subroutine write_spx1(L, unit_add)
subroutine check_mass_balance(init)
double precision function wall_time()
integer, dimension(:), allocatable kstart2_all
double precision cpu_nlog
integer, dimension(:), allocatable iend3_all
subroutine write_netcdf(L, unit_add, the_time)
character(len=512) version
double precision, dimension(:,:), allocatable d_e
integer, dimension(:), allocatable ijksize4_all
subroutine set_increments
double precision, dimension(:), allocatable e_t
logical automatic_restart
integer, dimension(:), allocatable istart_all
subroutine do_reinit(filename)
double precision, parameter undefined
double precision, dimension(:,:), allocatable d_t
logical, dimension(:), allocatable do_cont
logical bstart_with_one_res
integer, dimension(:), allocatable phase_4_p_s
subroutine qmomk_make_arrays
subroutine init_err_msg(CALLER)
integer, dimension(:), allocatable k_of
integer, dimension(:), allocatable ijkstart4_all
double precision cputime_used
integer, dimension(:), allocatable jend_all
integer, dimension(:), allocatable kstart3_all
subroutine mfix_exit(myID, normal_termination)
integer, dimension(:), allocatable istart3_all
integer, dimension(:), allocatable j_of
integer, dimension(:), allocatable jend2_all
logical, dimension(20) bwrite_netcdf
character(len=40) run_status
subroutine add_command_line_argument(ARG)
integer, dimension(:), allocatable iend2_all
integer, dimension(:), allocatable jstart3_all
subroutine init_coeff(IER)
subroutine gen_log_basename
character(len=16) run_type
integer, dimension(:), allocatable jstart_all
character function, dimension(100000) do_mpi_bcast(str)
integer, dimension(:), allocatable kend2_all
integer cmd_line_args_count
subroutine set_fluidbed_p
integer, parameter unit_log
subroutine parallel_fin()
integer, dimension(:), allocatable jstart1_all
subroutine close_cut_cell_files
integer, dimension(:), allocatable phase_4_p_g
subroutine reinitialize(filename)
subroutine write_dbg_vtu_and_vtp_files
integer, dimension(:), allocatable kend3_all
integer, dimension(:), allocatable jend3_all
logical function mfix_usingnetcdf()
subroutine debug_write_layout()
integer, dimension(:), allocatable jend1_all
character(len=line_length), dimension(line_count) err_msg
subroutine parse_resid_string()
double precision, dimension(:,:), allocatable f_gs
character(len=80), dimension(100) cmd_line_args
integer, dimension(:), allocatable iend_all
integer, parameter unit_res
subroutine re_index_arrays
subroutine undef_2_0(VARDUM)
subroutine check_bc_flags
double precision, dimension(:,:), allocatable rop_s
double precision, dimension(:), allocatable z
double precision, dimension(:), allocatable e_e
integer, dimension(:), allocatable kstart_all
subroutine do_write_dbg_vtu_and_vtp_files
subroutine write_parallel_info()
integer, dimension(:), allocatable ijksize3_all
integer, dimension(:), allocatable jstart2_all
integer, dimension(:), allocatable ijkstart3_all
integer, dimension(:), allocatable kend_all
double precision, dimension(:), allocatable rop_g
subroutine get_tunit(TLEFT, TUNIT)
integer, dimension(:), allocatable iend1_all
double precision, dimension(:), allocatable x
subroutine write_out3(CPU, WALL, IO)
double precision, parameter zero
double precision walltime_used
character(len=10) id_version
subroutine make_arrays_des
subroutine flush_err_msg(DEBUG, HEADER, FOOTER, ABORT, LOG, CALL_TREE)