From d9f6e44ca076324bdd8734a10c6775b9c543bf17 Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Tue, 14 Oct 2014 13:36:45 -0400 Subject: [PATCH] Added comments, alphabetized declarations for #332 --- src/ace.F90 | 13 ++++++------- src/cmfd_solver.F90 | 42 ++++++++++++++++++++-------------------- src/eigenvalue.F90 | 7 ++++--- src/energy_grid.F90 | 2 +- src/fission.F90 | 2 +- src/fixed_source.F90 | 4 ++-- src/geometry.F90 | 2 +- src/global.F90 | 2 +- src/initialize.F90 | 2 +- src/input_xml.F90 | 4 ++-- src/interpolation.F90 | 2 +- src/particle_restart.F90 | 6 ++---- src/physics.F90 | 2 +- src/plot.F90 | 2 +- src/search.F90 | 2 +- src/solver_interface.F90 | 2 +- src/source.F90 | 2 +- src/state_point.F90 | 4 ++-- src/string.F90 | 2 +- src/tally.F90 | 6 ++---- src/tracking.F90 | 2 +- src/xml_interface.F90 | 2 +- 22 files changed, 55 insertions(+), 59 deletions(-) diff --git a/src/ace.F90 b/src/ace.F90 index a5b042f3ab..e4bc3a2f90 100644 --- a/src/ace.F90 +++ b/src/ace.F90 @@ -15,15 +15,14 @@ module ace implicit none - character(2*MAX_LINE_LEN) :: message + integer :: JXS(32) ! Pointers into ACE XSS tables + integer :: NXS(16) ! Descriptors for ACE XSS tables + real(8), allocatable :: XSS(:) ! Cross section data + integer :: XSS_index ! Current index in XSS data + character(2*MAX_LINE_LEN) :: message ! Message to output unit - integer :: NXS(16) ! Descriptors for ACE XSS tables - integer :: JXS(32) ! Pointers into ACE XSS tables - real(8), allocatable :: XSS(:) ! Cross section data - integer :: XSS_index ! current index in XSS data - - private :: NXS private :: JXS + private :: NXS private :: XSS contains diff --git a/src/cmfd_solver.F90 b/src/cmfd_solver.F90 index 15406c143c..360169845e 100644 --- a/src/cmfd_solver.F90 +++ b/src/cmfd_solver.F90 @@ -2,7 +2,7 @@ module cmfd_solver ! This module contains routines to execute the power iteration solver - use constants + use constants, only: MAX_LINE_LEN use cmfd_loss_operator, only: init_loss_matrix, build_loss_matrix use cmfd_prod_operator, only: init_prod_matrix, build_prod_matrix use matrix_header, only: Matrix @@ -12,26 +12,26 @@ module cmfd_solver private public :: cmfd_solver_execute - real(8) :: k_n ! new k-eigenvalue - real(8) :: k_o ! old k-eigenvalue - real(8) :: k_s ! shift of eigenvalue - real(8) :: k_ln ! new shifted eigenvalue - real(8) :: k_lo ! old shifted eigenvalue - real(8) :: norm_n ! current norm of source vector - real(8) :: norm_o ! old norm of source vector - real(8) :: kerr ! error in keff - real(8) :: serr ! error in source - real(8) :: ktol ! tolerance on keff - real(8) :: stol ! tolerance on source - logical :: adjoint_calc ! run an adjoint calculation - type(Matrix) :: loss ! cmfd loss matrix - type(Matrix) :: prod ! cmfd prod matrix - type(Vector) :: phi_n ! new flux vector - type(Vector) :: phi_o ! old flux vector - type(Vector) :: s_n ! new source vector - type(Vector) :: s_o ! old flux vector - type(Vector) :: serr_v ! error in source - character(2*MAX_LINE_LEN) :: message + real(8) :: k_n ! New k-eigenvalue + real(8) :: k_o ! Old k-eigenvalue + real(8) :: k_s ! Shift of eigenvalue + real(8) :: k_ln ! New shifted eigenvalue + real(8) :: k_lo ! Old shifted eigenvalue + real(8) :: norm_n ! Current norm of source vector + real(8) :: norm_o ! Old norm of source vector + real(8) :: kerr ! Error in keff + real(8) :: serr ! Error in source + real(8) :: ktol ! Tolerance on keff + real(8) :: stol ! Tolerance on source + logical :: adjoint_calc ! Run an adjoint calculation + type(Matrix) :: loss ! Cmfd loss matrix + type(Matrix) :: prod ! Cmfd prod matrix + type(Vector) :: phi_n ! New flux vector + type(Vector) :: phi_o ! Old flux vector + type(Vector) :: s_n ! New source vector + type(Vector) :: s_o ! Old flux vector + type(Vector) :: serr_v ! Error in source + character(2*MAX_LINE_LEN) :: message ! Message to output unit ! CMFD linear solver interface procedure(linsolve), pointer :: cmfd_linsolver => null() diff --git a/src/eigenvalue.F90 b/src/eigenvalue.F90 index b0152ddeeb..8605acb0f5 100644 --- a/src/eigenvalue.F90 +++ b/src/eigenvalue.F90 @@ -26,9 +26,10 @@ module eigenvalue private public :: run_eigenvalue - character(2*MAX_LINE_LEN) :: message - real(8) :: keff_generation ! Single-generation k on each processor - real(8) :: k_sum(2) = ZERO ! used to reduce sum and sum_sq + real(8) :: keff_generation ! Single-generation k on each + ! processor + real(8) :: k_sum(2) = ZERO ! Used to reduce sum and sum_sq + character(2*MAX_LINE_LEN) :: message ! Message to output unit contains diff --git a/src/energy_grid.F90 b/src/energy_grid.F90 index 8d8c549b06..e62f84d473 100644 --- a/src/energy_grid.F90 +++ b/src/energy_grid.F90 @@ -5,7 +5,7 @@ module energy_grid use list_header, only: ListReal use output, only: write_message - character(2*MAX_LINE_LEN) :: message + character(2*MAX_LINE_LEN) :: message ! Message to output unit contains diff --git a/src/fission.F90 b/src/fission.F90 index de82a134a7..952fd64de2 100644 --- a/src/fission.F90 +++ b/src/fission.F90 @@ -8,7 +8,7 @@ module fission implicit none - character(2*MAX_LINE_LEN) :: message + character(2*MAX_LINE_LEN) :: message ! Message to output unit contains diff --git a/src/fixed_source.F90 b/src/fixed_source.F90 index b98e35ad92..2016ded5ef 100644 --- a/src/fixed_source.F90 +++ b/src/fixed_source.F90 @@ -1,6 +1,6 @@ module fixed_source - use constants, only: ZERO + use constants, only: ZERO, MAX_LINE_LEN use global use output, only: write_message, header use particle_header, only: Particle @@ -11,7 +11,7 @@ module fixed_source use tally, only: synchronize_tallies, setup_active_usertallies use tracking, only: transport - character(2*MAX_LINE_LEN) :: message + character(2*MAX_LINE_LEN) :: message ! Message to output unit contains diff --git a/src/geometry.F90 b/src/geometry.F90 index a0663900ba..1476fa2e39 100644 --- a/src/geometry.F90 +++ b/src/geometry.F90 @@ -12,7 +12,7 @@ module geometry implicit none - character(2*MAX_LINE_LEN) :: message + character(2*MAX_LINE_LEN) :: message ! Message to output unit contains diff --git a/src/global.F90 b/src/global.F90 index 8241580362..f4c50b8330 100644 --- a/src/global.F90 +++ b/src/global.F90 @@ -393,7 +393,7 @@ module global integer :: n_res_scatterers_total = 0 ! total number of resonant scatterers type(Nuclide0K), allocatable, target :: nuclides_0K(:) ! 0K nuclides info -!$omp threadprivate(micro_xs, material_xs, fission_bank, n_bank, message, & +!$omp threadprivate(micro_xs, material_xs, fission_bank, n_bank, & !$omp& trace, thread_id, current_work, matching_bins) contains diff --git a/src/initialize.F90 b/src/initialize.F90 index a4384cbbb3..dd3b284c20 100644 --- a/src/initialize.F90 +++ b/src/initialize.F90 @@ -38,7 +38,7 @@ module initialize implicit none - character(2*MAX_LINE_LEN) :: message + character(2*MAX_LINE_LEN) :: message ! Message to output unit contains diff --git a/src/input_xml.F90 b/src/input_xml.F90 index 247a97b09b..7025c4b89b 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -20,9 +20,9 @@ module input_xml implicit none save - character(2*MAX_LINE_LEN) :: message - type(DictIntInt) :: cells_in_univ_dict ! used to count how many cells each + type(DictIntInt) :: cells_in_univ_dict ! Used to count how many cells each ! universe contains + character(2*MAX_LINE_LEN) :: message ! Message to output unit contains diff --git a/src/interpolation.F90 b/src/interpolation.F90 index 36c7aa37a2..4075b5e5e4 100644 --- a/src/interpolation.F90 +++ b/src/interpolation.F90 @@ -8,7 +8,7 @@ module interpolation implicit none - character(2*MAX_LINE_LEN) :: message + character(2*MAX_LINE_LEN) :: message ! Message to output unit interface interpolate_tab1 module procedure interpolate_tab1_array, interpolate_tab1_object diff --git a/src/particle_restart.F90 b/src/particle_restart.F90 index 73ddfd4ae0..dd68d5a896 100644 --- a/src/particle_restart.F90 +++ b/src/particle_restart.F90 @@ -16,10 +16,8 @@ module particle_restart private public :: run_particle_restart - ! Binary file - type(BinaryOutput) :: pr - - character(2*MAX_LINE_LEN) :: message + character(2*MAX_LINE_LEN) :: message ! Message to output unit + type(BinaryOutput) :: pr ! Binary file contains diff --git a/src/physics.F90 b/src/physics.F90 index 7bcfa45507..353b7fd344 100644 --- a/src/physics.F90 +++ b/src/physics.F90 @@ -20,7 +20,7 @@ module physics implicit none - character(2*MAX_LINE_LEN) :: message + character(2*MAX_LINE_LEN) :: message ! Message to output unit ! TODO: Figure out how to write particle restart files in sample_angle, ! sample_energy, etc. diff --git a/src/plot.F90 b/src/plot.F90 index 93ff5066f7..a879d4e2ec 100644 --- a/src/plot.F90 +++ b/src/plot.F90 @@ -16,7 +16,7 @@ module plot implicit none - character(2*MAX_LINE_LEN) :: message + character(2*MAX_LINE_LEN) :: message ! Message to output unit contains diff --git a/src/search.F90 b/src/search.F90 index a48348524f..f228060864 100644 --- a/src/search.F90 +++ b/src/search.F90 @@ -9,7 +9,7 @@ module search module procedure binary_search_real, binary_search_int4, binary_search_int8 end interface binary_search - character(2*MAX_LINE_LEN) :: message + character(2*MAX_LINE_LEN) :: message ! Message to output unit contains diff --git a/src/solver_interface.F90 b/src/solver_interface.F90 index f4b4032e65..a2bb900b65 100644 --- a/src/solver_interface.F90 +++ b/src/solver_interface.F90 @@ -13,7 +13,7 @@ module solver_interface implicit none private - character(2*MAX_LINE_LEN) :: message + character(2*MAX_LINE_LEN) :: message ! Message to output unit ! GMRES solver type type, public :: GMRESSolver diff --git a/src/source.F90 b/src/source.F90 index 68a9994967..8b8542fd6a 100644 --- a/src/source.F90 +++ b/src/source.F90 @@ -19,7 +19,7 @@ module source implicit none - character(2*MAX_LINE_LEN) :: message + character(2*MAX_LINE_LEN) :: message ! Message to output unit contains diff --git a/src/state_point.F90 b/src/state_point.F90 index af960c0923..c3332ed740 100644 --- a/src/state_point.F90 +++ b/src/state_point.F90 @@ -26,8 +26,8 @@ module state_point implicit none - character(2*MAX_LINE_LEN) :: message - type(BinaryOutput) :: sp ! statepoint/source output file + character(2*MAX_LINE_LEN) :: message ! Message to output unit + type(BinaryOutput) :: sp ! Statepoint/source output file contains diff --git a/src/string.F90 b/src/string.F90 index 05037d019f..7b3689f0eb 100644 --- a/src/string.F90 +++ b/src/string.F90 @@ -10,7 +10,7 @@ module string module procedure int4_to_str, int8_to_str, real_to_str end interface - character(2*MAX_LINE_LEN) :: message + character(2*MAX_LINE_LEN) :: message ! Message to output unit contains diff --git a/src/tally.F90 b/src/tally.F90 index 1803eb34e3..db3894379b 100644 --- a/src/tally.F90 +++ b/src/tally.F90 @@ -21,12 +21,10 @@ module tally implicit none - ! Tally map positioning array - integer :: position(N_FILTER_TYPES - 3) = 0 + character(2*MAX_LINE_LEN) :: message ! Message to output unit + integer :: position(N_FILTER_TYPES - 3) = 0 ! Tally map positioning array !$omp threadprivate(position) - character(2*MAX_LINE_LEN) :: message - contains !=============================================================================== diff --git a/src/tracking.F90 b/src/tracking.F90 index f0eb381eb4..eb94016310 100644 --- a/src/tracking.F90 +++ b/src/tracking.F90 @@ -16,7 +16,7 @@ module tracking use track_output, only: initialize_particle_track, write_particle_track, & finalize_particle_track - character(2*MAX_LINE_LEN) :: message + character(2*MAX_LINE_LEN) :: message ! Message to output unit contains diff --git a/src/xml_interface.F90 b/src/xml_interface.F90 index 43103b153c..907de77d96 100644 --- a/src/xml_interface.F90 +++ b/src/xml_interface.F90 @@ -37,7 +37,7 @@ module xml_interface module procedure get_node_array_string end interface get_node_array - character(2*MAX_LINE_LEN) :: message + character(2*MAX_LINE_LEN) :: message ! Message to output unit contains