mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Fixed formatting issues
This commit is contained in:
parent
2262045e63
commit
4561edfac7
6 changed files with 59 additions and 58 deletions
|
|
@ -1963,8 +1963,8 @@ contains
|
|||
|
||||
! Check to ensure material has at least one nuclide
|
||||
if ((.not. check_for_node(node_mat, "nuclide") .and. &
|
||||
.not. check_for_node(node_mat, "element")) .and. &
|
||||
(.not. check_for_node(node_mat, "macroscopic"))) then
|
||||
.not. check_for_node(node_mat, "element")) .and. &
|
||||
(.not. check_for_node(node_mat, "macroscopic"))) then
|
||||
call fatal_error("No macroscopic data, nuclides or natural elements &
|
||||
&specified on material " // trim(to_str(mat % id)))
|
||||
end if
|
||||
|
|
@ -2001,7 +2001,7 @@ contains
|
|||
! store full name
|
||||
call get_node_value(node_nuc, "name", temp_str)
|
||||
if (check_for_node(node_nuc, "xs")) &
|
||||
call get_node_value(node_nuc, "xs", name)
|
||||
call get_node_value(node_nuc, "xs", name)
|
||||
name = trim(temp_str) // "." // trim(name)
|
||||
name = to_lower(name)
|
||||
|
||||
|
|
@ -2014,7 +2014,7 @@ contains
|
|||
call list_density % append(ONE)
|
||||
else
|
||||
call fatal_error("Units can only be macro for macroscopic data " &
|
||||
&// trim(name))
|
||||
&// trim(name))
|
||||
end if
|
||||
else
|
||||
|
||||
|
|
@ -2045,7 +2045,7 @@ contains
|
|||
! store full name
|
||||
call get_node_value(node_nuc, "name", temp_str)
|
||||
if (check_for_node(node_nuc, "xs")) &
|
||||
call get_node_value(node_nuc, "xs", name)
|
||||
call get_node_value(node_nuc, "xs", name)
|
||||
name = trim(temp_str) // "." // trim(name)
|
||||
name = to_lower(name)
|
||||
|
||||
|
|
@ -2058,7 +2058,7 @@ contains
|
|||
call list_density % append(ONE)
|
||||
else
|
||||
if (.not.check_for_node(node_nuc, "ao") .and. &
|
||||
.not.check_for_node(node_nuc, "wo")) then
|
||||
.not.check_for_node(node_nuc, "wo")) then
|
||||
call fatal_error("No atom or weight percent specified for nuclide " &
|
||||
&// trim(name))
|
||||
elseif (check_for_node(node_nuc, "ao") .and. &
|
||||
|
|
@ -2572,7 +2572,7 @@ contains
|
|||
! If in MG mode, fail if user provides bins, as we are only
|
||||
! allowing for all groups
|
||||
if (.not. run_CE .and. (temp_str == 'energy' .or. &
|
||||
temp_str == 'energyout')) then
|
||||
temp_str == 'energyout')) then
|
||||
call fatal_error("No energy or energyout bins needed on tally " &
|
||||
&// trim(to_str(t % id)))
|
||||
else
|
||||
|
|
@ -4360,9 +4360,9 @@ contains
|
|||
! Check if cross_sections.xml exists
|
||||
inquire(FILE=path_cross_sections, EXIST=file_exists)
|
||||
if (.not. file_exists) then
|
||||
! Could not find cross_sections.xml file
|
||||
call fatal_error("Cross sections XML file '" &
|
||||
&// trim(path_cross_sections) // "' does not exist!")
|
||||
! Could not find cross_sections.xml file
|
||||
call fatal_error("Cross sections XML file '" &
|
||||
&// trim(path_cross_sections) // "' does not exist!")
|
||||
end if
|
||||
|
||||
call write_message("Reading cross sections XML file...", 5)
|
||||
|
|
@ -4371,18 +4371,18 @@ contains
|
|||
call open_xmldoc(doc, path_cross_sections)
|
||||
|
||||
if (check_for_node(doc, "groups")) then
|
||||
! Get neutron group count
|
||||
call get_node_value(doc, "groups", energy_groups)
|
||||
! Get neutron group count
|
||||
call get_node_value(doc, "groups", energy_groups)
|
||||
else
|
||||
call fatal_error("groups element must exist!")
|
||||
call fatal_error("groups element must exist!")
|
||||
end if
|
||||
|
||||
allocate(energy_bins(energy_groups + 1))
|
||||
if (check_for_node(doc, "group_structure")) then
|
||||
! Get neutron group structure
|
||||
call get_node_array(doc, "group_structure", energy_bins)
|
||||
! Get neutron group structure
|
||||
call get_node_array(doc, "group_structure", energy_bins)
|
||||
else
|
||||
call fatal_error("group_structures element must exist!")
|
||||
call fatal_error("group_structures element must exist!")
|
||||
end if
|
||||
|
||||
allocate(energy_bin_avg(energy_groups))
|
||||
|
|
@ -4396,10 +4396,10 @@ contains
|
|||
|
||||
! Allocate xs_listings array
|
||||
if (n_listings == 0) then
|
||||
call fatal_error("No XSDATA listings present in cross_sections.xml &
|
||||
&file!")
|
||||
call fatal_error("No XSDATA listings present in cross_sections.xml &
|
||||
&file!")
|
||||
else
|
||||
allocate(xs_listings(n_listings))
|
||||
allocate(xs_listings(n_listings))
|
||||
end if
|
||||
|
||||
do i = 1, n_listings
|
||||
|
|
@ -4413,7 +4413,7 @@ contains
|
|||
listing % name = to_lower(listing % name)
|
||||
listing % alias = listing % name
|
||||
if (check_for_node(node_xsdata, "alias")) &
|
||||
call get_node_value(node_xsdata, "alias", listing % alias)
|
||||
call get_node_value(node_xsdata, "alias", listing % alias)
|
||||
listing % alias = to_lower(listing % alias)
|
||||
if (check_for_node(node_xsdata, "zaid")) then
|
||||
call get_node_value(node_xsdata, "zaid", listing % zaid)
|
||||
|
|
@ -4421,7 +4421,7 @@ contains
|
|||
listing % zaid = 100
|
||||
end if
|
||||
if (check_for_node(node_xsdata, "kT")) &
|
||||
call get_node_value(node_xsdata, "kT", listing % kT)
|
||||
call get_node_value(node_xsdata, "kT", listing % kT)
|
||||
if (check_for_node(node_xsdata, "awr")) then
|
||||
call get_node_value(node_xsdata, "awr", listing % awr)
|
||||
else
|
||||
|
|
@ -4430,12 +4430,12 @@ contains
|
|||
|
||||
! determine type of cross section
|
||||
if (ends_with(listing % name, 'c')) then
|
||||
listing % type = NEUTRON
|
||||
listing % type = NEUTRON
|
||||
end if
|
||||
|
||||
! create dictionary entry for both name and alias
|
||||
call xs_listing_dict % add_key(to_lower(listing % name), i)
|
||||
call xs_listing_dict % add_key(to_lower(listing % alias), i)
|
||||
! create dictionary entry for both name and alias
|
||||
call xs_listing_dict % add_key(to_lower(listing % name), i)
|
||||
call xs_listing_dict % add_key(to_lower(listing % alias), i)
|
||||
end do
|
||||
|
||||
! Close cross sections XML file
|
||||
|
|
|
|||
|
|
@ -249,16 +249,16 @@ contains
|
|||
do gin = 1, groups
|
||||
do gout = 1, groups
|
||||
this % chi(gout,gin) = this % chi(gout,gin) + atom_density * &
|
||||
nuc % chi(gout) * nuc % nu_fission(gin,1)
|
||||
nuc % chi(gout) * nuc % nu_fission(gin,1)
|
||||
end do
|
||||
end do
|
||||
this % nu_fission = this % nu_fission + atom_density * &
|
||||
nuc % nu_fission(:,1)
|
||||
nuc % nu_fission(:,1)
|
||||
else
|
||||
this % chi = this % chi + atom_density * nuc % nu_fission
|
||||
do gin = 1, groups
|
||||
this % nu_fission(gin) = this % nu_fission(gin) + atom_density * &
|
||||
sum(nuc % nu_fission(:,gin))
|
||||
sum(nuc % nu_fission(:,gin))
|
||||
end do
|
||||
end if
|
||||
this % fission = this % fission + atom_density * nuc % fission
|
||||
|
|
@ -273,33 +273,33 @@ contains
|
|||
if (scatt_type == ANGLE_HISTOGRAM .or. scatt_type == ANGLE_TABULAR) then
|
||||
! Transfer matrix
|
||||
temp_energy(gout,gin) = temp_energy(gout,gin) + atom_density * &
|
||||
sum(nuc % scatter(gout,gin,:))
|
||||
sum(nuc % scatter(gout,gin,:))
|
||||
|
||||
! Determine the angular distribution
|
||||
do imu = 1, order
|
||||
scatt_coeffs(imu, gout, gin) = scatt_coeffs(imu, gout, gin) + &
|
||||
nuc % scatter(gout,gin,imu) * &
|
||||
atom_density
|
||||
nuc % scatter(gout,gin,imu) * &
|
||||
atom_density
|
||||
end do
|
||||
|
||||
else if (scatt_type == ANGLE_LEGENDRE) then
|
||||
! Transfer matrix
|
||||
temp_energy(gout,gin) = temp_energy(gout,gin) + atom_density * &
|
||||
nuc % scatter(gout,gin,1)
|
||||
nuc % scatter(gout,gin,1)
|
||||
|
||||
! Determine the angular distribution coefficients so we can later
|
||||
! expand do the complete distribution
|
||||
do l = 1, min(nuc % order, order) + 1
|
||||
scatt_coeffs(l, gout, gin) = scatt_coeffs(l, gout, gin) + &
|
||||
nuc % scatter(gout,gin,l) * &
|
||||
atom_density
|
||||
nuc % scatter(gout,gin,l) * &
|
||||
atom_density
|
||||
end do
|
||||
|
||||
end if
|
||||
|
||||
! Multiplicity matrix
|
||||
temp_mult(gout,gin) = temp_mult(gout,gin) + atom_density * &
|
||||
nuc % mult(gout,gin)
|
||||
nuc % mult(gout,gin)
|
||||
end do
|
||||
end do
|
||||
type is (Nuclide_Angle)
|
||||
|
|
@ -530,16 +530,16 @@ contains
|
|||
do gin = 1, groups
|
||||
do gout = 1, groups
|
||||
this % chi(gout,gin,:,:) = this % chi(gout,gin,:,:) + atom_density * &
|
||||
nuc % chi(gout,:,:) * nuc % nu_fission(gin,1,:,:)
|
||||
nuc % chi(gout,:,:) * nuc % nu_fission(gin,1,:,:)
|
||||
end do
|
||||
end do
|
||||
this % nu_fission = this % nu_fission + atom_density * &
|
||||
nuc % nu_fission(:,1,:,:)
|
||||
nuc % nu_fission(:,1,:,:)
|
||||
else
|
||||
this % chi = this % chi + atom_density * nuc % nu_fission
|
||||
do gin = 1, groups
|
||||
this % nu_fission(gin,:,:) = this % nu_fission(gin,:,:) + atom_density * &
|
||||
sum(nuc % nu_fission(:,gin,:,:),dim=1)
|
||||
sum(nuc % nu_fission(:,gin,:,:),dim=1)
|
||||
end do
|
||||
end if
|
||||
this % fission = this % fission + atom_density * nuc % fission
|
||||
|
|
@ -554,31 +554,31 @@ contains
|
|||
if (scatt_type == ANGLE_HISTOGRAM .or. scatt_type == ANGLE_TABULAR) then
|
||||
! Transfer matrix
|
||||
temp_energy(gout,gin,:,:) = temp_energy(gout,gin,:,:) + atom_density * &
|
||||
sum(nuc % scatter(gout,gin,:,:,:),dim=1)
|
||||
sum(nuc % scatter(gout,gin,:,:,:),dim=1)
|
||||
|
||||
! Determine the angular distribution
|
||||
do imu = 1, order
|
||||
scatt_coeffs(imu,gout,gin,:,:) = scatt_coeffs(imu,gout,gin,:,:) + &
|
||||
nuc % scatter(gout,gin,imu,:,:) * &
|
||||
atom_density
|
||||
nuc % scatter(gout,gin,imu,:,:) * &
|
||||
atom_density
|
||||
end do
|
||||
else if (scatt_type == ANGLE_LEGENDRE) then
|
||||
! Transfer matrix
|
||||
temp_energy(gout,gin,:,:) = temp_energy(gout,gin,:,:) + atom_density * &
|
||||
nuc % scatter(gout,gin,1,:,:)
|
||||
nuc % scatter(gout,gin,1,:,:)
|
||||
|
||||
! Determine the angular distribution coefficients so we can later
|
||||
! expand do the complete distribution
|
||||
do l = 1, min(nuc % order, order) + 1
|
||||
scatt_coeffs(l, gout, gin,:,:) = scatt_coeffs(l, gout, gin,:,:) + &
|
||||
nuc % scatter(gout,gin,l,:,:) * &
|
||||
atom_density
|
||||
nuc % scatter(gout,gin,l,:,:) * &
|
||||
atom_density
|
||||
end do
|
||||
end if
|
||||
|
||||
! Multiplicity matrix
|
||||
temp_mult(gout,gin,:,:) = temp_mult(gout,gin,:,:) + atom_density * &
|
||||
nuc % mult(gout,gin,:,:)
|
||||
nuc % mult(gout,gin,:,:)
|
||||
end do
|
||||
end do
|
||||
end select
|
||||
|
|
|
|||
10
src/mesh.F90
10
src/mesh.F90
|
|
@ -163,12 +163,12 @@ contains
|
|||
sites_outside)
|
||||
|
||||
type(RegularMesh), pointer :: m ! mesh to count sites
|
||||
type(Bank), intent(in) :: bank_array(:) ! fission or source bank
|
||||
real(8), intent(out) :: cnt(:,:,:,:) ! weight of sites in each
|
||||
type(Bank), intent(in) :: bank_array(:) ! fission or source bank
|
||||
real(8), intent(out) :: cnt(:,:,:,:) ! weight of sites in each
|
||||
! cell and energy group
|
||||
real(8), optional :: energies(:) ! energy grid to search
|
||||
integer(8), optional :: size_bank ! # of bank sites (on each proc)
|
||||
logical, optional :: sites_outside ! were there sites outside mesh?
|
||||
real(8), optional :: energies(:) ! energy grid to search
|
||||
integer(8), optional :: size_bank ! # of bank sites (on each proc)
|
||||
logical, optional :: sites_outside ! were there sites outside mesh?
|
||||
|
||||
integer :: i ! loop index for local fission sites
|
||||
integer :: n_sites ! size of bank array
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ contains
|
|||
! Check if cross_sections.xml exists
|
||||
inquire(FILE=path_cross_sections, EXIST=file_exists)
|
||||
if (.not. file_exists) then
|
||||
! Could not find cross_sections.xml file
|
||||
call fatal_error("Cross sections XML file '" &
|
||||
&// trim(path_cross_sections) // "' does not exist!")
|
||||
! Could not find cross_sections.xml file
|
||||
call fatal_error("Cross sections XML file '" &
|
||||
&// trim(path_cross_sections) // "' does not exist!")
|
||||
end if
|
||||
|
||||
call write_message("Loading Cross Section Data...", 5)
|
||||
|
|
@ -73,7 +73,7 @@ contains
|
|||
end if
|
||||
end do
|
||||
if (get_kfiss) &
|
||||
exit
|
||||
exit
|
||||
end do
|
||||
|
||||
! ==========================================================================
|
||||
|
|
@ -265,7 +265,7 @@ contains
|
|||
this % legendre_mu_points = 33
|
||||
end if
|
||||
if (enable_leg_mu .and. &
|
||||
check_for_node(node_legendre_mu, "num_points")) then
|
||||
check_for_node(node_legendre_mu, "num_points")) then
|
||||
call get_node_value(node_legendre_mu, "num_points", &
|
||||
this % legendre_mu_points)
|
||||
if (this % legendre_mu_points <= 0) then
|
||||
|
|
@ -644,7 +644,7 @@ contains
|
|||
end if
|
||||
end do
|
||||
if (get_kfiss) &
|
||||
exit
|
||||
exit
|
||||
end do
|
||||
|
||||
allocate(macro_xs(n_materials))
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ module nuclide_header
|
|||
if (allocated(this % k_fission)) then
|
||||
deallocate(this % k_fission)
|
||||
end if
|
||||
if (allocated(this % chi)) then
|
||||
if (allocated(this % chi)) then
|
||||
deallocate(this % chi)
|
||||
end if
|
||||
if (allocated(this % mult)) then
|
||||
|
|
@ -400,7 +400,7 @@ module nuclide_header
|
|||
if (allocated(this % k_fission)) then
|
||||
deallocate(this % k_fission)
|
||||
end if
|
||||
if (allocated(this % chi)) then
|
||||
if (allocated(this % chi)) then
|
||||
deallocate(this % chi)
|
||||
end if
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ contains
|
|||
! Store pre-collision particle properties
|
||||
p % last_wgt = p % wgt
|
||||
p % last_g = p % g
|
||||
p % last_E = p % E
|
||||
p % last_uvw = p % coord(1) % uvw
|
||||
|
||||
! Add to collision counter for particle
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue