From 2606fa796ee9497f1d15ded0b05e72050c662d4b Mon Sep 17 00:00:00 2001 From: Jake Hader Date: Wed, 7 Sep 2022 09:39:27 -0700 Subject: [PATCH] Update the uniform mesher to check if the lower and upper mesh (#869) * Update the uniform mesher to check if the lower and upper bounds of the provided mesh are similar and then skip if they are too close. This comes into play. --- armi/reactor/converters/uniformMesh.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/armi/reactor/converters/uniformMesh.py b/armi/reactor/converters/uniformMesh.py index e7f00ef41..e5ec04ee0 100644 --- a/armi/reactor/converters/uniformMesh.py +++ b/armi/reactor/converters/uniformMesh.py @@ -397,12 +397,14 @@ def setAssemblyStateFromOverlaps( # within the lower and upper bounds of the destination block. sourceBlocksInfo = sourceAssembly.getBlocksBetweenElevations(zLower, zUpper) - if not sourceBlocksInfo: + if abs(zUpper - zLower) < 1e-6 and not sourceBlocksInfo: + continue + elif not sourceBlocksInfo: raise ValueError( f"An error occurred when attempting to map to the " f"results from {sourceAssembly} to {destinationAssembly}. " f"No blocks in {sourceAssembly} exist between the axial " - f"elevations of {zLower:<8.3e} cm and {zUpper:<8.3e} cm. " + f"elevations of {zLower:<12.5f} cm and {zUpper:<12.5f} cm. " f"This a major bug in the uniform mesh converter that should " f"be reported to the developers." ) @@ -411,9 +413,7 @@ def setAssemblyStateFromOverlaps( # source assembly within the lower and upper bounds of the destination # block and perform the parameter mapping. updatedDestVals = collections.defaultdict(float) - _setNumberDensitiesFromOverlaps(destBlock, sourceBlocksInfo) - for setter, getter, paramNames in [ ( BlockParamMapper.scalarParamSetter,