Skip to content

Commit 6658072

Browse files
Adjust test tolerance
1 parent 5df4b80 commit 6658072

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

tests/validation/test_custom_validation.py

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
# constants
1414
tol = 1e-6
15+
plastic_tol = 1e-5
1516
warp_tol = 1e-3
1617

1718

@@ -122,7 +123,7 @@ def test_custom_section_warping(custom_section):
122123
def test_custom_section_plastic(custom_section):
123124
"""Test custom section plastic properties.
124125
125-
Warping properties calculated from sectionproperties v3.0.2 with a refined mesh
126+
Plastic properties calculated from sectionproperties v3.0.2 with a refined mesh
126127
[mesh_sizes=0.5].
127128
"""
128129
sec = custom_section
@@ -131,19 +132,19 @@ def test_custom_section_plastic(custom_section):
131132
x_pc, y_pc = sec.get_pc()
132133
x11_pc, y22_pc = sec.get_pc_p()
133134

134-
check.almost_equal(x_pc, 4.977273e01, rel=tol)
135-
check.almost_equal(y_pc, 9.172040e01, rel=tol)
136-
check.almost_equal(x11_pc, 5.133714e01, rel=tol)
137-
check.almost_equal(y22_pc, 9.158984e01, rel=tol)
138-
check.almost_equal(sec.section_props.sxx, 1.531971e05, rel=tol)
139-
check.almost_equal(sec.section_props.syy, 1.014943e05, rel=tol)
140-
check.almost_equal(sec.section_props.s11, 1.533463e05, rel=tol)
141-
check.almost_equal(sec.section_props.s22, 1.015010e05, rel=tol)
142-
check.almost_equal(sec.section_props.sf_xx_plus, 8.942884e-01, rel=tol)
143-
check.almost_equal(sec.section_props.sf_xx_minus, 1.292703e00, rel=tol)
144-
check.almost_equal(sec.section_props.sf_yy_plus, 1.602519e00, rel=tol)
145-
check.almost_equal(sec.section_props.sf_yy_minus, 1.567298e00, rel=tol)
146-
check.almost_equal(sec.section_props.sf_11_plus, 9.450478e-01, rel=tol)
147-
check.almost_equal(sec.section_props.sf_11_minus, 1.341988e00, rel=tol)
148-
check.almost_equal(sec.section_props.sf_22_plus, 1.677621e00, rel=tol)
149-
check.almost_equal(sec.section_props.sf_22_minus, 1.619711e00, rel=tol)
135+
check.almost_equal(x_pc, 4.977273e01, rel=plastic_tol)
136+
check.almost_equal(y_pc, 9.172040e01, rel=plastic_tol)
137+
check.almost_equal(x11_pc, 5.133714e01, rel=plastic_tol)
138+
check.almost_equal(y22_pc, 9.158984e01, rel=plastic_tol)
139+
check.almost_equal(sec.section_props.sxx, 1.531971e05, rel=plastic_tol)
140+
check.almost_equal(sec.section_props.syy, 1.014943e05, rel=plastic_tol)
141+
check.almost_equal(sec.section_props.s11, 1.533463e05, rel=plastic_tol)
142+
check.almost_equal(sec.section_props.s22, 1.015010e05, rel=plastic_tol)
143+
check.almost_equal(sec.section_props.sf_xx_plus, 8.942884e-01, rel=plastic_tol)
144+
check.almost_equal(sec.section_props.sf_xx_minus, 1.292703e00, rel=plastic_tol)
145+
check.almost_equal(sec.section_props.sf_yy_plus, 1.602519e00, rel=plastic_tol)
146+
check.almost_equal(sec.section_props.sf_yy_minus, 1.567298e00, rel=plastic_tol)
147+
check.almost_equal(sec.section_props.sf_11_plus, 9.450478e-01, rel=plastic_tol)
148+
check.almost_equal(sec.section_props.sf_11_minus, 1.341988e00, rel=plastic_tol)
149+
check.almost_equal(sec.section_props.sf_22_plus, 1.677621e00, rel=plastic_tol)
150+
check.almost_equal(sec.section_props.sf_22_minus, 1.619711e00, rel=plastic_tol)

0 commit comments

Comments
 (0)