Skip to content

Commit

Permalink
FEM: unit tests, fix round failure on windows by setting fix float nu…
Browse files Browse the repository at this point in the history
…mbers
  • Loading branch information
berndhahnebach committed Jul 10, 2019
1 parent 4fc91dc commit b51bf9a
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 53 deletions.
26 changes: 13 additions & 13 deletions src/Mod/Fem/femtest/testfiles/ccx/Flow1D_thermomech_expected_values
@@ -1,13 +1,13 @@
U1: (0, 0, 0)
U2: (0, 0, 0)
U3: (0, 0, 0)
Uabs: (0, 0, 0)
Sabs: (0, 0, 0)
MaxPrin: (0, 0, 0)
MidPrin: (0, 0, 0)
MinPrin: (0, 0, 0)
MaxShear: (0, 0, 0)
Peeq: (0, 0, 0)
Temp: (0, 0, 0)
MFlow: (78.3918, 78.3918, 78.3918)
NPress: (0.1, 0.14298874074074, 0.191647)
U1: (0.0000000000, 0.0000000000, 0.0000000000)
U2: (0.0000000000, 0.0000000000, 0.0000000000)
U3: (0.0000000000, 0.0000000000, 0.0000000000)
Uabs: (0.0000000000, 0.0000000000, 0.0000000000)
Sabs: (0.0000000000, 0.0000000000, 0.0000000000)
MaxPrin: (0.0000000000, 0.0000000000, 0.0000000000)
MidPrin: (0.0000000000, 0.0000000000, 0.0000000000)
MinPrin: (0.0000000000, 0.0000000000, 0.0000000000)
MaxShear: (0.0000000000, 0.0000000000, 0.0000000000)
Peeq: (0.0000000000, 0.0000000000, 0.0000000000)
Temp: (0.0000000000, 0.0000000000, 0.0000000000)
MFlow: (78.3918000000, 78.3918000000, 78.3918000000)
NPress: (0.1000000000, 0.1429887407, 0.1916470000)
26 changes: 13 additions & 13 deletions src/Mod/Fem/femtest/testfiles/ccx/cube_frequency_expected_values
@@ -1,13 +1,13 @@
U1: (-290.444, 78.205419178571, 448.513)
U2: (-142.151, 204.57418299643, 551.02)
U3: (-88.0403, -45.873190964286, -3.66486)
Uabs: (69.406788380271, 368.26808671734, 695.63631406348)
Sabs: (253.70210483837, 1550.584765187, 3661.813411182)
MaxPrin: (-171.64261808287, 920.73940817323, 2877.3028857679)
MidPrin: (-1053.2688605374, 61.84355293719, 1136.7129381108)
MinPrin: (-2584.4199852788, -815.24731273899, 288.59891042119)
MaxShear: (141.85434498876, 867.99336045611, 2036.558875184)
Peeq: (0, 0, 0)
Temp: (0, 0, 0)
MFlow: (0, 0, 0)
NPress: (0, 0, 0)
U1: (-290.4440000000, 78.2054191786, 448.5130000000)
U2: (-142.1510000000, 204.5741829964, 551.0200000000)
U3: (-88.0403000000, -45.8731909643, -3.6648600000)
Uabs: (69.4067883803, 368.2680867173, 695.6363140635)
Sabs: (253.7021048384, 1550.5847651870, 3661.8134111820)
MaxPrin: (-171.6426180829, 920.7394081732, 2877.3028857679)
MidPrin: (-1053.2688605374, 61.8435529372, 1136.7129381108)
MinPrin: (-2584.4199852788, -815.2473127390, 288.5989104212)
MaxShear: (141.8543449888, 867.9933604561, 2036.5588751840)
Peeq: (0.0000000000, 0.0000000000, 0.0000000000)
Temp: (0.0000000000, 0.0000000000, 0.0000000000)
MFlow: (0.0000000000, 0.0000000000, 0.0000000000)
NPress: (0.0000000000, 0.0000000000, 0.0000000000)
26 changes: 13 additions & 13 deletions src/Mod/Fem/femtest/testfiles/ccx/cube_static_expected_values
@@ -1,13 +1,13 @@
U1: (-0.0680669, -0.022596409820714, 0.00296745)
U2: (-0.0109484, 1.4716768996429e-05, 0.0110702)
U3: (-0.0643181, -0.030876682571429, 0)
Uabs: (0, 0.039462990491044, 0.093738346040971)
Sabs: (385.37990181702, 1006.7357751359, 2203.5090958167)
MaxPrin: (-924.04944196969, -23.640293171615, 1169.5484598644)
MidPrin: (-1260.1000473504, -208.29698676134, 346.87400406764)
MinPrin: (-3276.2805106799, -1096.4513895842, 3.2401143112922)
MaxShear: (218.10053031601, 536.40554820629, 1176.1155343551)
Peeq: (0, 0, 0)
Temp: (0, 0, 0)
MFlow: (0, 0, 0)
NPress: (0, 0, 0)
U1: (-0.0680669000, -0.0225964098, 0.0029674500)
U2: (-0.0109484000, 0.0000147168, 0.0110702000)
U3: (-0.0643181000, -0.0308766826, 0.0000000000)
Uabs: (0.0000000000, 0.0394629905, 0.0937383460)
Sabs: (385.3799018170, 1006.7357751359, 2203.5090958167)
MaxPrin: (-924.0494419697, -23.6402931716, 1169.5484598644)
MidPrin: (-1260.1000473504, -208.2969867613, 346.8740040676)
MinPrin: (-3276.2805106799, -1096.4513895842, 3.2401143113)
MaxShear: (218.1005303160, 536.4055482063, 1176.1155343551)
Peeq: (0.0000000000, 0.0000000000, 0.0000000000)
Temp: (0.0000000000, 0.0000000000, 0.0000000000)
MFlow: (0.0000000000, 0.0000000000, 0.0000000000)
NPress: (0.0000000000, 0.0000000000, 0.0000000000)
26 changes: 13 additions & 13 deletions src/Mod/Fem/femtest/testfiles/ccx/spine_thermomech_expected_values
@@ -1,13 +1,13 @@
U1: (-0.000942455, 0.0030585454755556, 0.00729818)
U2: (-0.00163382, 0.00061658895555556, 0.00222318)
U3: (-0.00185329, 0.00054391362222222, 0.00220675)
Uabs: (0, 0.003644782698151, 0.0073257122411351)
Sabs: (0.30712297252407, 7.7474585262667, 35.861803727667)
MaxPrin: (-5.8043388849171, 1.3112172518488, 11.117590206346)
MidPrin: (-38.557697014884, -4.9005864027774, 10.708631877287)
MinPrin: (-38.596084100199, -6.992615040027, 6.3205092526187)
MaxShear: (0.17664460289028, 4.1519161459379, 17.932302068545)
Peeq: (0, 0, 0)
Temp: (293.447, 299.91893333333, 310.93)
MFlow: (0, 0, 0)
NPress: (0, 0, 0)
U1: (-0.0009424550, 0.0030585455, 0.0072981800)
U2: (-0.0016338200, 0.0006165890, 0.0022231800)
U3: (-0.0018532900, 0.0005439136, 0.0022067500)
Uabs: (0.0000000000, 0.0036447827, 0.0073257122)
Sabs: (0.3071229725, 7.7474585263, 35.8618037277)
MaxPrin: (-5.8043388849, 1.3112172518, 11.1175902063)
MidPrin: (-38.5576970149, -4.9005864028, 10.7086318773)
MinPrin: (-38.5960841002, -6.9926150400, 6.3205092526)
MaxShear: (0.1766446029, 4.1519161459, 17.9323020685)
Peeq: (0.0000000000, 0.0000000000, 0.0000000000)
Temp: (293.4470000000, 299.9189333333, 310.9300000000)
MFlow: (0.0000000000, 0.0000000000, 0.0000000000)
NPress: (0.0000000000, 0.0000000000, 0.0000000000)
2 changes: 1 addition & 1 deletion src/Mod/Fem/femtest/utilstest.py
Expand Up @@ -230,7 +230,7 @@ def compare_stats(
for s in loc_stat_types:
statval = resulttools.get_stats(obj, s)
stats.append(
"{0}: ({1:.14g}, {2:.14g}, {3:.14g})\n"
"{}: ({:.10f}, {:.10f}, {:.10f})\n"
.format(s, statval[0], statval[1], statval[2])
)
else:
Expand Down

0 comments on commit b51bf9a

Please sign in to comment.