Added support for the arbitrary PN in the state points.

This commit is contained in:
Adam Nelson 2012-12-05 12:23:34 -05:00
parent eb7cc7d895
commit 406aad6a86
3 changed files with 30 additions and 9 deletions

View file

@ -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

View file

@ -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 <scores> specified on tally " // trim(to_str(t % id)) &
// "."

View file

@ -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