diff --git a/src/constants.F90 b/src/constants.F90 index fa73e8625..017fcf009 100644 --- a/src/constants.F90 +++ b/src/constants.F90 @@ -260,9 +260,9 @@ module constants SCORE_NU_SCATTER = -4, & ! scattering production rate SCORE_SCATTER_N = -5, & ! arbitrary scattering moment SCORE_SCATTER_PN = -6, & ! system for scoring 0th through nth moment - SCORE_TRANSPORT = -7, & ! transport reaction rate - SCORE_DIFFUSION = -8, & ! diffusion coefficient - SCORE_N_1N = -9, & ! (n,1n) rate + SCORE_TRANSPORT = -7, & ! transport reaction rate + SCORE_DIFFUSION = -8, & ! diffusion coefficient + SCORE_N_1N = -9, & ! (n,1n) rate SCORE_N_2N = -10, & ! (n,2n) rate SCORE_N_3N = -11, & ! (n,3n) rate SCORE_N_4N = -12, & ! (n,4n) rate diff --git a/src/input_xml.F90 b/src/input_xml.F90 index b833e124c..a96fa9637 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -1902,7 +1902,8 @@ contains call fatal_error() end select end do - t % n_score_bins = n_words + t % n_score_bins = n_scores + t % n_nonPN_score_bins = n_words else message = "No specified on tally " // trim(to_str(t % id)) & // "." diff --git a/src/state_point.F90 b/src/state_point.F90 index e32833476..a40f3c8ff 100644 --- a/src/state_point.F90 +++ b/src/state_point.F90 @@ -244,9 +244,12 @@ contains end if end do NUCLIDE_LOOP - ! Write number of score bins + ! Write number of score bins, score bins, and scatt order write(UNIT_STATE) t % n_score_bins write(UNIT_STATE) t % score_bins + write(UNIT_STATE) t % scatt_order + ! Write number of nonPN score bins + write(UNIT_STATE) t % n_nonPN_score_bins end do TALLY_METADATA ! Number of realizations for global tallies @@ -442,11 +445,16 @@ contains end if end do NUCLIDE_LOOP - ! Write number of score bins + ! Write number of score bins, score bins, and scatt order call MPI_FILE_WRITE(fh, t % n_score_bins, 1, MPI_INTEGER, & MPI_STATUS_IGNORE, mpi_err) call MPI_FILE_WRITE(fh, t % score_bins, t % n_score_bins, & MPI_INTEGER, MPI_STATUS_IGNORE, mpi_err) + call MPI_FILE_WRITE(fh, t % scatt_order, t % n_score_bins, & + MPI_INTEGER, MPI_STATUS_IGNORE, mpi_err) + ! Write number of nonPN score bins + call MPI_FILE_WRITE(fh, t % n_nonPN_score_bins, 1, MPI_INTEGER, & + MPI_STATUS_IGNORE, mpi_err) end do TALLY_METADATA end subroutine write_state_point_header @@ -740,11 +748,19 @@ contains call MPI_FILE_READ(fh, temp, 1, MPI_INTEGER, & MPI_STATUS_IGNORE, mpi_err) - ! Read nuclide bins + ! Read score bins and scatt_order allocate(int_array(temp(1))) + call MPI_FILE_READ(fh, int_array, temp(1), MPI_INTEGER, & + MPI_STATUS_IGNORE, mpi_err) call MPI_FILE_READ(fh, int_array, temp(1), MPI_INTEGER, & MPI_STATUS_IGNORE, mpi_err) deallocate(int_array) + call MPI_FILE_READ(fh, temp, 1, MPI_INTEGER, & + MPI_STATUS_IGNORE, mpi_err) + + ! Read number of nonPN score bins + call MPI_FILE_READ(fh, temp, 1, MPI_INTEGER, & + MPI_STATUS_IGNORE, mpi_err) end do TALLY_METADATA ! Read number of realizations for global tallies @@ -930,10 +946,14 @@ contains ! Read number of results read(UNIT_STATE) temp(1) - ! Read nuclide bins + ! Read results bins and scatt_order allocate(int_array(temp(1))) read(UNIT_STATE) int_array + read(UNIT_STATE) int_array deallocate(int_array) + + ! Read number of nonPN bins + read(UNIT_STATE) temp(1) end do TALLY_METADATA ! Read number of realizations for global tallies @@ -965,7 +985,7 @@ contains end do TALLY_RESULTS end if end if - + ! Read source bank for eigenvalue run if (mode == MODE_EIGENVALUE .and. run_mode /= MODE_TALLIES) then read(UNIT_STATE) source_bank