From 7408a67d9916e44c503fb1f38aa06c3a59df05da Mon Sep 17 00:00:00 2001 From: Prasad Date: Wed, 14 Feb 2018 02:26:18 +1300 Subject: [PATCH 1/4] Adding stricter tolerances for expected output --- src/python/dof_constraints.py | 3 + .../expected_results/Cantilever.part0.exelem | 32 +-- .../expected_results/Cantilever.part0.exnode | 270 +++++++++--------- 3 files changed, 154 insertions(+), 151 deletions(-) diff --git a/src/python/dof_constraints.py b/src/python/dof_constraints.py index 8c0ed4c..e9283c7 100755 --- a/src/python/dof_constraints.py +++ b/src/python/dof_constraints.py @@ -162,6 +162,9 @@ problem.SolverGet([iron.ControlLoopIdentifiers.NODE], 1, nonLinearSolver) nonLinearSolver.outputType = iron.SolverOutputTypes.PROGRESS nonLinearSolver.NewtonJacobianCalculationTypeSet(iron.JacobianCalculationTypes.FD) +nonLinearSolver.NewtonAbsoluteToleranceSet(1e-14) +nonLinearSolver.NewtonSolutionToleranceSet(1e-14) +nonLinearSolver.NewtonRelativeToleranceSet(1e-14) nonLinearSolver.NewtonLinearSolverGet(linearSolver) linearSolver.linearType = iron.LinearSolverTypes.DIRECT problem.SolversCreateFinish() diff --git a/src/python/expected_results/Cantilever.part0.exelem b/src/python/expected_results/Cantilever.part0.exelem index 75ad07b..12d6f89 100644 --- a/src/python/expected_results/Cantilever.part0.exelem +++ b/src/python/expected_results/Cantilever.part0.exelem @@ -265,8 +265,8 @@ 2.0000000000000000E+00 1.0000000000000000E+00 8.9999999999999998E-04 - -2.1950386260517363E-01 - 5.5546902189007596E-08 + -2.1950384114688470E-01 + -9.9653618690354051E-13 0.0000000000000000E+00 0.0000000000000000E+00 -9.8100000000000005E+00 @@ -279,8 +279,8 @@ 2.0000000000000000E+00 1.0000000000000000E+00 8.9999999999999998E-04 - 1.4670178093238712E-01 - 1.7388089190717437E-08 + 1.4670178832402728E-01 + 2.1671553440683056E-12 0.0000000000000000E+00 0.0000000000000000E+00 -9.8100000000000005E+00 @@ -293,8 +293,8 @@ 2.0000000000000000E+00 1.0000000000000000E+00 8.9999999999999998E-04 - -2.1950196292028593E-01 - 5.8741681741025786E-08 + -2.1950194154756292E-01 + 2.8297364451645990E-12 0.0000000000000000E+00 0.0000000000000000E+00 -9.8100000000000005E+00 @@ -307,8 +307,8 @@ 2.0000000000000000E+00 1.0000000000000000E+00 8.9999999999999998E-04 - 1.4668093545033564E-01 - 1.1645525432868453E-08 + 1.4668094382937771E-01 + 1.1617373729677638E-12 0.0000000000000000E+00 0.0000000000000000E+00 -9.8100000000000005E+00 @@ -321,8 +321,8 @@ 2.0000000000000000E+00 1.0000000000000000E+00 8.9999999999999998E-04 - 2.4655303134640730E-01 - 3.8760818998895274E-08 + 2.4655299796392760E-01 + 6.6213701188644336E-13 0.0000000000000000E+00 0.0000000000000000E+00 -9.8100000000000005E+00 @@ -335,8 +335,8 @@ 2.0000000000000000E+00 1.0000000000000000E+00 8.9999999999999998E-04 - -1.4298081571297214E-01 - 8.9158866956040583E-09 + -1.4298077477648827E-01 + 2.0285995105950860E-12 0.0000000000000000E+00 0.0000000000000000E+00 -9.8100000000000005E+00 @@ -349,8 +349,8 @@ 2.0000000000000000E+00 1.0000000000000000E+00 8.9999999999999998E-04 - 2.4656334168127192E-01 - 3.9549687969042679E-08 + 2.4656330771970897E-01 + -5.0714987764877151E-13 0.0000000000000000E+00 0.0000000000000000E+00 -9.8100000000000005E+00 @@ -363,8 +363,8 @@ 2.0000000000000000E+00 1.0000000000000000E+00 8.9999999999999998E-04 - -1.4300692500472759E-01 - 6.0242122401632514E-09 + -1.4300688277747234E-01 + 6.9277916736609768E-13 0.0000000000000000E+00 0.0000000000000000E+00 -9.8100000000000005E+00 diff --git a/src/python/expected_results/Cantilever.part0.exnode b/src/python/expected_results/Cantilever.part0.exnode index 7dc3986..7610abd 100644 --- a/src/python/expected_results/Cantilever.part0.exnode +++ b/src/python/expected_results/Cantilever.part0.exnode @@ -22,33 +22,33 @@ 0.0000000000000000E+00 0.0000000000000000E+00 1.2345678806304932E+00 - 1.0942225063377050E+02 - 2.6164118999591448E+01 - 6.2831159283907148E+01 + 1.0942223704248839E+02 + 2.6164116789807586E+01 + 6.2831151952577052E+01 1.2345678806304932E+00 Node: 2 3.0000000000000000E+01 0.0000000000000000E+00 0.0000000000000000E+00 - 2.9374576769840395E+01 - -2.5342224466600310E-01 - -2.5469389472969395E+00 + 2.9374576840769119E+01 + -2.5342218295275432E-01 + -2.5469386732362067E+00 1.2345678806304932E+00 - 6.0263367629431741E-09 - 6.4228764529161708E-09 - -2.6368401477541099E+01 + 9.2370555648813024E-14 + -2.6645352591003757E-13 + -2.6368405800911901E+01 1.2345678806304932E+00 Node: 3 6.0000000000000000E+01 0.0000000000000000E+00 0.0000000000000000E+00 - 5.9987168896806736E+01 - 5.6177639742809748E-01 - -3.4392690830046178E+00 + 5.9987168844380214E+01 + 5.6177638588193868E-01 + -3.4392688413777153E+00 1.2345678806304932E+00 - 4.9274136615518721E+01 - 3.1432673130993294E-10 - -1.2996806632049502E+01 + 4.9274132569305578E+01 + -2.2265522758857514E-13 + -1.2996818296255396E+01 1.2345678806304932E+00 Node: 4 0.0000000000000000E+00 @@ -58,33 +58,33 @@ 2.0000000000000000E+01 0.0000000000000000E+00 1.2345678806304932E+00 - 2.0815769783674432E+02 - 4.6315590465688672E-03 - 1.2806468375628276E+02 + 2.0815767263194729E+02 + 4.6312625366340399E-03 + 1.2806466840876629E+02 1.2345678806304932E+00 Node: 5 3.0000000000000000E+01 2.0000000000000000E+01 0.0000000000000000E+00 - 2.9294510043733823E+01 - 1.9999816240541801E+01 - -2.6391009227269038E+00 + 2.9294510116369814E+01 + 1.9999816251873845E+01 + -2.6391006243217183E+00 1.2345678806304932E+00 - 9.9277848164547322E-09 - -8.2268947210195620E-10 - -5.2734695710744056E+01 + -1.3322676295501878E-13 + 3.8191672047105385E-13 + -5.2734704409534949E+01 1.2345678806304932E+00 Node: 6 6.0000000000000000E+01 2.0000000000000000E+01 0.0000000000000000E+00 - 5.9987168896806736E+01 - 1.9999724571821123E+01 - -3.2214930664672687E+00 + 5.9987168844380214E+01 + 1.9999724588871459E+01 + -3.2214928391118645E+00 1.2345678806304932E+00 - 1.1944168988481152E+02 - 3.4533087500676629E-10 - -2.5988058043337418E+01 + 1.1944168027326187E+02 + 4.4408920985006262E-13 + -2.5988081572166809E+01 1.2345678806304932E+00 Node: 7 0.0000000000000000E+00 @@ -94,33 +94,33 @@ 4.0000000000000000E+01 0.0000000000000000E+00 1.2345678806304932E+00 - 1.0942493943770714E+02 - -2.6157371755892342E+01 - 6.2835697434092332E+01 + 1.0942492569699812E+02 + -2.6157369946832752E+01 + 6.2835689817537023E+01 1.2345678806304932E+00 Node: 8 3.0000000000000000E+01 4.0000000000000000E+01 0.0000000000000000E+00 - 2.9374518541337423E+01 - 4.0253082654508191E+01 - -2.5473510616620811E+00 + 2.9374518615471313E+01 + 4.0253082614015241E+01 + -2.5473507624180498E+00 1.2345678806304932E+00 - 3.4013005745237024E-09 - -5.3003184063982189E-09 - -2.6366294230947574E+01 + 4.7606363295926712E-13 + 7.1764816311770119E-13 + -2.6366298608623051E+01 1.2345678806304932E+00 Node: 9 6.0000000000000000E+01 4.0000000000000000E+01 0.0000000000000000E+00 - 5.9987168896806736E+01 - 3.9437691278867916E+01 - -3.4398149822702533E+00 + 5.9987168844380214E+01 + 3.9437691323850075E+01 + -3.4398147058506248E+00 1.2345678806304932E+00 - 4.9275889399201326E+01 - -7.4965056384712625E-10 - -1.2991251410638256E+01 + 4.9275885232772922E+01 + 5.7287508070658077E-14 + -1.2991263275911789E+01 1.2345678806304932E+00 Node: 10 0.0000000000000000E+00 @@ -130,33 +130,33 @@ 0.0000000000000000E+00 2.0000000000000000E+01 1.2345678806304932E+00 - -6.6339790935043617E+00 - -3.0632591296916587E+00 - 2.7821951680072445E+01 + -6.6339777015148123E+00 + -3.0632563073050250E+00 + 2.7821948607810228E+01 1.2345678806304932E+00 Node: 11 3.0000000000000000E+01 0.0000000000000000E+00 2.0000000000000000E+01 - 3.0003833317317014E+01 - 1.4388949917099887E-02 - 1.7725264579713421E+01 + 3.0003833341048473E+01 + 1.4388966648064636E-02 + 1.7725264836618528E+01 1.2345678806304932E+00 - -2.6615559534093336E-08 - 1.0565273100837658E-08 - -5.3053064968776852E+01 + -5.6843418860808015E-14 + -1.5631940186722204E-13 + -5.3053057908871438E+01 1.2345678806304932E+00 Node: 12 6.0000000000000000E+01 0.0000000000000000E+00 2.0000000000000000E+01 - 5.9987168896806736E+01 - -2.2525015173313666E-03 - 1.5996004474426545E+01 + 5.9987168844380214E+01 + -2.2524575709027893E-03 + 1.5996004903507632E+01 1.2345678806304932E+00 - 2.8111001991604745E+00 - -8.8252605223715364E-10 - -2.6470123975407930E+01 + 2.8110962662670911E+00 + -3.0198066269804258E-13 + -2.6470122138363436E+01 1.2345678806304932E+00 Node: 13 0.0000000000000000E+00 @@ -166,33 +166,33 @@ 2.0000000000000000E+01 2.0000000000000000E+01 1.2345678806304932E+00 - -1.0949080458068874E+01 - -3.9619765369813820E-03 - 6.2155456368319200E+01 + -1.0949076443739962E+01 + -3.9617645705050109E-03 + 6.2155448959408837E+01 1.2345678806304932E+00 Node: 14 3.0000000000000000E+01 2.0000000000000000E+01 2.0000000000000000E+01 - 3.0004404964745163E+01 - 2.0000015161138744E+01 - 1.7628203575440189E+01 + 3.0004404981015558E+01 + 2.0000015160333152E+01 + 1.7628203855809907E+01 1.2345678806304932E+00 - -5.2478362988495064E-08 - -2.5583588580957439E-09 - -1.0610814388328700E+02 + 4.4764192352886312E-13 + -8.3488771451811772E-13 + -1.0610812959348709E+02 1.2345678806304932E+00 Node: 15 6.0000000000000000E+01 2.0000000000000000E+01 2.0000000000000000E+01 - 5.9987168896806736E+01 - 1.9999997610278772E+01 - 1.6224631928341992E+01 + 5.9987168844380214E+01 + 1.9999997610407210E+01 + 1.6224632352002160E+01 1.2345678806304932E+00 - 4.7073600904430357E-02 - -1.1943548372528312E-09 - -5.2958127552614805E+01 + 4.7068323101200349E-02 + -6.7146288529329468E-13 + -5.2958122829313766E+01 1.2345678806304932E+00 Node: 16 0.0000000000000000E+00 @@ -202,33 +202,33 @@ 4.0000000000000000E+01 2.0000000000000000E+01 1.2345678806304932E+00 - -6.6328823266686108E+00 - 3.0656189334004367E+00 - 2.7831094487869564E+01 + -6.6328809891598475E+00 + 3.0656159942020338E+00 + 2.7831090856347132E+01 1.2345678806304932E+00 Node: 17 3.0000000000000000E+01 4.0000000000000000E+01 2.0000000000000000E+01 - 3.0003762107774943E+01 - 3.9985660983508197E+01 - 1.7724890042196751E+01 + 3.0003762135213343E+01 + 3.9985660964184959E+01 + 1.7724890322184766E+01 1.2345678806304932E+00 - -2.8604048907254764E-08 - -6.8973093902968685E-09 - -5.3055078915551107E+01 + -2.1316282072803006E-14 + 1.9326762412674725E-12 + -5.3055071684616294E+01 1.2345678806304932E+00 Node: 18 6.0000000000000000E+01 4.0000000000000000E+01 2.0000000000000000E+01 - 5.9987168896806736E+01 - 4.0002283843325600E+01 - 1.5995211371958222E+01 + 5.9987168844380214E+01 + 4.0002283797997023E+01 + 1.5995211848642660E+01 1.2345678806304932E+00 - 2.8155865499492565E+00 - -9.1908702870568959E-11 - -2.6488003580716025E+01 + 2.8155823561306814E+00 + -5.0448534238967113E-13 + -2.6488000690950486E+01 1.2345678806304932E+00 Node: 19 0.0000000000000000E+00 @@ -238,33 +238,33 @@ 0.0000000000000000E+00 4.0000000000000000E+01 1.2345678806304932E+00 - -1.0397910678908551E+02 - -2.9287780036734656E+01 - 6.5643129732472843E+01 + -1.0397909510594059E+02 + -2.9287775401654656E+01 + 6.5643122029105783E+01 1.2345678806304932E+00 Node: 20 3.0000000000000000E+01 0.0000000000000000E+00 4.0000000000000000E+01 - 3.0568148851758483E+01 - 2.8262798055459559E-01 - 3.7417331785520140E+01 + 3.0568148786721860E+01 + 2.8262795427835208E-01 + 3.7417332093722337E+01 1.2345678806304932E+00 - 4.3328149956778361E-09 - 5.6245106350161223E-09 - -2.6684663496207268E+01 + -4.6185277824406512E-14 + 1.9895196601282805E-13 + -2.6684652107959277E+01 1.2345678806304932E+00 Node: 21 6.0000000000000000E+01 0.0000000000000000E+00 4.0000000000000000E+01 - 5.9987168896806736E+01 - -5.7377419527924478E-01 - 3.6574149726710672E+01 + 5.9987168844380214E+01 + -5.7377411052777938E-01 + 3.6574150218140730E+01 1.2345678806304932E+00 - -4.9186880468849758E+01 - 1.4705734130426862E-09 - -1.3473317342282185E+01 + -4.9186873842260788E+01 + 2.6018076582090544E-13 + -1.3473303842107978E+01 1.2345678806304932E+00 Node: 22 0.0000000000000000E+00 @@ -274,33 +274,33 @@ 2.0000000000000000E+01 4.0000000000000000E+01 1.2345678806304932E+00 - -1.9483261709562453E+02 - -6.8174945535233178E-03 - 1.3343230039672818E+02 + -1.9483259466132671E+02 + -6.8170906175382129E-03 + 1.3343228451428058E+02 1.2345678806304932E+00 Node: 23 3.0000000000000000E+01 2.0000000000000000E+01 4.0000000000000000E+01 - 3.0653036065419712E+01 - 2.0000207844308971E+01 - 3.7320218128137100E+01 + 3.0653035981777329E+01 + 2.0000207831757049E+01 + 3.7320218459233985E+01 1.2345678806304932E+00 - 6.8618177806456515E-09 - -1.6306316297232115E-09 - -5.3373448180117776E+01 + 3.6060043839825084E-13 + 4.7961634663806763E-14 + -5.3373425183950388E+01 1.2345678806304932E+00 Node: 24 6.0000000000000000E+01 2.0000000000000000E+01 4.0000000000000000E+01 - 5.9987168896806736E+01 - 2.0000377888446934E+01 - 3.6788771845164504E+01 + 5.9987168844380214E+01 + 2.0000377866099104E+01 + 3.6788772343142512E+01 1.2345678806304932E+00 - -1.2528727230568646E+02 - -2.0549801860170192E-09 - -2.6970069515271454E+01 + -1.2528725454611174E+02 + -8.5265128291212022E-14 + -2.6970041257145766E+01 1.2345678806304932E+00 Node: 25 0.0000000000000000E+00 @@ -310,31 +310,31 @@ 4.0000000000000000E+01 4.0000000000000000E+01 1.2345678806304932E+00 - -1.0397722205569667E+02 - 2.9284820902472362E+01 - 6.5649612633543100E+01 + -1.0397721046975172E+02 + 2.9284816464433785E+01 + 6.5649604545368931E+01 1.2345678806304932E+00 Node: 26 3.0000000000000000E+01 4.0000000000000000E+01 4.0000000000000000E+01 - 3.0568128086255545E+01 - 3.9717799895176050E+01 - 3.7416979722897700E+01 + 3.0568128022245251E+01 + 3.9717799895820441E+01 + 3.7416980052926505E+01 1.2345678806304932E+00 - 3.0974653952853259E-09 - -3.9426595321856439E-09 - -2.6688784685482201E+01 + -2.6645352591003757E-13 + -6.7856831265089568E-13 + -2.6688773075993513E+01 1.2345678806304932E+00 Node: 27 6.0000000000000000E+01 4.0000000000000000E+01 4.0000000000000000E+01 - 5.9987168896806736E+01 - 4.0574575549260132E+01 - 3.6573121955310185E+01 + 5.9987168844380214E+01 + 4.0574575417523960E+01 + 3.6573122506373771E+01 1.2345678806304932E+00 - -4.9191323490532362E+01 - 2.8084246039838945E-10 - -1.3496752172315038E+01 + -4.9191316632467760E+01 + 9.2814644858663087E-14 + -1.3496737415038629E+01 1.2345678806304932E+00 From 7cf5853bbdfde5726a2d8b7430b399fad502820a Mon Sep 17 00:00:00 2001 From: Prasad Date: Wed, 14 Feb 2018 02:28:58 +1300 Subject: [PATCH 2/4] Adding results folder to expected output folder --- src/python/expected_results/{ => results}/Cantilever.part0.exelem | 0 src/python/expected_results/{ => results}/Cantilever.part0.exnode | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename src/python/expected_results/{ => results}/Cantilever.part0.exelem (100%) rename src/python/expected_results/{ => results}/Cantilever.part0.exnode (100%) diff --git a/src/python/expected_results/Cantilever.part0.exelem b/src/python/expected_results/results/Cantilever.part0.exelem similarity index 100% rename from src/python/expected_results/Cantilever.part0.exelem rename to src/python/expected_results/results/Cantilever.part0.exelem diff --git a/src/python/expected_results/Cantilever.part0.exnode b/src/python/expected_results/results/Cantilever.part0.exnode similarity index 100% rename from src/python/expected_results/Cantilever.part0.exnode rename to src/python/expected_results/results/Cantilever.part0.exnode From 0c72728feb42852601eba5be6d562ab7e44ed439 Mon Sep 17 00:00:00 2001 From: Prasad Date: Wed, 14 Feb 2018 02:31:08 +1300 Subject: [PATCH 3/4] Removing results folder --- src/python/dof_constraints.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/python/dof_constraints.py b/src/python/dof_constraints.py index e9283c7..76a239d 100755 --- a/src/python/dof_constraints.py +++ b/src/python/dof_constraints.py @@ -219,12 +219,9 @@ # Solve the problem problem.Solve() -if not os.path.exists("./results"): - os.makedirs("./results") - # Export results fields = iron.Fields() fields.CreateRegion(region) -fields.NodesExport("./results/Cantilever", "FORTRAN") -fields.ElementsExport("./results/Cantilever", "FORTRAN") +fields.NodesExport("./Cantilever", "FORTRAN") +fields.ElementsExport("./Cantilever", "FORTRAN") fields.Finalise() From 25fbca985939edb5119e681b406831771d094c69 Mon Sep 17 00:00:00 2001 From: Chris Bradley Date: Wed, 28 Feb 2018 19:27:59 +1300 Subject: [PATCH 4/4] Update to work with testing. --- src/python/dof_constraints.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/python/dof_constraints.py b/src/python/dof_constraints.py index 76a239d..f8bc6e8 100755 --- a/src/python/dof_constraints.py +++ b/src/python/dof_constraints.py @@ -220,8 +220,10 @@ problem.Solve() # Export results +if not os.path.exists('./results'): + os.makedirs('./results') fields = iron.Fields() fields.CreateRegion(region) -fields.NodesExport("./Cantilever", "FORTRAN") -fields.ElementsExport("./Cantilever", "FORTRAN") +fields.NodesExport("./results/Cantilever", "FORTRAN") +fields.ElementsExport("./results/Cantilever", "FORTRAN") fields.Finalise()