From 7c3c8ee0f93fa69e9df5fee06380e2830171b7c4 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Thu, 27 Oct 2011 12:09:21 -0400 Subject: [PATCH] Fixed reading of elastic cross sections on S(a,b) tables and added attributes for thresholds. --- src/cross_section.f90 | 14 +++++++++++++- src/cross_section_header.f90 | 6 +++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/cross_section.f90 b/src/cross_section.f90 index 02bd7626fa..fb0863e9e6 100644 --- a/src/cross_section.f90 +++ b/src/cross_section.f90 @@ -1207,6 +1207,9 @@ contains table % inelastic_e_in = get_real(NE_in) table % inelastic_sigma = get_real(NE_in) + ! set threshold value + table % threshold_inelastic = table % inelastic_e_in(NE_in) + ! allocate space for outgoing energy/angle for inelastic ! scattering NE_out = NXS(4) @@ -1239,9 +1242,18 @@ contains allocate(table % elastic_e_in(NE_in)) allocate(table % elastic_P(NE_in)) + ! read elastic energies and P + XSS_index = JXS4 + 1 + table % elastic_e_in = get_real(NE_in) + table % elastic_P = get_real(NE_in) + + ! set threshold + table % threshold_elastic = table % elastic_e_in(NE_in) + ! determine whether sigma=P or sigma = P/E - table % n_elastic_type = NXS(5) + table % elastic_type = NXS(5) else + table % threshold_elastic = ZERO table % n_elastic_e_in = 0 end if diff --git a/src/cross_section_header.f90 b/src/cross_section_header.f90 index 5f259b89b1..49557c2463 100644 --- a/src/cross_section_header.f90 +++ b/src/cross_section_header.f90 @@ -123,6 +123,10 @@ module cross_section_header real(8) :: awr real(8) :: temp + ! threshold for S(a,b) treatment (usually ~4 eV) + real(8) :: threshold_inelastic + real(8) :: threshold_elastic = 0.0 + ! Inelastic scattering data integer :: n_inelastic_e_in integer :: n_inelastic_e_out @@ -133,8 +137,8 @@ module cross_section_header real(8), allocatable :: inelastic_mu(:,:,:) ! Elastic scattering data + integer :: elastic_type integer :: n_elastic_e_in - integer :: n_elastic_type integer :: n_elastic_mu real(8), allocatable :: elastic_e_in(:) real(8), allocatable :: elastic_P(:)