diff --git a/.gitignore b/.gitignore index a58bf032e6..8fd929bbcb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ *.mod *.log *.out -git_sha1.h # Compiler python objects *.pyc diff --git a/docs/source/devguide/statepoint.rst b/docs/source/devguide/statepoint.rst index 9862a45282..5f05c92c83 100644 --- a/docs/source/devguide/statepoint.rst +++ b/docs/source/devguide/statepoint.rst @@ -4,6 +4,296 @@ State Point Binary File Specifications ====================================== +----------- +Revision 11 +----------- + +**integer(4) FILETYPE_STATEPOINT** + + Flags whether this file is a statepoint file or a particle restart file. + +**integer(4) REVISION_STATEPOINT** + + Revision of the binary state point file. Any time a change is made in the + format of the state-point file, this integer is incremented. + +**integer(4) VERSION_MAJOR** + + Major version number for OpenMC + +**integer(4) VERSION_MINOR** + + Minor version number for OpenMC + +**integer(4) VERSION_RELEASE** + + Release version number for OpenMC + +**character(19) time_stamp** + + Date and time the state point was written. + +**character(255) path** + + Absolute path to directory containing input files. + +**integer(8) seed** + + Pseudo-random number generator seed. + +**integer(4) run_mode** + + run mode used. The modes are described in constants.F90. + +**integer(8) n_particles** + + Number of particles used per generation. + +**integer(4) n_batches** + + Total number of batches (active + inactive). + +**integer(4) current_batch** + + The number of batches already simulated. + +if (run_mode == MODE_EIGENVALUE) + + **integer(4) n_inactive** + + Number of inactive batches + + **integer(4) gen_per_batch** + + Number of generations per batch for criticality calculations + + *do i = 1, current_batch \* gen_per_batch* + + **real(8) k_generation(i)** + + k-effective for the i-th total generation + + *do i = 1, current_batch \* gen_per_batch* + + **real(8) entropy(i)** + + Shannon entropy for the i-th total generation + + **real(8) k_col_abs** + + Sum of product of collision/absorption estimates of k-effective + + **real(8) k_col_tra** + + Sum of product of collision/track-length estimates of k-effective + + **real(8) k_abs_tra** + + Sum of product of absorption/track-length estimates of k-effective + + **real(8) k_combined(2)** + + Mean and standard deviation of a combined estimate of k-effective + + **integer(4) cmfd_on** + + Flag that cmfd is on + + if (cmfd_on) + + **integer(4) cmfd % indices** + + Indices for cmfd mesh (i,j,k,g) + + **real(8) cmfd % k_cmfd(1:current_batch)** + + CMFD eigenvalues + + **real(8) cmfd % src(1:G,1:I,1:J,1:K)** + + CMFD fission source + + **real(8) cmfd % entropy(1:current_batch)** + + CMFD estimate of Shannon entropy + + **real(8) cmfd % balance(1:current_batch)** + + RMS of the residual neutron balance equation on CMFD mesh + + **real(8) cmfd % dom(1:current_batch)** + + CMFD estimate of dominance ratio + + **real(8) cmfd % scr_cmp(1:current_batch)** + + RMS comparison of difference between OpenMC and CMFD fission source + +**integer(4) n_meshes** + + Number of meshes in tallies.xml file + +*do i = 1, n_meshes* + + **integer(4) meshes(i) % id** + + Unique ID of mesh. + + **integer(4) meshes(i) % type** + + Type of mesh. + + **integer(4) meshes(i) % n_dimension** + + Number of dimensions for mesh (2 or 3). + + **integer(4) meshes(i) % dimension(:)** + + Number of mesh cells in each dimension. + + **real(8) meshes(i) % lower_left(:)** + + Coordinates of lower-left corner of mesh. + + **real(8) meshes(i) % upper_right(:)** + + Coordinates of upper-right corner of mesh. + + **real(8) meshes(i) % width(:)** + + Width of each mesh cell in each dimension. + +**integer(4) n_tallies** + +*do i = 1, n_tallies* + + **integer(4) tallies(i) % id** + + Unique ID of tally. + + **integer(4) tallies(i) % n_realizations** + + Number of realizations for the i-th tally. + + **integer(4) size(tallies(i) % scores, 1)** + + Total number of score bins for the i-th tally + + **integer(4) size(tallies(i) % scores, 2)** + + Total number of filter bins for the i-th tally + + **integer(4) tallies(i) % n_filters** + + *do j = 1, tallies(i) % n_filters* + + **integer(4) tallies(i) % filter(j) % type** + + Type of tally filter. + + **integer(4) tallies(i) % filter(j) % n_bins** + + Number of bins for filter. + + **integer(4)/real(8) tallies(i) % filter(j) % bins(:)** + + Value for each filter bin of this type. + + **integer(4) tallies(i) % n_nuclide_bins** + + Number of nuclide bins. If none are specified, this is just one. + + *do j = 1, tallies(i) % n_nuclide_bins* + + **integer(4) tallies(i) % nuclide_bins(j)** + + Values of specified nuclide bins + + **integer(4) tallies(i) % n_score_bins** + + Number of scoring bins. + + *do j = 1, tallies(i) % n_score_bins* + + **integer(4) tallies(i) % score_bins(j)** + + Values of specified scoring bins (e.g. SCORE_FLUX). + + *do j = 1, tallies(i) % n_score_bins* + + **integer(4) tallies(i) % scatt_order(j)** + + Scattering Order specified scoring bins. + + **integer(4) tallies(i) % n_score_bins** + + Number of scoring bins without accounting for those added by + the scatter-pn command. + +**integer(4) source_present** + + Flag indicated if source bank is present in the file + +**integer(4) n_realizations** + + Number of realizations for global tallies. + +**integer(4) N_GLOBAL_TALLIES** + + Number of global tally scores + +*do i = 1, N_GLOBAL_TALLIES* + + **real(8) global_tallies(i) % sum** + + Accumulated sum for the i-th global tally + + **real(8) global_tallies(i) % sum_sq** + + Accumulated sum of squares for the i-th global tally + +**integer(4) tallies_on** + + Flag indicated if tallies are present in the file. + +if (tallies_on > 0) + + *do i = 1, n_tallies* + + *do k = 1, size(tallies(i) % scores, 2)* + + *do j = 1, size(tallies(i) % scores, 1)* + + **real(8) tallies(i) % scores(j,k) % sum** + + Accumulated sum for the j-th score and k-th filter of the + i-th tally + + **real(8) tallies(i) % scores(j,k) % sum_sq** + + Accumulated sum of squares for the j-th score and k-th + filter of the i-th tally + +if (run_mode == MODE_EIGENVALUE and source_present) + + *do i = 1, n_particles* + + **real(8) source_bank(i) % wgt** + + Weight of the i-th source particle + + **real(8) source_bank(i) % xyz(1:3)** + + Coordinates of the i-th source particle. + + **real(8) source_bank(i) % uvw(1:3)** + + Direction of the i-th source particle + + **real(8) source_bank(i) % E** + + Energy of the i-th source particle. + ----------- Revision 10 ----------- diff --git a/docs/source/releasenotes/notes_0.5.4.rst b/docs/source/releasenotes/notes_0.5.4.rst index 174064e35b..a69354aa0a 100644 --- a/docs/source/releasenotes/notes_0.5.4.rst +++ b/docs/source/releasenotes/notes_0.5.4.rst @@ -4,10 +4,6 @@ Release Notes for OpenMC 0.5.4 ============================== -.. note:: - These release notes are for an upcoming release of OpenMC and are still - subject to change. - ------------------- System Requirements ------------------- @@ -21,16 +17,17 @@ the problem at hand (mostly on the number of nuclides in the problem). New Features ------------ -- New XML parsing backend (FoX) +- Source sites outside geometry are resampled +- XML-Fortran backend replaced by FoX XML - Ability to write particle track files - Handle lost particles more gracefully (via particle track files) -- Source sites outside geometry are resampled - Multiple random number generator streams -- plot_mesh_tally.py utility converted to use Tkinter rather than PyQt +- Mesh tally plotting utility converted to use Tkinter rather than PyQt - Script added to download ACE data from NNDC - Mixed ASCII/binary cross_sections.xml now allowed - Expanded options for writing source bank - Re-enabled ability to use source file as starting source +- S(a,b) recalculation avoided when same nuclide and S(a,b) table are accessed --------- Bug Fixes @@ -41,12 +38,16 @@ Bug Fixes - 8884fb_: Check for all ZAIDs for S(a,b) tables - b38af0_: Fix XML reading on multiple levels of input - d28750_: Fix bug in convert_xsdir.py +- cf567c_: ENDF/B-VI data checked for compatibility +- 6b9461_: Fix p_valid sampling inside of sample_energy .. _32c03c: https://github.com/mit-crpg/openmc/commit/32c03c .. _c71ef5: https://github.com/mit-crpg/openmc/commit/c71ef5 .. _8884fb: https://github.com/mit-crpg/openmc/commit/8884fb .. _b38af0: https://github.com/mit-crpg/openmc/commit/b38af0 .. _d28750: https://github.com/mit-crpg/openmc/commit/d28750 +.. _cf567c: https://github.com/mit-crpg/openmc/commit/cf567c +.. _6b9461: https://github.com/mit-crpg/openmc/commit/6b9461 ------------ Contributors diff --git a/docs/source/usersguide/input.rst b/docs/source/usersguide/input.rst index 83eb2a3d8a..eebe6bfc14 100644 --- a/docs/source/usersguide/input.rst +++ b/docs/source/usersguide/input.rst @@ -414,6 +414,8 @@ attributes/sub-elements: source bank will be available. It should be noted that a user can set both this element to "true" and specify batches to write a permanent source bank. + *Default*: false + ```` Element ------------------------------ diff --git a/docs/source/usersguide/install.rst b/docs/source/usersguide/install.rst index 53bfbe4018..313372fa6b 100644 --- a/docs/source/usersguide/install.rst +++ b/docs/source/usersguide/install.rst @@ -83,8 +83,8 @@ Prerequisites OpenMC with. HDF5_ must be built with parallel I/O features if you intend to use HDF5_ with MPI. An example of configuring HDF5_ is listed below:: - FC=/opt/mpich/3.0.4-gnu/bin/mpif90 CC=/opt/mpich/3.0.4-gnu/bin/mpicc \ - ./configure --prefix=/opt/hdf5/1.8.11-gnu --enable-fortran \ + FC=/opt/mpich/3.1/bin/mpif90 CC=/opt/mpich/3.1/bin/mpicc \ + ./configure --prefix=/opt/hdf5/1.8.12 --enable-fortran \ --enable-fortran2003 --enable-parallel You may omit ``--enable-parallel`` if you want to compile HDF5_ in serial. @@ -97,8 +97,8 @@ Prerequisites requires PETSc_ to be configured with Fortran datatypes. An example of configuring PETSc_ is listed below:: - ./configure --prefix=/opt/petsc/3.4.2-gnu --download-f-blas-lapack \ - --with-mpi-dir=/opt/mpich/3.0.4-gnu/ --with-shared-libraries=0 \ + ./configure --prefix=/opt/petsc/3.4.4 --download-f-blas-lapack \ + --with-mpi-dir=/opt/mpich/3.1 --with-shared-libraries \ --with-fortran-datatypes The BLAS/LAPACK library is not required to be downloaded and can be linked @@ -194,8 +194,8 @@ should be used: Compiling with MPI ++++++++++++++++++ -To compile with MPI, set the FC environment variable to the path to the MPI -Fortran wrapper. For example, in a bash shell: +To compile with MPI, set the :envvar:`FC` environment variable to the path to +the MPI Fortran wrapper. For example, in a bash shell: .. code-block:: sh @@ -212,8 +212,8 @@ command, i.e. Compiling with HDF5 +++++++++++++++++++ -To compile with MPI, set the FC environment variable to the path to the HDF5 -Fortran wrapper. For example, in a bash shell: +To compile with MPI, set the :envvar:`FC` environment variable to the path to +the HDF5 Fortran wrapper. For example, in a bash shell: .. code-block:: sh diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7047b2f671..2a8e33954f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -63,9 +63,9 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel") # Intel Fortran compiler options - set(f90flags "-fpp -warn -assume byterecl -traceback") + set(f90flags "-fpp -std08 -assume byterecl -traceback") if(debug) - set(f90flags "-g -ftrapuv -fp-stack-check -check all -fpe0 ${f90flags}") + set(f90flags "-g -warn -ftrapuv -fp-stack-check -check all -fpe0 ${f90flags}") set(ldflags "-g") endif() if(profile) @@ -157,18 +157,13 @@ endif() # git SHA1 hash #=============================================================================== -execute_process(COMMAND git log -1 - COMMAND head -n 1 - COMMAND cut -c8- +execute_process(COMMAND git rev-parse -q HEAD WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} RESULT_VARIABLE GIT_SHA1_SUCCESS OUTPUT_VARIABLE GIT_SHA1 ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) if(GIT_SHA1_SUCCESS EQUAL 0) - file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/git_sha1.h - "#define GIT_SHA1 \"${GIT_SHA1}\"") -else() - file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/git_sha1.h "") + add_definitions(-DGIT_SHA1="${GIT_SHA1}") endif() #=============================================================================== diff --git a/src/DEPENDENCIES b/src/DEPENDENCIES deleted file mode 100644 index 50e0a40a6a..0000000000 --- a/src/DEPENDENCIES +++ /dev/null @@ -1,407 +0,0 @@ -ace.o: ace_header.o -ace.o: constants.o -ace.o: endf.o -ace.o: error.o -ace.o: fission.o -ace.o: global.o -ace.o: material_header.o -ace.o: output.o -ace.o: set_header.o -ace.o: string.o - -ace_header.o: constants.o -ace_header.o: endf_header.o - -cmfd_data.o: cmfd_header.o -cmfd_data.o: constants.o -cmfd_data.o: error.o -cmfd_data.o: global.o -cmfd_data.o: mesh.o -cmfd_data.o: mesh_header.o -cmfd_data.o: string.o -cmfd_data.o: tally_header.o - -cmfd_execute.o: cmfd_data.o -cmfd_execute.o: cmfd_jfnk_solver.o -cmfd_execute.o: cmfd_power_solver.o -cmfd_execute.o: cmfd_solver.o -cmfd_execute.o: constants.o -cmfd_execute.o: error.o -cmfd_execute.o: global.o -cmfd_execute.o: mesh.o -cmfd_execute.o: mesh_header.o -cmfd_execute.o: output.o -cmfd_execute.o: search.o -cmfd_execute.o: tally.o - -cmfd_header.o: constants.o - -cmfd_input.o: cmfd_header.o -cmfd_input.o: constants.o -cmfd_input.o: error.o -cmfd_input.o: global.o -cmfd_input.o: mesh_header.o -cmfd_input.o: output.o -cmfd_input.o: string.o -cmfd_input.o: tally.o -cmfd_input.o: tally_header.o -cmfd_input.o: tally_initialize.o -cmfd_input.o: xml_interface.o - -cmfd_jfnk_solver.o: cmfd_loss_operator.o -cmfd_jfnk_solver.o: cmfd_power_solver.o -cmfd_jfnk_solver.o: cmfd_prod_operator.o -cmfd_jfnk_solver.o: constants.o -cmfd_jfnk_solver.o: global.o -cmfd_jfnk_solver.o: matrix_header.o -cmfd_jfnk_solver.o: solver_interface.o -cmfd_jfnk_solver.o: vector_header.o - -cmfd_loss_operator.o: constants.o -cmfd_loss_operator.o: global.o -cmfd_loss_operator.o: matrix_header.o - -cmfd_power_solver.o: cmfd_loss_operator.o -cmfd_power_solver.o: cmfd_prod_operator.o -cmfd_power_solver.o: constants.o -cmfd_power_solver.o: global.o -cmfd_power_solver.o: matrix_header.o -cmfd_power_solver.o: solver_interface.o -cmfd_power_solver.o: vector_header.o - -cmfd_prod_operator.o: constants.o -cmfd_prod_operator.o: global.o -cmfd_prod_operator.o: matrix_header.o - -cmfd_slepc_solver.o: cmfd_loss_operator.o -cmfd_slepc_solver.o: cmfd_prod_operator.o -cmfd_slepc_solver.o: constants.o -cmfd_slepc_solver.o: global.o - -cmfd_solver.o: cmfd_loss_operator.o -cmfd_solver.o: cmfd_prod_operator.o -cmfd_solver.o: constants.o -cmfd_solver.o: error.o -cmfd_solver.o: global.o -cmfd_solver.o: matrix_header.o -cmfd_solver.o: vector_header.o - -cross_section.o: ace_header.o -cross_section.o: constants.o -cross_section.o: error.o -cross_section.o: fission.o -cross_section.o: global.o -cross_section.o: material_header.o -cross_section.o: particle_header.o -cross_section.o: random_lcg.o -cross_section.o: search.o - -doppler.o: constants.o - -eigenvalue.o: cmfd_execute.o -eigenvalue.o: constants.o -eigenvalue.o: error.o -eigenvalue.o: global.o -eigenvalue.o: math.o -eigenvalue.o: mesh.o -eigenvalue.o: mesh_header.o -eigenvalue.o: output.o -eigenvalue.o: particle_header.o -eigenvalue.o: random_lcg.o -eigenvalue.o: search.o -eigenvalue.o: source.o -eigenvalue.o: state_point.o -eigenvalue.o: string.o -eigenvalue.o: tally.o -eigenvalue.o: tracking.o - -endf.o: constants.o -endf.o: string.o - -energy_grid.o: constants.o -energy_grid.o: global.o -energy_grid.o: list_header.o -energy_grid.o: output.o - -error.o: global.o - -finalize.o: global.o -finalize.o: hdf5_interface.o -finalize.o: output.o -finalize.o: tally.o - -fission.o: ace_header.o -fission.o: constants.o -fission.o: error.o -fission.o: global.o -fission.o: interpolation.o -fission.o: search.o - -fixed_source.o: constants.o -fixed_source.o: global.o -fixed_source.o: output.o -fixed_source.o: particle_header.o -fixed_source.o: random_lcg.o -fixed_source.o: source.o -fixed_source.o: state_point.o -fixed_source.o: string.o -fixed_source.o: tally.o -fixed_source.o: tracking.o - -geometry.o: constants.o -geometry.o: error.o -geometry.o: geometry_header.o -geometry.o: global.o -geometry.o: output.o -geometry.o: particle_header.o -geometry.o: particle_restart_write.o -geometry.o: string.o -geometry.o: tally.o - -global.o: ace_header.o -global.o: bank_header.o -global.o: cmfd_header.o -global.o: constants.o -global.o: dict_header.o -global.o: geometry_header.o -global.o: hdf5_interface.o -global.o: material_header.o -global.o: mesh_header.o -global.o: plot_header.o -global.o: set_header.o -global.o: source_header.o -global.o: tally_header.o -global.o: timer_header.o - -hdf5_summary.o: ace_header.o -hdf5_summary.o: constants.o -hdf5_summary.o: endf.o -hdf5_summary.o: geometry_header.o -hdf5_summary.o: global.o -hdf5_summary.o: material_header.o -hdf5_summary.o: mesh_header.o -hdf5_summary.o: output.o -hdf5_summary.o: output_interface.o -hdf5_summary.o: string.o -hdf5_summary.o: tally_header.o - -initialize.o: ace.o -initialize.o: bank_header.o -initialize.o: constants.o -initialize.o: dict_header.o -initialize.o: energy_grid.o -initialize.o: error.o -initialize.o: geometry.o -initialize.o: geometry_header.o -initialize.o: global.o -initialize.o: hdf5_interface.o -initialize.o: hdf5_summary.o -initialize.o: input_xml.o -initialize.o: output.o -initialize.o: output_interface.o -initialize.o: random_lcg.o -initialize.o: source.o -initialize.o: state_point.o -initialize.o: string.o -initialize.o: tally_header.o -initialize.o: tally_initialize.o - -input_xml.o: cmfd_input.o -input_xml.o: constants.o -input_xml.o: dict_header.o -input_xml.o: error.o -input_xml.o: geometry_header.o -input_xml.o: global.o -input_xml.o: list_header.o -input_xml.o: mesh_header.o -input_xml.o: output.o -input_xml.o: plot_header.o -input_xml.o: random_lcg.o -input_xml.o: string.o -input_xml.o: tally_header.o -input_xml.o: tally_initialize.o -input_xml.o: xml_interface.o - -interpolation.o: constants.o -interpolation.o: endf_header.o -interpolation.o: error.o -interpolation.o: global.o -interpolation.o: search.o -interpolation.o: string.o - -list_header.o: constants.o - -main.o: constants.o -main.o: eigenvalue.o -main.o: finalize.o -main.o: fixed_source.o -main.o: global.o -main.o: initialize.o -main.o: particle_restart.o -main.o: plot.o - -math.o: constants.o -math.o: random_lcg.o - -matrix_header.o: constants.o -matrix_header.o: vector_header.o - -mesh.o: constants.o -mesh.o: global.o -mesh.o: mesh_header.o -mesh.o: particle_header.o -mesh.o: search.o - -output.o: ace_header.o -output.o: constants.o -output.o: endf.o -output.o: error.o -output.o: geometry_header.o -output.o: global.o -output.o: math.o -output.o: mesh.o -output.o: mesh_header.o -output.o: particle_header.o -output.o: plot_header.o -output.o: string.o -output.o: tally_header.o - -output_interface.o: constants.o -output_interface.o: error.o -output_interface.o: global.o -output_interface.o: hdf5_interface.o -output_interface.o: mpiio_interface.o -output_interface.o: tally_header.o - -particle_header.o: constants.o -particle_header.o: geometry_header.o - -particle_restart.o: bank_header.o -particle_restart.o: constants.o -particle_restart.o: geometry_header.o -particle_restart.o: global.o -particle_restart.o: output.o -particle_restart.o: output_interface.o -particle_restart.o: particle_header.o -particle_restart.o: random_lcg.o -particle_restart.o: tracking.o - -particle_restart_write.o: bank_header.o -particle_restart_write.o: global.o -particle_restart_write.o: output_interface.o -particle_restart_write.o: particle_header.o -particle_restart_write.o: string.o - -physics.o: ace_header.o -physics.o: constants.o -physics.o: endf.o -physics.o: error.o -physics.o: fission.o -physics.o: global.o -physics.o: interpolation.o -physics.o: material_header.o -physics.o: math.o -physics.o: mesh.o -physics.o: output.o -physics.o: particle_header.o -physics.o: particle_restart_write.o -physics.o: random_lcg.o -physics.o: search.o -physics.o: string.o - -plot.o: constants.o -plot.o: error.o -plot.o: geometry.o -plot.o: geometry_header.o -plot.o: global.o -plot.o: output.o -plot.o: particle_header.o -plot.o: plot_header.o -plot.o: ppmlib.o -plot.o: string.o - -plot_header.o: constants.o - -random_lcg.o: global.o - -search.o: error.o -search.o: global.o - -set_header.o: constants.o -set_header.o: list_header.o - -solver_interface.o: error.o -solver_interface.o: global.o -solver_interface.o: matrix_header.o -solver_interface.o: vector_header.o - -source.o: bank_header.o -source.o: constants.o -source.o: error.o -source.o: geometry.o -source.o: geometry_header.o -source.o: global.o -source.o: math.o -source.o: output.o -source.o: particle_header.o -source.o: random_lcg.o -source.o: string.o - -state_point.o: constants.o -state_point.o: error.o -state_point.o: global.o -state_point.o: output.o -state_point.o: output_interface.o -state_point.o: string.o -state_point.o: tally_header.o - -string.o: constants.o -string.o: error.o -string.o: global.o - -tally.o: ace_header.o -tally.o: constants.o -tally.o: error.o -tally.o: global.o -tally.o: math.o -tally.o: mesh.o -tally.o: mesh_header.o -tally.o: output.o -tally.o: particle_header.o -tally.o: physics.o -tally.o: random_lcg.o -tally.o: search.o -tally.o: string.o -tally.o: tally_header.o - -tally_header.o: constants.o - -tally_initialize.o: constants.o -tally_initialize.o: global.o -tally_initialize.o: tally_header.o - -timer_header.o: constants.o - -track_output.o: global.o -track_output.o: output_interface.o -track_output.o: particle_header.o -track_output.o: string.o - -tracking.o: cross_section.o -tracking.o: error.o -tracking.o: geometry.o -tracking.o: geometry_header.o -tracking.o: global.o -tracking.o: output.o -tracking.o: particle_header.o -tracking.o: physics.o -tracking.o: random_lcg.o -tracking.o: string.o -tracking.o: tally.o -tracking.o: track_output.o - -vector_header.o: constants.o - -xml_interface.o: constants.o -xml_interface.o: error.o -xml_interface.o: global.o diff --git a/src/cmfd_loss_operator.F90 b/src/cmfd_loss_operator.F90 index 69be017644..b89f0f5772 100644 --- a/src/cmfd_loss_operator.F90 +++ b/src/cmfd_loss_operator.F90 @@ -396,7 +396,7 @@ contains end subroutine indices_to_matrix !=============================================================================== -! MATRIX_TO_INDICES converts a matrix index to spatial and group indicies +! MATRIX_TO_INDICES converts a matrix index to spatial and group indices !=============================================================================== subroutine matrix_to_indices(irow, g, i, j, k, ng, nx, ny, nz) diff --git a/src/constants.F90 b/src/constants.F90 index 248377a89a..5cb3c84991 100644 --- a/src/constants.F90 +++ b/src/constants.F90 @@ -8,7 +8,7 @@ module constants ! OpenMC major, minor, and release numbers integer, parameter :: VERSION_MAJOR = 0 integer, parameter :: VERSION_MINOR = 5 - integer, parameter :: VERSION_RELEASE = 3 + integer, parameter :: VERSION_RELEASE = 4 ! Revision numbers for binary files integer, parameter :: REVISION_STATEPOINT = 11 diff --git a/src/global.F90 b/src/global.F90 index 9e9096e380..eb2b0bc371 100644 --- a/src/global.F90 +++ b/src/global.F90 @@ -361,7 +361,7 @@ module global logical :: cmfd_tally_on = .true. ! CMFD display info - character(len=25) :: cmfd_display + character(len=25) :: cmfd_display = 'balance' ! Estimate of spectral radius of CMFD matrices and tolerances real(8) :: cmfd_spectral = ZERO diff --git a/src/input_xml.F90 b/src/input_xml.F90 index ea5b82c5b6..b478d9abcb 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -696,7 +696,10 @@ contains call get_node_value(node_sp, "overwrite_latest", temp_str) call lower_case(temp_str) if (trim(temp_str) == 'true' .or. & - trim(temp_str) == '1') source_latest = .true. + trim(temp_str) == '1') then + source_latest = .true. + source_separate = .true. + end if end if else ! If no tag was present, by default we keep source bank in diff --git a/src/output.F90 b/src/output.F90 index 061500734d..ee0a8391c2 100644 --- a/src/output.F90 +++ b/src/output.F90 @@ -55,7 +55,6 @@ contains ' License: http://mit-crpg.github.io/openmc/license.html' write(UNIT=OUTPUT_UNIT, FMT='(6X,"Version:",8X,I1,".",I1,".",I1)') & VERSION_MAJOR, VERSION_MINOR, VERSION_RELEASE -#include "git_sha1.h" #ifdef GIT_SHA1 write(UNIT=OUTPUT_UNIT, FMT='(6X,"Git SHA1:",7X,A)') GIT_SHA1 #endif diff --git a/src/physics.F90 b/src/physics.F90 index 9638b3a35d..7e1d8c8150 100644 --- a/src/physics.F90 +++ b/src/physics.F90 @@ -867,9 +867,9 @@ contains end if ! Bank source neutrons - if (nu == 0 .or. n_bank == 3*work) return + if (nu == 0 .or. n_bank == size(fission_bank)) return p % fission = .true. ! Fission neutrons will be banked - do i = int(n_bank,4) + 1, int(min(n_bank + nu, 3*work),4) + do i = int(n_bank,4) + 1, int(min(n_bank + nu, int(size(fission_bank),8)),4) ! Bank source neutrons by copying particle data fission_bank(i) % xyz = p % coord0 % xyz @@ -894,7 +894,7 @@ contains end do ! increment number of bank sites - n_bank = min(n_bank + nu, 3*work) + n_bank = min(n_bank + nu, int(size(fission_bank),8)) ! Store total weight banked for analog fission tallies p % n_bank = nu @@ -1331,19 +1331,17 @@ contains ! SAMPLE ENERGY DISTRIBUTION IF THERE ARE MULTIPLE if (associated(edist % next)) then - if (edist % p_valid % n_regions > 0) then - p_valid = interpolate_tab1(edist % p_valid, E_in) + p_valid = interpolate_tab1(edist % p_valid, E_in) - if (prn() > p_valid) then - if (edist % law == 44 .or. edist % law == 61) then - call sample_energy(edist%next, E_in, E_out, mu_out) - elseif (edist % law == 66) then - call sample_energy(edist%next, E_in, E_out, A=A, Q=Q) - else - call sample_energy(edist%next, E_in, E_out) - end if - return + if (prn() > p_valid) then + if (edist % law == 44 .or. edist % law == 61) then + call sample_energy(edist%next, E_in, E_out, mu_out) + elseif (edist % law == 66) then + call sample_energy(edist%next, E_in, E_out, A=A, Q=Q) + else + call sample_energy(edist%next, E_in, E_out) end if + return end if end if diff --git a/src/source.F90 b/src/source.F90 index 0efaba26b5..a3b3213bf0 100644 --- a/src/source.F90 +++ b/src/source.F90 @@ -141,6 +141,7 @@ contains end if end if end do + call p % clear() case (SRC_SPACE_FISSION) ! Set particle defaults diff --git a/src/state_point.F90 b/src/state_point.F90 index 4cf62c7c10..6884620e2f 100644 --- a/src/state_point.F90 +++ b/src/state_point.F90 @@ -104,7 +104,7 @@ contains ! Write out CMFD info if (cmfd_on) then call sp % write_data(1, "cmfd_on") - call sp % write_data(cmfd % indices, "indicies", length=4, group="cmfd") + call sp % write_data(cmfd % indices, "indices", length=4, group="cmfd") call sp % write_data(cmfd % k_cmfd, "k_cmfd", length=current_batch, & group="cmfd") call sp % write_data(cmfd % cmfd_src, "cmfd_src", & @@ -230,13 +230,13 @@ contains end do TALLY_METADATA - end if + ! Indicate where source bank is stored in statepoint + if (source_separate) then + call sp % write_data(0, "source_present") + else + call sp % write_data(1, "source_present") + end if - ! Indicate where source bank is stored in statepoint - if (source_separate) then - call sp % write_data(0, "source_present") - else - call sp % write_data(1, "source_present") end if ! Check for the no-tally-reduction method @@ -517,7 +517,6 @@ contains subroutine load_state_point() - character(MAX_FILE_LEN) :: filename character(MAX_FILE_LEN) :: path_temp character(19) :: current_time integer :: i @@ -599,7 +598,7 @@ contains ! Write out CMFD info if (int_array(1) == 1) then - call sp % read_data(cmfd % indices, "indicies", length=4, group="cmfd") + call sp % read_data(cmfd % indices, "indices", length=4, group="cmfd") call sp % read_data(cmfd % k_cmfd, "k_cmfd", length=restart_batch, & group="cmfd") length = cmfd % indices([4,1,2,3]) @@ -790,7 +789,7 @@ contains call sp % file_close() ! Write message - message = "Loading source file " // trim(filename) // "..." + message = "Loading source file " // trim(path_source_point) // "..." call write_message(1) ! Open source file diff --git a/src/utils/statepoint.py b/src/utils/statepoint.py index 47809d4728..9613421e07 100644 --- a/src/utils/statepoint.py +++ b/src/utils/statepoint.py @@ -195,7 +195,7 @@ class StatePoint(object): # Read CMFD information cmfd_present = self._get_int(path='cmfd_on')[0] if cmfd_present == 1: - self.cmfd_indices = self._get_int(4, path='cmfd/indicies') + self.cmfd_indices = self._get_int(4, path='cmfd/indices') self.k_cmfd = self._get_double(self.current_batch, path='cmfd/k_cmfd') self.cmfd_src = self._get_double_array(np.product(self.cmfd_indices), diff --git a/tests/test_natural_element/results_true.dat b/tests/test_natural_element/results_true.dat index 335f10c5ad..9b2e933ab3 100644 --- a/tests/test_natural_element/results_true.dat +++ b/tests/test_natural_element/results_true.dat @@ -1,2 +1,2 @@ k-combined: -1.012443E+00 2.162448E-02 +1.010190E+00 1.740589E-02 diff --git a/tests/test_salphabeta_multiple/results_true.dat b/tests/test_salphabeta_multiple/results_true.dat index bbd61cdb53..3165faa41e 100644 --- a/tests/test_salphabeta_multiple/results_true.dat +++ b/tests/test_salphabeta_multiple/results_true.dat @@ -1,2 +1,2 @@ k-combined: -9.761880E-01 9.170415E-03 +9.701793E-01 8.482149E-03 diff --git a/tests/test_sourcepoint_latest/settings.xml b/tests/test_sourcepoint_latest/settings.xml index 5056db4724..fa7f07dfae 100644 --- a/tests/test_sourcepoint_latest/settings.xml +++ b/tests/test_sourcepoint_latest/settings.xml @@ -1,7 +1,7 @@ - + 10 diff --git a/tests/test_void/results_true.dat b/tests/test_void/results_true.dat index a649385868..e569957b77 100644 --- a/tests/test_void/results_true.dat +++ b/tests/test_void/results_true.dat @@ -1,2 +1,2 @@ k-combined: -1.010313E+00 3.162080E-02 +1.006312E+00 3.000112E-02