diff --git a/src/cmfd_data.F90 b/src/cmfd_data.F90 index a64cc129e5..7ebab70052 100644 --- a/src/cmfd_data.F90 +++ b/src/cmfd_data.F90 @@ -828,8 +828,9 @@ contains subroutine fix_neutron_balance() - use constants, only: ONE, ZERO, CMFD_NOACCEL - use global, only: cmfd, cmfd_balance, keff + use constants, only: ONE, ZERO, CMFD_NOACCEL + use global, only: cmfd, cmfd_balance, keff + use, intrinsic :: ISO_FORTRAN_ENV integer :: nx ! number of mesh cells in x direction integer :: ny ! number of mesh cells in y direction @@ -915,7 +916,8 @@ contains ! check for no fission into group 2 if (.not.(nsigf12 < 1e-6_8 .and. nsigf22 < 1e-6_8)) then - write(*,*) 'Fission in G=2',nsigf12,nsigf22 + write(OUTPUT_UNIT,'(A,1PE11.4,1X,1PE11.4)') 'Fission in G=2', & + nsigf12,nsigf22 end if ! compute absorption xs diff --git a/src/cmfd_input.F90 b/src/cmfd_input.F90 index 268c0e598b..fbb018802b 100644 --- a/src/cmfd_input.F90 +++ b/src/cmfd_input.F90 @@ -36,6 +36,7 @@ contains use global use output, only: write_message use xml_data_cmfd_t + use, intrinsic :: ISO_FORTRAN_ENV integer :: ng logical :: file_exists ! does cmfd.xml exist? @@ -85,15 +86,18 @@ contains allocate(cmfd % coremap(cmfd % indices(1), cmfd % indices(2), & cmfd % indices(3))) if (size(mesh_ % map) /= product(cmfd % indices(1:3))) then - write(*,*) 'FATAL==>CMFD coremap not to correct dimensions' - stop + message = 'FATAL==>CMFD coremap not to correct dimensions' + call fatal_error() end if cmfd % coremap = reshape(mesh_ % map,(cmfd % indices(1:3))) cmfd_coremap = .true. end if ! check for core map activation by printing note - if (cmfd_coremap .and. master) write(*,*)"Core Map Overlay Activated" + if (cmfd_coremap .and. master) then + message = "Core Map Overlay Activated" + call write_message() + end if ! check for normalization constant cmfd % norm = norm_ @@ -146,7 +150,8 @@ contains ! set number of CMFD processors and report to user n_procs_cmfd = n_cmfd_procs_ - if (master) write(*,*) "CMFD Running on",n_procs_cmfd," processors." + if (master) write(OUTPUT_UNIT,'(A,1X,I0,1X,A)') "CMFD Running on", & + n_procs_cmfd," processors." end subroutine read_cmfd_xml diff --git a/src/cmfd_output.F90 b/src/cmfd_output.F90 index 8b707e1d07..ac16f20d8e 100644 --- a/src/cmfd_output.F90 +++ b/src/cmfd_output.F90 @@ -6,7 +6,7 @@ module cmfd_output implicit none private - public :: finalize_cmfd, cmfd_output_summary, write_hdf5_output + public :: finalize_cmfd, write_hdf5_output contains @@ -52,32 +52,6 @@ contains end subroutine write_neutron_balance -!=============================================================================== -! CMFD_OUTPUT_SUMMARY -!=============================================================================== - - subroutine cmfd_output_summary() - - use global, only: cmfd, time_cmfd, cmfd_run_adjoint - use output, only: header - use timing, only: timer_get_value - - real(8) :: elapsed - - ! get elapsed time - elapsed = timer_get_value(time_cmfd) - - ! print out heading -! call header('CMFD Execution Summary',1) - - ! write out information -! call printStdOutCard(OFF=0, DSC='Total time elapsed', RV=elapsed, PS=' s') -! call printStdOutCard(OFF=0, DSC='Final k-effective', RV=cmfd%keff) -! if (cmfd_run_adjoint) & -! call printStdOutCard(OFF=0, DSC='Adjoint eigenvalue', RV=cmfd%adj_keff) - - end subroutine cmfd_output_summary - !=============================================================================== ! WRITE_HDF5_OUTPUT !=============================================================================== diff --git a/src/cmfd_power_solver.F90 b/src/cmfd_power_solver.F90 index 8dfd90e16a..7dd2903c94 100644 --- a/src/cmfd_power_solver.F90 +++ b/src/cmfd_power_solver.F90 @@ -161,6 +161,7 @@ contains use global, only: cmfd_power_monitor, cmfd_solver_type, & n_procs_cmfd, cmfd_ilu_levels, master use string, only: to_str + use, intrinsic :: ISO_FORTRAN_ENV character(len=20) :: ksptype,pctype @@ -189,22 +190,26 @@ contains ! print heading information if (cmfd_power_monitor .and. master) then - write(*,*) - write(*,*) '########################################################' - write(*,*) '################ Power Iteration Solver ################' - write(*,*) '########################################################' - write(*,*) - write(*,*) 'Eigenvalue Tolerance:', ktol - write(*,*) 'Source Tolerance: ', stol - write(*,*) - write(*,*) 'Linear Solver Type: ', ksptype - write(*,*) 'Preconditioner Type: ', pctype - write(*,*) 'ILU Fill Levels:', cmfd_ilu_levels - write(*,*) - write(*,*) '---------------------------------------------' - write(*,*) + write(OUTPUT_UNIT,'(A)') '' + write(OUTPUT_UNIT,'(A)') '########################################################' + write(OUTPUT_UNIT,'(A)') '################ Power Iteration Solver ################' + write(OUTPUT_UNIT,'(A)') '########################################################' + write(OUTPUT_UNIT,'(A)') + write(OUTPUT_UNIT,100) 'Eigenvalue Tolerance:', ktol + write(OUTPUT_UNIT,100) 'Source Tolerance: ', stol + write(OUTPUT_UNIT,'(A)') '' + write(OUTPUT_UNIT,102) 'Linear Solver Type: ', ksptype + write(OUTPUT_UNIT,102) 'Preconditioner Type: ', pctype + write(OUTPUT_UNIT,101) 'ILU Fill Levels:', cmfd_ilu_levels + write(OUTPUT_UNIT,'(A)') '' + write(OUTPUT_UNIT,'(A)') '---------------------------------------------' + write(OUTPUT_UNIT,'(A)') '' end if + 100 FORMAT(A,1X,1PE11.4) + 101 FORMAT(A,1X,I0) + 102 FORMAT(A,1X,A) + end subroutine precondition_matrix !=============================================================================== @@ -295,6 +300,7 @@ contains subroutine convergence(iter) use global, only: cmfd_power_monitor, master + use, intrinsic :: ISO_FORTRAN_ENV integer :: iter ! iteration number @@ -321,7 +327,7 @@ contains ! print out to user if (cmfd_power_monitor .and. master) then - write(*,FMT='(I0,":",T10,"k-eff: ",F0.8,T30,"k-error: ",1PE12.5,T55, & + write(OUTPUT_UNIT,FMT='(I0,":",T10,"k-eff: ",F0.8,T30,"k-error: ",1PE12.5,T55, & "src-error: ",1PE12.5)') iter, k_n, kerr, serr end if diff --git a/src/cmfd_snes_solver.F90 b/src/cmfd_snes_solver.F90 index b4988baef5..298b7fc9ed 100644 --- a/src/cmfd_snes_solver.F90 +++ b/src/cmfd_snes_solver.F90 @@ -180,6 +180,7 @@ contains use global, only: cmfd_snes_monitor, cmfd_solver_type, & n_procs_cmfd, cmfd_ilu_levels, master use string, only: to_str + use, intrinsic :: ISO_FORTRAN_ENV character(LEN=20) :: snestype, ksptype, pctype @@ -209,19 +210,22 @@ contains ! display solver info to user if (cmfd_snes_monitor .and. master) then - write(*,*) - write(*,*) '########################################################' - write(*,*) '################ JFNK Nonlinear Solver ################' - write(*,*) '########################################################' - write(*,*) - write(*,*) 'NONLINEAR SOLVER: ', snestype - write(*,*) 'LINEAR SOLVER: ', ksptype - write(*,*) 'PRECONDITIONER: ', pctype - write(*,*) 'ILU levels: ', cmfd_ilu_levels - write(*,*) - write(*,*) '---------------------------------------------' - write(*,*) + write(OUTPUT_UNIT,'(A)') '' + write(OUTPUT_UNIT,'(A)') '########################################################' + write(OUTPUT_UNIT,'(A)') '################ JFNK Nonlinear Solver ################' + write(OUTPUT_UNIT,'(A)') '########################################################' + write(OUTPUT_UNIT,'(A)') '' + write(OUTPUT_UNIT,101) 'NONLINEAR SOLVER: ', snestype + write(OUTPUT_UNIT,101) 'LINEAR SOLVER: ', ksptype + write(OUTPUT_UNIT,101) 'PRECONDITIONER: ', pctype + write(OUTPUT_UNIT,100) 'ILU levels: ', cmfd_ilu_levels + write(OUTPUT_UNIT,'(A)') '' + write(OUTPUT_UNIT,'(A)') '---------------------------------------------' + write(OUTPUT_UNIT,'(A)') '' end if + + 100 FORMAT(A,1X,I0) + 101 FORMAT(A,1X,A) end subroutine precondition_matrix