From a7fb70d08b022ccaa04f16f1ebb2cd04a1dba890 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 19 Sep 2011 08:43:19 -0400 Subject: [PATCH] Removed material_total_xs subroutine in cross_section module. --- src/cross_section.f90 | 70 ------------------------------------------- src/initialize.f90 | 5 +--- 2 files changed, 1 insertion(+), 74 deletions(-) diff --git a/src/cross_section.f90 b/src/cross_section.f90 index f336234f7a..70733d5a06 100644 --- a/src/cross_section.f90 +++ b/src/cross_section.f90 @@ -1377,74 +1377,4 @@ contains end subroutine read_xsdata -!=============================================================================== -! MATERIAL_TOTAL_XS calculates the total macroscopic cross section of each -! material for use in sampling path lengths -!=============================================================================== - - subroutine material_total_xs() - - type(Material), pointer :: mat => null() - type(Nuclide), pointer :: nuc => null() - integer :: i, j, k - integer :: index - integer :: IE - real(8) :: density_i - real(8) :: val - real(8) :: r - real(8) :: E_i - real(8) :: E_i1 - real(8) :: sigma_i - real(8) :: sigma_i1 - character(MAX_LINE_LEN) :: msg - - msg = "Creating material total cross-sections..." - call message(msg, 4) - - ! loop over all materials - do i = 1, n_materials - - ! allocate storage for total xs - mat => materials(i) - allocate(mat%total_xs(n_grid)) - - ! initialize total cross-section - mat % total_xs = ZERO - - ! loop over each isotope - do j = 1, mat % n_nuclides - index = mat % nuclide(j) - nuc => nuclides(index) - - ! find atom density of isotope - density_i = mat % atom_density(j) - - ! loop over points in union energy grid - do k = 1, n_grid - ! find nuclide grid index - IE = nuc % grid_index(k) - - ! get nuclide grid energy and cross-section value - E_i = nuc % energy(IE) - sigma_i = nuc % total(IE) - - ! interpolate as necessary - if (E_i < e_grid(k)) then - E_i1 = nuc % energy(IE + 1) - sigma_i1 = nuc % total(IE + 1) - - r = (e_grid(k) - E_i)/(E_i1 - E_i) - val = (ONE - r)*sigma_i + r*sigma_i1 - else - val = sigma_i - end if - - ! add contribution to total cross-section - mat%total_xs(k) = mat%total_xs(k) + density_i * val - end do - end do - end do - - end subroutine material_total_xs - end module cross_section diff --git a/src/initialize.f90 b/src/initialize.f90 index 6ac69f69bc..fc4f55573d 100644 --- a/src/initialize.f90 +++ b/src/initialize.f90 @@ -1,7 +1,7 @@ module initialize use constants - use cross_section, only: read_xs, read_xsdata, material_total_xs + use cross_section, only: read_xs, read_xsdata use datatypes, only: dict_create, dict_add_key, dict_get_key, & dict_has_key, DICT_NULL, dict_keys use datatypes_header, only: ListKeyValueII, DictionaryII @@ -92,9 +92,6 @@ contains call unionized_grid() call original_indices() - ! calculate total material cross-sections for sampling path lenghts - call material_total_xs() - ! create source particles call initialize_source()