mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Explicit type casting from real8s to int4s in many modules.
This commit is contained in:
parent
03f00a2259
commit
d4fc0b7b27
9 changed files with 135 additions and 135 deletions
|
|
@ -464,21 +464,21 @@ contains
|
|||
! =======================================================================
|
||||
! PROMPT AND TOTAL NU DATA -- read prompt data first
|
||||
KNU = JXS2 + 1
|
||||
LNU = XSS(KNU)
|
||||
LNU = int(XSS(KNU))
|
||||
if (LNU == 1) then
|
||||
! Polynomial data
|
||||
nuc % nu_p_type = NU_POLYNOMIAL
|
||||
|
||||
! allocate determine how many coefficients for polynomial
|
||||
NC = XSS(KNU+1)
|
||||
NC = int(XSS(KNU+1))
|
||||
length = NC + 1
|
||||
elseif (LNU == 2) then
|
||||
! Tabular data
|
||||
nuc % nu_p_type = NU_TABULAR
|
||||
|
||||
! determine number of interpolation regions and number of energies
|
||||
NR = XSS(KNU+1)
|
||||
NE = XSS(KNU+2+2*NR)
|
||||
NR = int(XSS(KNU+1))
|
||||
NE = int(XSS(KNU+2+2*NR))
|
||||
length = 2 + 2*NR + 2*NE
|
||||
end if
|
||||
|
||||
|
|
@ -490,8 +490,8 @@ contains
|
|||
nuc % nu_p_data = get_real(length)
|
||||
|
||||
! Now read total nu data
|
||||
KNU = JXS2 + abs(XSS(JXS2)) + 1
|
||||
LNU = XSS(KNU)
|
||||
KNU = JXS2 + int(abs(XSS(JXS2))) + 1
|
||||
LNU = int(XSS(KNU))
|
||||
if (LNU == 1) then
|
||||
! Polynomial data
|
||||
nuc % nu_t_type = NU_POLYNOMIAL
|
||||
|
|
@ -550,7 +550,7 @@ contains
|
|||
! Loop over all delayed neutron precursor groups
|
||||
do i = 1, NPCR
|
||||
! find location of energy distribution data
|
||||
LOCC = XSS(LED + i - 1)
|
||||
LOCC = int(XSS(LED + i - 1))
|
||||
|
||||
! read energy distribution data
|
||||
edist => nuc % nu_d_edist(i)
|
||||
|
|
@ -564,8 +564,8 @@ contains
|
|||
length = 0
|
||||
loc = JXS(25)
|
||||
do i = 1, NPCR
|
||||
NR = XSS(loc + length + 1)
|
||||
NE = XSS(loc + length + 2 + 2*NR)
|
||||
NR = int(XSS(loc + length + 1))
|
||||
NE = int(XSS(loc + length + 2 + 2*NR))
|
||||
length = length + 3 + 2*NR + 2*NE
|
||||
end do
|
||||
|
||||
|
|
@ -640,17 +640,17 @@ contains
|
|||
rxn => nuc % reactions(i+1)
|
||||
|
||||
! read MT number, Q-value, and neutrons produced
|
||||
rxn % MT = XSS(LMT + i - 1)
|
||||
rxn % MT = int(XSS(LMT + i - 1))
|
||||
rxn % Q_value = XSS(JXS4 + i - 1)
|
||||
rxn % TY = XSS(JXS5 + i - 1)
|
||||
rxn % TY = int(XSS(JXS5 + i - 1))
|
||||
|
||||
! read starting energy index
|
||||
LOCA = XSS(LXS + i - 1)
|
||||
IE = XSS(JXS7 + LOCA - 1)
|
||||
LOCA = int(XSS(LXS + i - 1))
|
||||
IE = int(XSS(JXS7 + LOCA - 1))
|
||||
rxn % IE = IE
|
||||
|
||||
! read number of energies cross section values
|
||||
NE = XSS(JXS7 + LOCA)
|
||||
NE = int(XSS(JXS7 + LOCA))
|
||||
allocate(rxn % sigma(NE))
|
||||
XSS_index = JXS7 + LOCA + 1
|
||||
rxn % sigma = get_real(NE)
|
||||
|
|
@ -727,7 +727,7 @@ contains
|
|||
rxn => nuc%reactions(i)
|
||||
|
||||
! find location of angular distribution
|
||||
LOCB = XSS(JXS8 + i - 1)
|
||||
LOCB = int(XSS(JXS8 + i - 1))
|
||||
if (LOCB == -1) then
|
||||
! Angular distribution data are specified through LAWi = 44 in the DLW
|
||||
! block
|
||||
|
|
@ -740,7 +740,7 @@ contains
|
|||
rxn % has_angle_dist = .true.
|
||||
|
||||
! allocate space for incoming energies and locations
|
||||
NE = XSS(JXS9 + LOCB - 1)
|
||||
NE = int(XSS(JXS9 + LOCB - 1))
|
||||
rxn % adist % n_energy = NE
|
||||
allocate(rxn % adist % energy(NE))
|
||||
allocate(rxn % adist % type(NE))
|
||||
|
|
@ -765,7 +765,7 @@ contains
|
|||
elseif (LC < 0) then
|
||||
! tabular distribution
|
||||
rxn % adist % type(j) = ANGLE_TABULAR
|
||||
NP = XSS(JXS9 + abs(LC))
|
||||
NP = int(XSS(JXS9 + abs(LC)))
|
||||
length = length + 2 + 3*NP
|
||||
end if
|
||||
end do
|
||||
|
|
@ -810,7 +810,7 @@ contains
|
|||
rxn % has_energy_dist = .true.
|
||||
|
||||
! find location of energy distribution data
|
||||
LOCC = XSS(LED + i - 1)
|
||||
LOCC = int(XSS(LED + i - 1))
|
||||
|
||||
! allocate energy distribution
|
||||
allocate(rxn % edist)
|
||||
|
|
@ -851,10 +851,10 @@ contains
|
|||
end if
|
||||
|
||||
! locator for next law and information on this law
|
||||
LNW = XSS(LDIS + loc_law - 1)
|
||||
LAW = XSS(LDIS + loc_law)
|
||||
IDAT = XSS(LDIS + loc_law + 1)
|
||||
NR = XSS(LDIS + loc_law + 2)
|
||||
LNW = int(XSS(LDIS + loc_law - 1))
|
||||
LAW = int(XSS(LDIS + loc_law))
|
||||
IDAT = int(XSS(LDIS + loc_law + 1))
|
||||
NR = int(XSS(LDIS + loc_law + 2))
|
||||
edist % law = LAW
|
||||
edist % p_valid % n_regions = NR
|
||||
|
||||
|
|
@ -867,12 +867,12 @@ contains
|
|||
! read ENDF interpolation parameters
|
||||
XSS_index = LDIS + loc_law + 3
|
||||
if (NR > 0) then
|
||||
edist % p_valid % nbt = get_real(NR)
|
||||
edist % p_valid % int = get_real(NR)
|
||||
edist % p_valid % nbt = int(get_real(NR))
|
||||
edist % p_valid % int = int(get_real(NR))
|
||||
end if
|
||||
|
||||
! allocate space for law validity data
|
||||
NE = XSS(LDIS + loc_law + 3 + 2*NR)
|
||||
NE = int(XSS(LDIS + loc_law + 3 + 2*NR))
|
||||
edist % p_valid % n_pairs = NE
|
||||
allocate(edist % p_valid % x(NE))
|
||||
allocate(edist % p_valid % y(NE))
|
||||
|
|
@ -934,9 +934,9 @@ contains
|
|||
select case (law)
|
||||
case (1)
|
||||
! Tabular equiprobable energy bins
|
||||
NR = XSS(loc + 1)
|
||||
NE = XSS(loc + 2 + 2*NR)
|
||||
NP = XSS(loc + 3 + 2*NR + NE)
|
||||
NR = int(XSS(loc + 1))
|
||||
NE = int(XSS(loc + 2 + 2*NR))
|
||||
NP = int(XSS(loc + 3 + 2*NR + NE))
|
||||
length = 3 + 2*NR + NE + 3*NP*NE
|
||||
|
||||
case (2)
|
||||
|
|
@ -949,12 +949,12 @@ contains
|
|||
|
||||
case (4)
|
||||
! Continuous tabular distribution
|
||||
NR = XSS(loc + 1)
|
||||
NE = XSS(loc + 2 + 2*NR)
|
||||
NR = int(XSS(loc + 1))
|
||||
NE = int(XSS(loc + 2 + 2*NR))
|
||||
length = length + 2 + 2*NR + 2*NE
|
||||
do i = 1,NE
|
||||
! determine length
|
||||
NP = XSS(loc + length + 2)
|
||||
NP = int(XSS(loc + length + 2))
|
||||
length = length + 2 + 3*NP
|
||||
|
||||
! adjust location for this block
|
||||
|
|
@ -964,38 +964,38 @@ contains
|
|||
|
||||
case (5)
|
||||
! General evaporation spectrum
|
||||
NR = XSS(loc + 1)
|
||||
NE = XSS(loc + 2 + 2*NR)
|
||||
NP = XSS(loc + 3 + 2*NR + 2*NE)
|
||||
NR = int(XSS(loc + 1))
|
||||
NE = int(XSS(loc + 2 + 2*NR))
|
||||
NP = int(XSS(loc + 3 + 2*NR + 2*NE))
|
||||
length = 3 + 2*NR + 2*NE + NP
|
||||
|
||||
case (7)
|
||||
! Maxwell fission spectrum
|
||||
NR = XSS(loc + 1)
|
||||
NE = XSS(loc + 2 + 2*NR)
|
||||
NR = int(XSS(loc + 1))
|
||||
NE = int(XSS(loc + 2 + 2*NR))
|
||||
length = 3 + 2*NR + 2*NE
|
||||
|
||||
case (9)
|
||||
! Evaporation spectrum
|
||||
NR = XSS(loc + 1)
|
||||
NE = XSS(loc + 2 + 2*NR)
|
||||
NR = int(XSS(loc + 1))
|
||||
NE = int(XSS(loc + 2 + 2*NR))
|
||||
length = 3 + 2*NR + 2*NE
|
||||
|
||||
case (11)
|
||||
! Watt spectrum
|
||||
NRa = XSS(loc + 1)
|
||||
NEa = XSS(loc + 2 + 2*NRa)
|
||||
NRb = XSS(loc + 3 + 2*(NRa+NEa))
|
||||
NEb = XSS(loc + 4 + 2*(NRa+NEa+NRb))
|
||||
NRa = int(XSS(loc + 1))
|
||||
NEa = int(XSS(loc + 2 + 2*NRa))
|
||||
NRb = int(XSS(loc + 3 + 2*(NRa+NEa)))
|
||||
NEb = int(XSS(loc + 4 + 2*(NRa+NEa+NRb)))
|
||||
length = 5 + 2*(NRa + NEa + NRb + NEb)
|
||||
|
||||
case (44)
|
||||
! Kalbach-Mann correlated scattering
|
||||
NR = XSS(loc + 1)
|
||||
NE = XSS(loc + 2 + 2*NR)
|
||||
NR = int(XSS(loc + 1))
|
||||
NE = int(XSS(loc + 2 + 2*NR))
|
||||
length = length + 2 + 2*NR + 2*NE
|
||||
do i = 1,NE
|
||||
NP = XSS(loc + length + 2)
|
||||
NP = int(XSS(loc + length + 2))
|
||||
length = length + 2 + 5*NP
|
||||
|
||||
! adjust location for this block
|
||||
|
|
@ -1005,12 +1005,12 @@ contains
|
|||
|
||||
case (61)
|
||||
! Correlated energy and angle distribution
|
||||
NR = XSS(loc + 1)
|
||||
NE = XSS(loc + 2 + 2*NR)
|
||||
NR = int(XSS(loc + 1))
|
||||
NE = int(XSS(loc + 2 + 2*NR))
|
||||
length = length + 2 + 2*NR + 2*NE
|
||||
do i = 1,NE
|
||||
! outgoing energy distribution
|
||||
NP = XSS(loc + length + 2)
|
||||
NP = int(XSS(loc + length + 2))
|
||||
|
||||
! adjust locators for angular distribution
|
||||
do j = 1, NP
|
||||
|
|
@ -1022,7 +1022,7 @@ contains
|
|||
do j = 1, NP
|
||||
! outgoing angle distribution -- NMU here is actually
|
||||
! referred to as NP in the MCNP documentation
|
||||
NMU = XSS(loc + length + 2)
|
||||
NMU = int(XSS(loc + length + 2))
|
||||
length = length + 2 + 3*NMU
|
||||
end do
|
||||
|
||||
|
|
@ -1037,9 +1037,9 @@ contains
|
|||
|
||||
case (67)
|
||||
! Laboratory energy-angle law
|
||||
NR = XSS(loc + 1)
|
||||
NE = XSS(loc + 2 + 2*NR)
|
||||
NMU = XSS(loc + 4 + 2*NR + 2*NE)
|
||||
NR = int(XSS(loc + 1))
|
||||
NE = int(XSS(loc + 2 + 2*NR))
|
||||
NMU = int(XSS(loc + 4 + 2*NR + 2*NE))
|
||||
length = 4 + 2*(NR + NE + NMU)
|
||||
|
||||
end select
|
||||
|
|
@ -1077,12 +1077,12 @@ contains
|
|||
end if
|
||||
|
||||
! read parameters
|
||||
nuc % urr_data % params(1) = XSS(loc) ! # of incident energies
|
||||
nuc % urr_data % params(2) = XSS(loc + 1) ! # of probabilities
|
||||
nuc % urr_data % params(3) = XSS(loc + 2) ! interpolation parameter
|
||||
nuc % urr_data % params(4) = XSS(loc + 3) ! inelastic competition flag
|
||||
nuc % urr_data % params(5) = XSS(loc + 4) ! other absorption flag
|
||||
nuc % urr_data % params(6) = XSS(loc + 5) ! factors flag
|
||||
nuc % urr_data % params(1) = int(XSS(loc)) ! # of incident energies
|
||||
nuc % urr_data % params(2) = int(XSS(loc + 1)) ! # of probabilities
|
||||
nuc % urr_data % params(3) = int(XSS(loc + 2)) ! interpolation parameter
|
||||
nuc % urr_data % params(4) = int(XSS(loc + 3)) ! inelastic competition flag
|
||||
nuc % urr_data % params(5) = int(XSS(loc + 4)) ! other absorption flag
|
||||
nuc % urr_data % params(6) = int(XSS(loc + 5)) ! factors flag
|
||||
|
||||
! allocate incident energies and probability tables
|
||||
N = nuc % urr_data % params(1)
|
||||
|
|
@ -1130,7 +1130,7 @@ contains
|
|||
table % secondary_mode = NXS(7)
|
||||
|
||||
! read number of inelastic energies and allocate arrays
|
||||
NE_in = XSS(JXS(1))
|
||||
NE_in = int(XSS(JXS(1)))
|
||||
table % n_inelastic_e_in = NE_in
|
||||
allocate(table % inelastic_e_in(NE_in))
|
||||
allocate(table % inelastic_sigma(NE_in))
|
||||
|
|
@ -1172,7 +1172,7 @@ contains
|
|||
! read number of elastic energies and allocate arrays
|
||||
JXS4 = JXS(4)
|
||||
if (JXS4 /= 0) then
|
||||
NE_in = XSS(JXS4)
|
||||
NE_in = int(XSS(JXS4))
|
||||
table % n_elastic_e_in = NE_in
|
||||
allocate(table % elastic_e_in(NE_in))
|
||||
allocate(table % elastic_P(NE_in))
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ module global
|
|||
! ============================================================================
|
||||
! MISCELLANEOUS VARIABLES
|
||||
|
||||
character(MAX_WORD_LEN) :: path_input ! Path to input file
|
||||
character(MAX_FILE_LEN) :: path_input ! Path to input file
|
||||
character(MAX_FILE_LEN) :: path_cross_sections ! Path to cross_sections.xml
|
||||
|
||||
! Message used in message/warning/fatal_error
|
||||
|
|
|
|||
|
|
@ -121,8 +121,8 @@ contains
|
|||
integer :: i ! loop index
|
||||
integer :: argc ! number of command line arguments
|
||||
integer :: last_flag ! index of last flag
|
||||
character(MAX_LINE_LEN) :: pwd ! present working directory
|
||||
character(MAX_WORD_LEN) :: argv(10) ! command line arguments
|
||||
character(MAX_FILE_LEN) :: pwd ! present working directory
|
||||
character(MAX_WORD_LEN) :: argv(10) ! command line arguments
|
||||
|
||||
! Get working directory
|
||||
call GET_ENVIRONMENT_VARIABLE("PWD", pwd)
|
||||
|
|
|
|||
|
|
@ -425,7 +425,7 @@ contains
|
|||
logical :: file_exists
|
||||
character(3) :: default_xs
|
||||
character(MAX_WORD_LEN) :: units
|
||||
character(MAX_WORD_LEN) :: name
|
||||
character(10) :: name
|
||||
character(MAX_LINE_LEN) :: filename
|
||||
type(Material), pointer :: m => null()
|
||||
type(nuclide_xml), pointer :: nuc => null()
|
||||
|
|
@ -712,7 +712,7 @@ contains
|
|||
call split_string(tally_(i) % filters % cell, words, n_words)
|
||||
allocate(t % cell_bins(n_words))
|
||||
do j = 1, n_words
|
||||
t % cell_bins(j) % scalar = str_to_int(words(j))
|
||||
t % cell_bins(j) % scalar = int(str_to_int(words(j)),4)
|
||||
end do
|
||||
t % n_bins(T_CELL) = n_words
|
||||
end if
|
||||
|
|
@ -722,7 +722,7 @@ contains
|
|||
call split_string(tally_(i) % filters % surface, words, n_words)
|
||||
allocate(t % surface_bins(n_words))
|
||||
do j = 1, n_words
|
||||
t % surface_bins(j) % scalar = str_to_int(words(j))
|
||||
t % surface_bins(j) % scalar = int(str_to_int(words(j)),4)
|
||||
end do
|
||||
t % n_bins(T_SURFACE) = n_words
|
||||
end if
|
||||
|
|
@ -732,7 +732,7 @@ contains
|
|||
call split_string(tally_(i) % filters % universe, words, n_words)
|
||||
allocate(t % universe_bins(n_words))
|
||||
do j = 1, n_words
|
||||
t % universe_bins(j) % scalar = str_to_int(words(j))
|
||||
t % universe_bins(j) % scalar = int(str_to_int(words(j)),4)
|
||||
end do
|
||||
t % n_bins(T_UNIVERSE) = n_words
|
||||
end if
|
||||
|
|
@ -742,7 +742,7 @@ contains
|
|||
call split_string(tally_(i) % filters % material, words, n_words)
|
||||
allocate(t % material_bins(n_words))
|
||||
do j = 1, n_words
|
||||
t % material_bins(j) % scalar = str_to_int(words(j))
|
||||
t % material_bins(j) % scalar = int(str_to_int(words(j)),4)
|
||||
end do
|
||||
t % n_bins(T_MATERIAL) = n_words
|
||||
end if
|
||||
|
|
@ -769,7 +769,7 @@ contains
|
|||
call split_string(tally_(i) % filters % cellborn, words, n_words)
|
||||
allocate(t % cellborn_bins(n_words))
|
||||
do j = 1, n_words
|
||||
t % cellborn_bins(j) % scalar = str_to_int(words(j))
|
||||
t % cellborn_bins(j) % scalar = int(str_to_int(words(j)),4)
|
||||
end do
|
||||
t % n_bins(T_CELLBORN) = n_words
|
||||
end if
|
||||
|
|
|
|||
|
|
@ -51,14 +51,14 @@ contains
|
|||
end if
|
||||
|
||||
! determine number of interpolation regions
|
||||
n_regions = data(loc_0 + 1)
|
||||
n_regions = int(data(loc_0 + 1))
|
||||
|
||||
! set locations for breakpoints and interpolation schemes
|
||||
loc_breakpoints = loc_0 + 1
|
||||
loc_interp = loc_breakpoints + n_regions
|
||||
|
||||
! determine number of tabulated values
|
||||
n_points = data(loc_interp + n_regions + 1)
|
||||
n_points = int(data(loc_interp + n_regions + 1))
|
||||
|
||||
! set locations for x's and y's
|
||||
loc_x = loc_interp + n_regions + 1
|
||||
|
|
@ -81,11 +81,11 @@ contains
|
|||
if (n_regions == 0) then
|
||||
interp = LINEAR_LINEAR
|
||||
elseif (n_regions == 1) then
|
||||
interp = data(loc_interp + 1)
|
||||
interp = int(data(loc_interp + 1))
|
||||
elseif (n_regions > 1) then
|
||||
do j = 1, n_regions
|
||||
if (i < data(loc_breakpoints + j)) then
|
||||
interp = data(loc_interp + j)
|
||||
interp = int(data(loc_interp + j))
|
||||
exit
|
||||
end if
|
||||
end do
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ contains
|
|||
|
||||
! ==========================================================================
|
||||
! SAMPLE N_PARTICLES FROM FISSION BANK AND PLACE IN TEMP_SITES
|
||||
do i = 1, n_bank
|
||||
do i = 1, int(n_bank,4)
|
||||
|
||||
! If there are less than n_particles particles banked, automatically add
|
||||
! int(n_particles/total) sites to temp_sites. For example, if you need
|
||||
|
|
@ -221,8 +221,8 @@ contains
|
|||
#endif
|
||||
|
||||
! Determine how many sites to send to adjacent nodes
|
||||
send_to_left = bank_first - 1 - start
|
||||
send_to_right = finish - bank_last
|
||||
send_to_left = int(bank_first - 1_8 - start, 4)
|
||||
send_to_right = int(finish - bank_last, 4)
|
||||
|
||||
if (rank == n_procs - 1) then
|
||||
if (total > n_particles) then
|
||||
|
|
@ -236,7 +236,7 @@ contains
|
|||
! If we have too few sites, grab sites from the very end of the
|
||||
! fission bank
|
||||
sites_needed = n_particles - total
|
||||
do i = 1, sites_needed
|
||||
do i = 1, int(sites_needed,4)
|
||||
count = count + 1
|
||||
temp_sites(count) = fission_bank(n_bank - sites_needed + i)
|
||||
end do
|
||||
|
|
@ -285,27 +285,27 @@ contains
|
|||
! ==========================================================================
|
||||
! RECONSTRUCT SOURCE BANK
|
||||
if (send_to_left < 0 .and. send_to_right >= 0) then
|
||||
i = -send_to_left ! size of first block
|
||||
j = count - send_to_right ! size of second block
|
||||
i = -send_to_left ! size of first block
|
||||
j = int(count,4) - send_to_right ! size of second block
|
||||
call copy_from_bank(temp_sites, i+1, j)
|
||||
#ifdef MPI
|
||||
call MPI_WAIT(request_left, status, ierr)
|
||||
#endif
|
||||
call copy_from_bank(left_bank, 1, i)
|
||||
else if (send_to_left >= 0 .and. send_to_right < 0) then
|
||||
i = count - send_to_left ! size of first block
|
||||
j = -send_to_right ! size of second block
|
||||
i = int(count,4) - send_to_left ! size of first block
|
||||
j = -send_to_right ! size of second block
|
||||
call copy_from_bank(temp_sites(1+send_to_left), 1, i)
|
||||
#ifdef MPI
|
||||
call MPI_WAIT(request_right, status, ierr)
|
||||
#endif
|
||||
call copy_from_bank(right_bank, i+1, j)
|
||||
else if (send_to_left >= 0 .and. send_to_right >= 0) then
|
||||
i = count - send_to_left - send_to_right
|
||||
i = int(count,4) - send_to_left - send_to_right
|
||||
call copy_from_bank(temp_sites(1+send_to_left), 1, i)
|
||||
else if (send_to_left < 0 .and. send_to_right < 0) then
|
||||
i = -send_to_left
|
||||
j = count
|
||||
j = int(count,4)
|
||||
k = -send_to_right
|
||||
call copy_from_bank(temp_sites, i+1, j)
|
||||
#ifdef MPI
|
||||
|
|
|
|||
|
|
@ -763,8 +763,8 @@ contains
|
|||
|
||||
subroutine print_runtime()
|
||||
|
||||
integer :: total_particles
|
||||
real(8) :: speed
|
||||
integer(8) :: total_particles
|
||||
real(8) :: speed
|
||||
|
||||
! display header block
|
||||
call header("Time Elapsed")
|
||||
|
|
|
|||
|
|
@ -793,7 +793,7 @@ contains
|
|||
! data derived in the incoherent approximation
|
||||
|
||||
! Sample outgoing cosine bin
|
||||
k = 1 + prn() * sab % n_elastic_mu
|
||||
k = 1 + int(prn() * sab % n_elastic_mu)
|
||||
|
||||
! Determine outgoing cosine corresponding to E_in(i) and E_in(i+1)
|
||||
mu_ijk = sab % elastic_mu(k,i)
|
||||
|
|
@ -843,12 +843,12 @@ contains
|
|||
|
||||
if (sab % secondary_mode == SAB_SECONDARY_EQUAL) then
|
||||
! All bins equally likely
|
||||
j = 1 + prn() * n_energy_out
|
||||
j = 1 + int(prn() * n_energy_out)
|
||||
elseif (sab % secondary_mode == SAB_SECONDARY_SKEWED) then
|
||||
r = prn() * (n_energy_out - 3)
|
||||
if (r > ONE) then
|
||||
! equally likely N-4 middle bins
|
||||
j = r + 2
|
||||
j = int(r) + 2
|
||||
elseif (r > 0.6) then
|
||||
! second to last bin has relative probability of 0.4
|
||||
j = n_energy_out - 1
|
||||
|
|
@ -875,7 +875,7 @@ contains
|
|||
E = (1 - f)*E_ij + f*E_i1j
|
||||
|
||||
! Sample outgoing cosine bin
|
||||
k = 1 + prn() * sab % n_inelastic_mu
|
||||
k = 1 + int(prn() * sab % n_inelastic_mu)
|
||||
|
||||
! Determine outgoing cosine corresponding to E_in(i) and E_in(i+1)
|
||||
mu_ijk = sab % inelastic_mu(k,j,i)
|
||||
|
|
@ -1072,8 +1072,8 @@ contains
|
|||
end if
|
||||
|
||||
! Bank source neutrons
|
||||
if (nu == 0 .or. n_bank == 3*n_particles) return
|
||||
do i = n_bank + 1, min(n_bank + nu, 3*n_particles)
|
||||
if (nu == 0 .or. n_bank == 3*work) return
|
||||
do i = int(n_bank,4) + 1, int(min(n_bank + nu, 3*work),4)
|
||||
! Bank source neutrons by copying particle data
|
||||
fission_bank(i) % id = p % id
|
||||
fission_bank(i) % xyz = p % xyz
|
||||
|
|
@ -1092,8 +1092,8 @@ contains
|
|||
prob = ZERO
|
||||
do j = 1, nuc % n_precursor
|
||||
! determine number of interpolation regions and energies
|
||||
NR = nuc % nu_d_precursor_data(loc + 1)
|
||||
NE = nuc % nu_d_precursor_data(loc + 2 + 2*NR)
|
||||
NR = int(nuc % nu_d_precursor_data(loc + 1))
|
||||
NE = int(nuc % nu_d_precursor_data(loc + 2 + 2*NR))
|
||||
|
||||
! determine delayed neutron precursor yield for group j
|
||||
yield = interpolate_tab1(nuc % nu_d_precursor_data( &
|
||||
|
|
@ -1149,7 +1149,7 @@ contains
|
|||
end do
|
||||
|
||||
! increment number of bank sites
|
||||
n_bank = min(n_bank + nu, 3*n_particles)
|
||||
n_bank = min(n_bank + nu, 3*work)
|
||||
p % n_bank = nu
|
||||
|
||||
end subroutine create_fission_sites
|
||||
|
|
@ -1302,8 +1302,8 @@ contains
|
|||
mu = mu0 + (32.0_8 * xi - k) * (mu1 - mu0)
|
||||
|
||||
elseif (type == ANGLE_TABULAR) then
|
||||
interp = rxn % adist % data(loc + 1)
|
||||
NP = rxn % adist % data(loc + 2)
|
||||
interp = int(rxn % adist % data(loc + 1))
|
||||
NP = int(rxn % adist % data(loc + 2))
|
||||
|
||||
! determine outgoing cosine bin
|
||||
xi = prn()
|
||||
|
|
@ -1487,9 +1487,9 @@ contains
|
|||
|
||||
! read number of interpolation regions, incoming energies, and outgoing
|
||||
! energies
|
||||
NR = edist % data(1)
|
||||
NE = edist % data(2 + 2*NR)
|
||||
NET = edist % data(3 + 2*NR + NE)
|
||||
NR = int(edist % data(1))
|
||||
NE = int(edist % data(2 + 2*NR))
|
||||
NET = int(edist % data(3 + 2*NR + NE))
|
||||
if (NR > 0) then
|
||||
message = "Multiple interpolation regions not supported while &
|
||||
&attempting to sample equiprobable energy bins."
|
||||
|
|
@ -1555,8 +1555,8 @@ contains
|
|||
! CONTINUOUS TABULAR DISTRIBUTION
|
||||
|
||||
! read number of interpolation regions and incoming energies
|
||||
NR = edist % data(1)
|
||||
NE = edist % data(2 + 2*NR)
|
||||
NR = int(edist % data(1))
|
||||
NE = int(edist % data(2 + 2*NR))
|
||||
if (NR > 0) then
|
||||
message = "Multiple interpolation regions not supported while &
|
||||
&attempting to sample continuous tabular distribution."
|
||||
|
|
@ -1588,13 +1588,13 @@ contains
|
|||
end if
|
||||
|
||||
! interpolation for energy E1 and EK
|
||||
loc = edist%data(2 + 2*NR + NE + i)
|
||||
NP = edist%data(loc + 2)
|
||||
loc = int(edist%data(2 + 2*NR + NE + i))
|
||||
NP = int(edist%data(loc + 2))
|
||||
E_i_1 = edist%data(loc + 2 + 1)
|
||||
E_i_K = edist%data(loc + 2 + NP)
|
||||
|
||||
loc = edist%data(2 + 2*NR + NE + i + 1)
|
||||
NP = edist%data(loc + 2)
|
||||
loc = int(edist%data(2 + 2*NR + NE + i + 1))
|
||||
NP = int(edist%data(loc + 2))
|
||||
E_i1_1 = edist%data(loc + 2 + 1)
|
||||
E_i1_K = edist%data(loc + 2 + NP)
|
||||
|
||||
|
|
@ -1602,11 +1602,11 @@ contains
|
|||
E_K = E_i_K + r*(E_i1_K - E_i_K)
|
||||
|
||||
! determine location of outgoing energies, pdf, cdf for E(l)
|
||||
loc = edist % data(2 + 2*NR + NE + l)
|
||||
loc = int(edist % data(2 + 2*NR + NE + l))
|
||||
|
||||
! determine type of interpolation and number of discrete lines
|
||||
INTTp = edist % data(loc + 1)
|
||||
NP = edist % data(loc + 2)
|
||||
INTTp = int(edist % data(loc + 1))
|
||||
NP = int(edist % data(loc + 2))
|
||||
if (INTTp > 10) then
|
||||
INTT = mod(INTTp,10)
|
||||
ND = (INTTp - INTT)/10
|
||||
|
|
@ -1684,8 +1684,8 @@ contains
|
|||
! EVAPORATION SPECTRUM
|
||||
|
||||
! read number of interpolation regions and incoming energies
|
||||
NR = edist % data(1)
|
||||
NE = edist % data(2 + 2*NR)
|
||||
NR = int(edist % data(1))
|
||||
NE = int(edist % data(2 + 2*NR))
|
||||
|
||||
! determine nuclear temperature from tabulated function
|
||||
T = interpolate_tab1(edist % data, E_in)
|
||||
|
|
@ -1709,8 +1709,8 @@ contains
|
|||
|
||||
! read number of interpolation regions and incoming energies for
|
||||
! parameter 'a'
|
||||
NR = edist % data(1)
|
||||
NE = edist % data(2 + 2*NR)
|
||||
NR = int(edist % data(1))
|
||||
NE = int(edist % data(2 + 2*NR))
|
||||
|
||||
! determine Watt parameter 'a' from tabulated function
|
||||
Watt_a = interpolate_tab1(edist % data, E_in)
|
||||
|
|
@ -1734,8 +1734,8 @@ contains
|
|||
end if
|
||||
|
||||
! read number of interpolation regions and incoming energies
|
||||
NR = edist % data(1)
|
||||
NE = edist % data(2 + 2*NR)
|
||||
NR = int(edist % data(1))
|
||||
NE = int(edist % data(2 + 2*NR))
|
||||
if (NR > 0) then
|
||||
message = "Multiple interpolation regions not supported while &
|
||||
&attempting to sample Kalbach-Mann distribution."
|
||||
|
|
@ -1767,14 +1767,14 @@ contains
|
|||
end if
|
||||
|
||||
! determine endpoints on grid i
|
||||
loc = edist%data(2+2*NR+NE + i) ! start of LDAT for i
|
||||
NP = edist%data(loc + 2)
|
||||
loc = int(edist%data(2+2*NR+NE + i)) ! start of LDAT for i
|
||||
NP = int(edist%data(loc + 2))
|
||||
E_i_1 = edist%data(loc + 2 + 1)
|
||||
E_i_K = edist%data(loc + 2 + NP)
|
||||
|
||||
! determine endpoints on grid i+1
|
||||
loc = edist%data(2+2*NR+NE + i+1) ! start of LDAT for i+1
|
||||
NP = edist%data(loc + 2)
|
||||
loc = int(edist%data(2+2*NR+NE + i+1)) ! start of LDAT for i+1
|
||||
NP = int(edist%data(loc + 2))
|
||||
E_i1_1 = edist%data(loc + 2 + 1)
|
||||
E_i1_K = edist%data(loc + 2 + NP)
|
||||
|
||||
|
|
@ -1782,11 +1782,11 @@ contains
|
|||
E_K = E_i_K + r*(E_i1_K - E_i_K)
|
||||
|
||||
! determine location of outgoing energies, pdf, cdf for E(l)
|
||||
loc = edist % data(2 + 2*NR + NE + l)
|
||||
loc = int(edist % data(2 + 2*NR + NE + l))
|
||||
|
||||
! determine type of interpolation and number of discrete lines
|
||||
INTTp = edist % data(loc + 1)
|
||||
NP = edist % data(loc + 2)
|
||||
INTTp = int(edist % data(loc + 1))
|
||||
NP = int(edist % data(loc + 2))
|
||||
if (INTTp > 10) then
|
||||
INTT = mod(INTTp,10)
|
||||
ND = (INTTp - INTT)/10
|
||||
|
|
@ -1877,8 +1877,8 @@ contains
|
|||
end if
|
||||
|
||||
! read number of interpolation regions and incoming energies
|
||||
NR = edist % data(1)
|
||||
NE = edist % data(2 + 2*NR)
|
||||
NR = int(edist % data(1))
|
||||
NE = int(edist % data(2 + 2*NR))
|
||||
if (NR > 0) then
|
||||
message = "Multiple interpolation regions not supported while &
|
||||
&attempting to sample correlated energy-angle distribution."
|
||||
|
|
@ -1910,14 +1910,14 @@ contains
|
|||
end if
|
||||
|
||||
! determine endpoints on grid i
|
||||
loc = edist%data(2+2*NR+NE + i) ! start of LDAT for i
|
||||
NP = edist%data(loc + 2)
|
||||
loc = int(edist%data(2+2*NR+NE + i)) ! start of LDAT for i
|
||||
NP = int(edist%data(loc + 2))
|
||||
E_i_1 = edist%data(loc + 2 + 1)
|
||||
E_i_K = edist%data(loc + 2 + NP)
|
||||
|
||||
! determine endpoints on grid i+1
|
||||
loc = edist%data(2+2*NR+NE + i+1) ! start of LDAT for i+1
|
||||
NP = edist%data(loc + 2)
|
||||
loc = int(edist%data(2+2*NR+NE + i+1)) ! start of LDAT for i+1
|
||||
NP = int(edist%data(loc + 2))
|
||||
E_i1_1 = edist%data(loc + 2 + 1)
|
||||
E_i1_K = edist%data(loc + 2 + NP)
|
||||
|
||||
|
|
@ -1925,11 +1925,11 @@ contains
|
|||
E_K = E_i_K + r*(E_i1_K - E_i_K)
|
||||
|
||||
! determine location of outgoing energies, pdf, cdf for E(l)
|
||||
loc = edist % data(2 + 2*NR + NE + l)
|
||||
loc = int(edist % data(2 + 2*NR + NE + l))
|
||||
|
||||
! determine type of interpolation and number of discrete lines
|
||||
INTTp = edist % data(loc + 1)
|
||||
NP = edist % data(loc + 2)
|
||||
INTTp = int(edist % data(loc + 1))
|
||||
NP = int(edist % data(loc + 2))
|
||||
if (INTTp > 10) then
|
||||
INTT = mod(INTTp,10)
|
||||
ND = (INTTp - INTT)/10
|
||||
|
|
@ -1988,7 +1988,7 @@ contains
|
|||
end if
|
||||
|
||||
! Find location of correlated angular distribution
|
||||
loc = edist % data(loc+3*NP+k)
|
||||
loc = int(edist % data(loc+3*NP+k))
|
||||
|
||||
! Check if angular distribution is isotropic
|
||||
if (loc == 0) then
|
||||
|
|
@ -1997,8 +1997,8 @@ contains
|
|||
end if
|
||||
|
||||
! interpolation type and number of points in angular distribution
|
||||
JJ = edist % data(loc + 1)
|
||||
NP = edist % data(loc + 2)
|
||||
JJ = int(edist % data(loc + 1))
|
||||
NP = int(edist % data(loc + 2))
|
||||
|
||||
! determine outgoing cosine bin
|
||||
r3 = prn()
|
||||
|
|
@ -2038,7 +2038,7 @@ contains
|
|||
! N-BODY PHASE SPACE DISTRIBUTION
|
||||
|
||||
! read number of bodies in phase space and total mass ratio
|
||||
n_bodies = edist % data(1)
|
||||
n_bodies = int(edist % data(1))
|
||||
Ap = edist % data(2)
|
||||
|
||||
! determine E_max parameter
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<!-- Type for specifying a nuclide -->
|
||||
|
||||
<typedef name="nuclide_xml">
|
||||
<component name="name" type="word" length="10" default="''" />
|
||||
<component name="name" type="word" length="6" default="''" />
|
||||
<component name="xs" type="word" length="3" default="''" />
|
||||
<component name="ao" type="double" default="0.0" />
|
||||
<component name="wo" type="double" default="0.0" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue