From 392fecb7db736c355ec4e45a85be27a624ced415 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Thu, 1 Dec 2011 11:31:02 -0500 Subject: [PATCH] Removed echo_input, added print_geometry, allow plotting mode to use pwd by default. --- src/initialize.f90 | 8 ++--- src/output.f90 | 85 ++++++++++++++++++++++------------------------ 2 files changed, 44 insertions(+), 49 deletions(-) diff --git a/src/initialize.f90 b/src/initialize.f90 index d9d79736e4..ce045c499d 100644 --- a/src/initialize.f90 +++ b/src/initialize.f90 @@ -14,8 +14,8 @@ module initialize cells_in_univ_dict use logging, only: create_log use mpi_routines, only: setup_mpi - use output, only: title, echo_input, message, print_summary, & - print_particle, header, print_plot + use output, only: title, header, print_summary, print_geometry, & + print_plot use random_lcg, only: initialize_prng use source, only: initialize_source use string, only: int_to_str, starts_with, ends_with, lower_case @@ -104,9 +104,9 @@ contains ! stop timer for initialization if (master) then if (plotting) then + call print_geometry() call print_plot() else - call echo_input() call print_summary() end if end if @@ -150,7 +150,7 @@ contains end do ! Determine directory where XML input files are - if (argc > 0) then + if (argc > 0 .and. last_flag < argc) then path_input = argv(last_flag + 1) ! Need to add working directory if the given path is a relative path if (.not. starts_with(path_input, "/")) then diff --git a/src/output.f90 b/src/output.f90 index d5eb843da3..3f52da8a05 100644 --- a/src/output.f90 +++ b/src/output.f90 @@ -58,36 +58,6 @@ contains end subroutine title -!=============================================================================== -! ECHO_INPUT displays summary information about the problem about to be run -! after reading all the input. -!=============================================================================== - - subroutine echo_input() - - ! Display problem summary - call header("PROBLEM SUMMARY") - if (problem_type == PROB_CRITICALITY) then - write(ou,100) 'Problem type:', 'Criticality' - write(ou,101) 'Number of Cycles:', n_cycles - write(ou,101) 'Number of Inactive Cycles:', n_inactive - elseif (problem_type == PROB_SOURCE) then - write(ou,100) 'Problem type:', 'External Source' - end if - write(ou,101) 'Number of Particles:', n_particles - - ! Display geometry summary - call header("GEOMETRY SUMMARY") - write(ou,101) 'Number of Cells:', n_cells - write(ou,101) 'Number of Surfaces:', n_surfaces - write(ou,101) 'Number of Materials:', n_materials - - ! Format descriptor for columns -100 format (1X,A,T35,A) -101 format (1X,A,T35,I11) - - end subroutine echo_input - !=============================================================================== ! HEADER displays a header block according to a specified level. If no level is ! specified, it is assumed to be a minor header block (H3). @@ -642,21 +612,17 @@ contains end subroutine print_tally !=============================================================================== -! PRINT_SUMMARY displays the attributes of all cells, universes, -! surfaces and materials read in the input file. Very useful for -! debugging! +! PRINT_GEOMETRY displays the attributes of all cells, surfaces, universes, +! surfaces, and lattices read in the input files. !=============================================================================== - subroutine print_summary() + subroutine print_geometry() + integer :: i type(Surface), pointer :: s => null() type(Cell), pointer :: c => null() type(Universe), pointer :: u => null() type(Lattice), pointer :: l => null() - type(Material), pointer :: m => null() - type(TallyObject), pointer :: t => null() - character(15) :: string - integer :: i ! print summary of cells call header("CELL SUMMARY") @@ -688,6 +654,40 @@ contains call print_surface(s) end do + end subroutine print_geometry + +!=============================================================================== +! PRINT_SUMMARY displays summary information about the problem about to be run +! after reading all input files +!=============================================================================== + + subroutine print_summary() + + integer :: i + character(15) :: string + type(Material), pointer :: m => null() + type(TallyObject), pointer :: t => null() + + ! Display problem summary + call header("PROBLEM SUMMARY") + if (problem_type == PROB_CRITICALITY) then + write(ou,100) 'Problem type:', 'Criticality' + write(ou,101) 'Number of Cycles:', n_cycles + write(ou,101) 'Number of Inactive Cycles:', n_inactive + elseif (problem_type == PROB_SOURCE) then + write(ou,100) 'Problem type:', 'External Source' + end if + write(ou,101) 'Number of Particles:', n_particles + + ! Display geometry summary + call header("GEOMETRY SUMMARY") + write(ou,101) 'Number of Cells:', n_cells + write(ou,101) 'Number of Surfaces:', n_surfaces + write(ou,101) 'Number of Materials:', n_materials + + ! print summary of all geometry + call print_geometry() + ! print summary of materials call header("MATERIAL SUMMARY") do i = 1, n_materials @@ -724,14 +724,9 @@ contains write(ou,*) ! Format descriptor for columns -100 format (1X,A,T25,A) +100 format (1X,A,T35,A) +101 format (1X,A,T35,I11) - nullify(s) - nullify(c) - nullify(u) - nullify(l) - nullify(m) - nullify(t) end subroutine print_summary