|
16 | 16 | import copy
|
17 | 17 | import math
|
18 | 18 |
|
19 |
| -import numpy |
20 | 19 | import matplotlib
|
21 | 20 | import matplotlib.pyplot as plt
|
22 |
| -from matplotlib.patches import Wedge |
| 21 | +import numpy |
23 | 22 | from matplotlib.collections import PatchCollection
|
| 23 | +from matplotlib.patches import Wedge |
24 | 24 |
|
25 |
| -from armi.reactor import blocks |
26 |
| -from armi.reactor import grids |
27 |
| -from armi.reactor import components |
28 |
| -from armi.reactor.flags import Flags |
29 | 25 | from armi import runLog
|
| 26 | +from armi.reactor import blocks, components, grids |
| 27 | +from armi.reactor.flags import Flags |
30 | 28 |
|
31 | 29 | SIN60 = math.sin(math.radians(60.0))
|
32 | 30 |
|
@@ -141,12 +139,15 @@ def _checkInputs(self, soluteName, solventName, solute, solvent):
|
141 | 139 | "Components are not of compatible shape to be merged "
|
142 | 140 | "solute: {}, solvent: {}".format(solute, solvent)
|
143 | 141 | )
|
144 |
| - if solute.getArea() <= 0 or solvent.getArea() <= 0: |
| 142 | + if solute.getArea() < 0: |
145 | 143 | raise ValueError(
|
146 |
| - "Cannot merge components if either have negative area. " |
147 |
| - "{} area: {}, {} area : {}".format( |
148 |
| - solute, solvent, solute.getArea(), solvent.getArea() |
149 |
| - ) |
| 144 | + "Cannot merge solute with negative area into a solvent. " |
| 145 | + "{} area: {}".format(solute, solute.getArea()) |
| 146 | + ) |
| 147 | + if solvent.getArea() <= 0: |
| 148 | + raise ValueError( |
| 149 | + "Cannot merge into a solvent with negative or 0 area. " |
| 150 | + "{} area: {}".format(solvent, solvent.getArea()) |
150 | 151 | )
|
151 | 152 |
|
152 | 153 | def restablishLinks(self, solute, solvent, soluteLinks):
|
|
0 commit comments