@@ -320,6 +320,28 @@ def test_getBoundingCircleOuterDiameter(self):
320
320
* self .component .getThermalExpansionFactor (self .component .temperatureInC ),
321
321
)
322
322
323
+ def test_component_less_than (self ):
324
+ """Ensure that comparisons between components properly reference bounding circle outer diameter.
325
+
326
+ .. test:: Order components by their outermost diameter
327
+ :id: T_ARMI_COMP_ORDER
328
+ :tests: R_ARMI_COMP_ORDER
329
+ """
330
+ componentCls = UnshapedComponent
331
+ componentMaterial = "HT9"
332
+
333
+ smallDims = {"Tinput" : 25.0 , "Thot" : 430.0 , "area" : 0.5 * math .pi }
334
+ sameDims = {"Tinput" : 25.0 , "Thot" : 430.0 , "area" : 1.0 * math .pi }
335
+ bigDims = {"Tinput" : 25.0 , "Thot" : 430.0 , "area" : 2.0 * math .pi }
336
+
337
+ smallComponent = componentCls ("TestComponent" , componentMaterial , ** smallDims )
338
+ sameComponent = componentCls ("TestComponent" , componentMaterial , ** sameDims )
339
+ bigComponent = componentCls ("TestComponent" , componentMaterial , ** bigDims )
340
+
341
+ self .assertTrue (smallComponent < self .component )
342
+ self .assertFalse (bigComponent < self .component )
343
+ self .assertFalse (sameComponent < self .component )
344
+
323
345
def test_fromComponent (self ):
324
346
circle = components .Circle ("testCircle" , "HT9" , 25 , 500 , 1.0 )
325
347
unshaped = components .UnshapedComponent .fromComponent (circle )
0 commit comments