From 1a1320a2be9d13a755761b31329c4cf49e994599 Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Thu, 16 Jun 2016 09:44:29 -0500 Subject: [PATCH] Address #618 comments --- data/get_multipole_data.py | 1 - docs/source/io_formats/data_wmp.rst | 4 ++-- openmc/cell.py | 1 + src/cross_section.F90 | 15 +++++++++++---- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/data/get_multipole_data.py b/data/get_multipole_data.py index 4af4ebbf55..d51c196dcc 100755 --- a/data/get_multipole_data.py +++ b/data/get_multipole_data.py @@ -81,7 +81,6 @@ print('Verifying MD5 checksums...') for f, checksum in zip(files, checksums): fname = f[:-9] if f.endswith('?raw=true') else f downloadsum = hashlib.md5(open(fname, 'rb').read()).hexdigest() - print(downloadsum) if downloadsum != checksum: raise IOError("MD5 checksum for {} does not match. If this is your first " "time receiving this message, please re-run the script. " diff --git a/docs/source/io_formats/data_wmp.rst b/docs/source/io_formats/data_wmp.rst index 268afa2dbf..d645c6e8f1 100644 --- a/docs/source/io_formats/data_wmp.rst +++ b/docs/source/io_formats/data_wmp.rst @@ -20,8 +20,8 @@ Windowed Multipole Library Format are stored as .. math:: - \text{data}[:,i] = [\text{pole},~\text{residue}_1,~\text{residue}_2, - ~\ldots]` + \text{data}[:,i] = [\text{pole},~\text{residue}_1,~\text{residue}_2, + ~\ldots] The residues are in the order: total, competitive if present, absorption, fission. Complex numbers are stored by forming a type with diff --git a/openmc/cell.py b/openmc/cell.py index 936ffd94fe..9ff5d1fa30 100644 --- a/openmc/cell.py +++ b/openmc/cell.py @@ -58,6 +58,7 @@ class Cell(object): rotation : Iterable of float If the cell is filled with a universe, this array specifies the angles in degrees about the x, y, and z axes that the filled universe should be + rotated. The rotation applied is an intrinsic rotation with specified Tait-Bryan angles. That is to say, if the angles are :math:`(\phi, \theta, \psi)`, then the rotation matrix applied is :math:`R_z(\psi) R_y(\theta) R_x(\phi)` or diff --git a/src/cross_section.F90 b/src/cross_section.F90 index 32f7414312..a8acb25a83 100644 --- a/src/cross_section.F90 +++ b/src/cross_section.F90 @@ -151,6 +151,7 @@ contains ! material union energy grid real(8), intent(in) :: sqrtkT ! Square root of kT, material dependent + logical :: use_mp ! true if XS can be calculated with windowed multipole integer :: i_grid ! index on nuclide energy grid integer :: i_low ! lower logarithmic mapping index integer :: i_high ! upper logarithmic mapping index @@ -163,11 +164,17 @@ contains nuc => nuclides(i_nuclide) mat => materials(i_mat) - ! If MP, don't interpolate, it's all already baked in. - if (nuc % mp_present .and. & - (E >= nuc % multipole % start_E/1.0e6_8 .and.& - E <= nuc % multipole % end_E/1.0e6_8)) then + ! Check to see if there is multipole data present at this energy + use_mp = .false. + if (nuc % mp_present) then + if (E >= nuc % multipole % start_E/1.0e6_8 .and. & + E <= nuc % multipole % end_E/1.0e6_8) then + use_mp = .true. + end if + end if + ! Evaluate multipole or interpolate + if (use_mp) then ! Call multipole kernel call multipole_eval(nuc % multipole, E, sqrtkT, sigT, sigA, sigF)