From 066b73e03710d018d0902221082e96b8dbc0555e Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 25 Apr 2017 07:05:05 -0500 Subject: [PATCH 1/3] Make sure get_pandas_dataframe() works with 1D mesh filter --- openmc/filter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openmc/filter.py b/openmc/filter.py index 676bc66e17..526ee52e5a 100644 --- a/openmc/filter.py +++ b/openmc/filter.py @@ -777,9 +777,12 @@ class MeshFilter(Filter): # Find mesh dimensions - use 3D indices for simplicity if len(self.mesh.dimension) == 3: nx, ny, nz = self.mesh.dimension - else: + elif len(self.mesh.dimension) == 2: nx, ny = self.mesh.dimension nz = 1 + else: + nx = self.mesh.dimension + ny = nz = 1 # Generate multi-index sub-column for x-axis filter_bins = np.arange(1, nx + 1) From fa8254369723eee20530f81685b6a9d82e19519b Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 25 Apr 2017 12:34:19 -0500 Subject: [PATCH 2/3] When 1 temp is available, revert to nearest temp on all processes --- src/nuclide_header.F90 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/nuclide_header.F90 b/src/nuclide_header.F90 index ed4a9a0a6c..ea6eab328f 100644 --- a/src/nuclide_header.F90 +++ b/src/nuclide_header.F90 @@ -224,11 +224,12 @@ module nuclide_header call sort(temps_available) ! If only one temperature is available, revert to nearest temperature - if (size(temps_available) == 1 .and. & - method == TEMPERATURE_INTERPOLATION .and. master) then - call warning("Cross sections for " // trim(this % name) // " are only & - &available at one temperature. Reverting to nearest temperature & - &method.") + if (size(temps_available) == 1 .and. method == TEMPERATURE_INTERPOLATION) then + if (master) then + call warning("Cross sections for " // trim(this % name) // " are only & + &available at one temperature. Reverting to nearest temperature & + &method.") + end if method = TEMPERATURE_NEAREST end if From fb9f7e2d42345b68fdac1020728ca61fc59fb1da Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 25 Apr 2017 15:55:29 -0500 Subject: [PATCH 3/3] Check for elastic scattering with isotropic mu. This apparently happens for Sm150 in JEFF 3.2. --- src/physics.F90 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/physics.F90 b/src/physics.F90 index a946c161b2..d1e9921ef6 100644 --- a/src/physics.F90 +++ b/src/physics.F90 @@ -481,7 +481,11 @@ contains ! Sample scattering angle select type (dist => rxn % products(1) % distribution(1) % obj) type is (UncorrelatedAngleEnergy) - mu_cm = dist % angle % sample(E) + if (allocated(dist % angle % energy)) then + mu_cm = dist % angle % sample(E) + else + mu_cm = TWO*prn() - ONE + end if end select ! Determine direction cosines in CM