From 3e4c924c16c7166ab6b8c46b7c030da8ba6410e8 Mon Sep 17 00:00:00 2001 From: Loic Gouarin Date: Wed, 26 Jun 2024 08:07:39 +0200 Subject: [PATCH] update tests with properties --- include/scopi/solver.hpp | 2 +- test/references/2d_case_spheres.json | 3102 +++++++++++------ test/references/3spheres_friction_fp.json | 57 + test/references/3spheres_nofriction.json | 57 + test/references/3spheres_viscous.json | 57 + .../references/3spheres_viscous_friction.json | 57 + .../obstacles_sphere_sphere_moving.json | 70 +- .../sphere_plane_friction_mu01.json | 50 +- test/references/two_spheres_asymmetrical.json | 80 +- test/references/two_spheres_symmetrical.json | 56 +- test/references/two_worms.json | 882 +++-- test/test_gradient.cpp | 92 +- test/test_obstacles.cpp | 11 +- test/test_sphere.cpp | 27 +- test/test_superellipsoid.cpp | 36 +- test/test_worm.cpp | 11 +- test/utils.cpp | 13 +- test/utils.hpp | 6 +- 18 files changed, 3283 insertions(+), 1383 deletions(-) diff --git a/include/scopi/solver.hpp b/include/scopi/solver.hpp index b015d7c1..cbc90698 100644 --- a/include/scopi/solver.hpp +++ b/include/scopi/solver.hpp @@ -294,7 +294,7 @@ namespace scopi update_velocity(); move_active_particles(); - if (nite % m_params.output_frequency == 0 && m_params.output_frequency != std::size_t(-1)) + if ((nite + 1) % m_params.output_frequency == 0 && m_params.output_frequency != std::size_t(-1)) { write_output_files(contacts, nite + 1); // m_current_save++); } diff --git a/test/references/2d_case_spheres.json b/test/references/2d_case_spheres.json index f064a55c..3d4655d3 100644 --- a/test/references/2d_case_spheres.json +++ b/test/references/2d_case_spheres.json @@ -1,1651 +1,2372 @@ { "contacts": [ { - "nij": [ - -0.9948275260717924, - 0.10157850840545551 + "distance": 1.702898786445975, + "i": 0, + "j": 1, + "normal": [ + -0.99482752611438, + 0.10157850798836567 ], "pi": [ - 1.3826083101022382, - 0.5624407655646954 + 1.3826083109226215, + 0.5624407660005906 ], "pj": [ - 3.0766988979458456, - 0.38946284677271314 - ] + 3.076698897865851, + 0.38946284801820974 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.08706572184228172, - -0.9962025698019868 + "distance": 0.2873907202726019, + "i": 0, + "j": 2, + "normal": [ + 0.08706572455179577, + -0.9962025695651817 ], "pi": [ - 1.1274658709210414, - 0.821330025222092 + 1.1274658710923977, + 0.8213300255037794 ], "pj": [ - 1.1024439904491765, - 1.1076293988436021 - ] + 1.102443989802401, + 1.1076293995085338 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.909604501104454, - -0.4154752117401436 + "distance": 1.5882808681579361, + "i": 0, + "j": 3, + "normal": [ + -0.9096045011722133, + -0.41547521159179795 ], "pi": [ - 1.362510199215152, - 0.6843773314874522 + 1.3625102000414717, + 0.684377331790001 ], "pj": [ - 2.8072176258749066, - 1.3442686614722965 - ] + 2.8072176268436406, + 1.3442686615551243 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.13088931160986272, - -0.9913969881466739 + "distance": 1.2336499954532298, + "i": 0, + "j": 4, + "normal": [ + -0.1308893124571511, + -0.9913969880348105 ], "pi": [ - 1.1788661167161016, - 0.8201967268790393 + 1.1788661177262574, + 0.8201967271901918 ], "pj": [ - 1.3403377154807643, - 2.043233617497481 - ] + 1.3403377174438986, + 2.0432336169716816 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9997219719050042, - 0.023579204616988193 + "distance": 0.46848990060291934, + "i": 0, + "j": 6, + "normal": [ + -0.9997219718925535, + 0.02357920514488358 ], "pi": [ - 1.3837625652477745, - 0.5808353092605677 + 1.3837625660551782, + 0.5808353094736075 ], "pj": [ - 1.852122211691024, - 0.5697886900522474 - ] + 1.8521222132976751, + 0.5697886899989851 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.6222573907689735, - -0.7828127104444518 + "distance": 0.46844237007050443, + "i": 0, + "j": 8, + "normal": [ + -0.6222573900189161, + -0.7828127110406718 ], "pi": [ - 1.2947452485011923, - 0.7710063825540326 + 1.2947452491346467, + 0.7710063830321721 ], "pj": [ - 1.5862369767016045, - 1.1377090255595534 - ] + 1.586236975708994, + 1.1377090247133814 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.42671021161154, - -0.904388409537868 + "distance": 1.5814608659644662, + "i": 0, + "j": 10, + "normal": [ + -0.42671021119772823, + -0.9043884097331135 ], "pi": [ - 1.2486294377579197, - 0.7996775296118956 + 1.2486294384706706, + 0.7996775299954735 ], "pj": [ - 1.9234549389283169, - 2.229932407774237 - ] + 1.9234549385873094, + 2.2299324076202303 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9998980617699728, - -0.014278167552302145 + "distance": 1.1382629240619895, + "i": 0, + "j": 12, + "normal": [ + -0.9998980617701204, + -0.014278167541966029 ], "pi": [ - 1.3838040924481243, - 0.5897631977513094 + 1.3838040932584992, + 0.5897631980864049 ], "pj": [ - 2.5219509844201635, - 0.6060155065056064 - ] + 2.521950984812872, + 0.6060155068229701 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.8520131192762881, - -0.5235204337760749 + "distance": 1.0024852587519104, + "i": 0, + "j": 14, + "normal": [ + -0.8520131193410899, + -0.5235204336706119 ], "pi": [ - 1.3489284473521246, - 0.709857591712083 + 1.3489284481777468, + 0.7098575920247446 ], "pj": [ - 2.20305904079234, - 1.2346791099054384 - ] + 2.2030590405804222, + 1.2346791094349396 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.6231115253885792, - -0.7821329982349027 + "distance": 1.9943271473097182, + "i": 0, + "j": 16, + "normal": [ + -0.6231115253147673, + -0.7821329982937072 ], "pi": [ - 1.2949466787168404, - 0.7708460863035291 + 1.2949466795097733, + 0.7708460866549302 ], "pj": [ - 2.5376349102804423, - 2.3306751583431615 - ] + 2.5376349102465814, + 2.3306751579588147 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.9023667898474754, - -0.43096888122039884 + "distance": 1.8763711167933363, + "i": 1, + "j": 2, + "normal": [ + 0.90236679008431, + -0.43096888072451234 ], "pi": [ - 3.11307713451803, - 0.5190599211221018 + 3.11307713436161, + 0.519059922336596 ], "pj": [ - 1.4199021543034713, - 1.327717481599012 - ] + 1.4199021526938953, + 1.3277174823648237 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.2777916338790701, - -0.9606413525071659 + "distance": 0.436393131049452, + "i": 1, + "j": 3, + "normal": [ + 0.277791633370306, + -0.9606413526542866 ], "pi": [ - 3.358813256776507, - 0.7274570338110651 + 3.3588132569134395, + 0.7274570352785478 ], "pj": [ - 3.2375868954387377, - 1.1466743230031962 - ] + 3.23758689624763, + 1.1466743229789327 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.10264532998018172, - -0.9947180184520936 + "distance": 1.5516674503043137, + "i": 1, + "j": 5, + "normal": [ + 0.10264533009163374, + -0.9947180184405929 ], "pi": [ - 3.427723736382896, - 0.7408643358287388 + 3.4277237362758064, + 0.7408643372338125 ], "pj": [ - 3.268452318800266, - 2.2843359085192736 - ] + 3.268452318646877, + 2.2843359086792865 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.9865208075493173, - -0.16363586487149773 + "distance": 0.5686877994996118, + "i": 1, + "j": 6, + "normal": [ + 0.986520807718949, + -0.16363586384882917 ], "pi": [ - 3.079967136810135, - 0.4138790182932286 + 3.0799671366801555, + 0.4138790193004631 ], "pj": [ - 2.518944787718467, - 0.5069367385190285 - ] + 2.518944789377887, + 0.5069367386318718 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9955056438729292, - -0.09470223343271579 + "distance": 0.00032851065706243344, + "i": 1, + "j": 7, + "normal": [ + -0.9955056440999714, + -0.09470223104605788 ], "pi": [ - 3.859786010058547, - 0.3867574091144314 + 3.8597860100846373, + 0.3867574095850109 ], "pj": [ - 3.860113045407674, - 0.38678851991542423 - ] + 3.86011304429789, + 0.38678852027715716 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.8424229683788644, - -0.5388167985018125 + "distance": 1.2287313093504544, + "i": 1, + "j": 8, + "normal": [ + 0.84242296902483, + -0.5388167974918658 ], "pi": [ - 3.136661745753825, - 0.5614921708411861 + 3.1366617454364345, + 0.5614921718534261 ], "pj": [ - 2.1015502687088907, - 1.2235532412167052 - ] + 2.101550267679658, + 1.2235532409356251 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.27528479355251756, - -0.961362721577422 + "distance": 0.442543502211743, + "i": 1, + "j": 9, + "normal": [ + -0.2752847955189932, + -0.9613627210143245 ], "pi": [ - 3.5764185446123324, - 0.7277408530381799 + 3.5764185453227944, + 0.7277408542262305 ], "pj": [ - 3.6982440415841604, - 1.1531856798844387 - ] + 3.6982440428374135, + 1.1531856796797204 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.5543297725120586, - -0.8322971244133487 + "distance": 1.8904845754753044, + "i": 1, + "j": 10, + "normal": [ + 0.5543297728896543, + -0.8322971241618611 ], "pi": [ - 3.250010642399567, - 0.6769606081613272 + 3.250010642187765, + 0.6769606094719789 ], "pj": [ - 2.202058757164436, - 2.2504054849395705 - ] + 2.202058756813144, + 2.2504054849124304 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.3010206340851612, - -0.9536176266486307 + "distance": 1.5257376744024427, + "i": 1, + "j": 11, + "normal": [ + -0.3010206341555732, + -0.9536176266264044 ], "pi": [ - 3.586544188572264, - 0.7246935823036049 + 3.5865441885367275, + 0.724693583704459 ], "pj": [ - 4.045822711126932, - 2.179663923391127 - ] + 4.045822710840398, + 2.179663923622607 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.9270787659663634, - -0.3748665918620716 + "distance": 0.0011559576510757723, + "i": 1, + "j": 12, + "normal": [ + 0.9270787664213875, + -0.37486659073675566 ], "pi": [ - 3.103354325138294, - 0.4969867424101456 + 3.1033543248960282, + 0.4969867433769942 ], "pj": [ - 3.1022826605730445, - 0.4974200726275363 - ] + 3.1022826611028336, + 0.4974200732806891 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9973210656326965, - -0.07314842476268686 + "distance": 0.8902045547559516, + "i": 1, + "j": 13, + "normal": [ + -0.9973210656919135, + -0.07314842395531253 ], "pi": [ - 3.8605002791088703, - 0.3782771656851812 + 3.86050027906893, + 0.37827716677712214 ], "pj": [ - 4.748320034886812, - 0.4433942266259832 - ] + 4.748320034301931, + 0.44339422695536057 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.6898142365418869, - -0.7239864080658792 + "distance": 0.7427749639336626, + "i": 1, + "j": 14, + "normal": [ + 0.6898142372480087, + -0.7239864073930862 ], "pi": [ - 3.196704924906951, - 0.6343462723525369 + 3.196704924565892, + 0.6343462734974286 ], "pj": [ - 2.6843281793443547, - 1.1721052514307013 - ] + 2.684328179373075, + 1.17210525113729 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.794180404829471, - -0.6076820587979356 + "distance": 1.0816971031778295, + "i": 1, + "j": 15, + "normal": [ + -0.794180405084603, + -0.6076820584645031 ], "pi": [ - 3.7805755530262104, - 0.5885868797193378 + 3.7805755530633522, + 0.588586880997749 ], "pj": [ - 4.639638197457589, - 1.2459148032363543 - ] + 4.639638196643962, + 1.2459148032919434 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.34872473155771877, - -0.9372251925764676 + "distance": 1.6854362886754644, + "i": 1, + "j": 16, + "normal": [ + 0.34872473180665925, + -0.9372251924838413 ], "pi": [ - 3.330904967122708, - 0.7182440571427373 + 3.3309049669615245, + 0.7182440585158925 ], "pj": [ - 2.7431516492127863, - 2.297877408941329 - ] + 2.74315164921596, + 2.2978774085890055 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.5521351013601853, - -0.8337546580655355 + "distance": 1.9602087934362071, + "i": 1, + "j": 17, + "normal": [ + -0.552135101440087, + -0.8337546580126225 ], "pi": [ - 3.685343980465185, - 0.6775340678392012 + 3.6853439804333834, + 0.6775340692279812 ], "pj": [ - 4.767644062170445, - 2.3118672814376073 - ] + 4.7676440614410325, + 2.311867281432722 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9999999476350347, - 0.00032362003622185965 + "distance": 1.3165359528601035, + "i": 2, + "j": 3, + "normal": [ + -0.9999999476349497, + 0.0003236202986488999 ], "pi": [ - 1.4579181022996754, - 1.4954001441798137 + 1.4579181005978488, + 1.4954001446503566 ], "pj": [ - 2.7744539835241575, - 1.4949740867679344 - ] + 2.774453984517481, + 1.4949740868921106 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.3309524383862639, - -0.9436474360301023 + "distance": 0.20964229107829, + "i": 2, + "j": 4, + "normal": [ + -0.3309524424175218, + -0.9436474346162749 ], "pi": [ - 1.1974074735854603, - 1.8629592336381704 + 1.1974074734533393, + 1.8629592336603864 ], "pj": [ - 1.2667891009270835, - 2.060787643870655 - ] + 1.2667891017197046, + 2.060787643823493 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.8815729917933712, - -0.47204773078628887 + "distance": 1.692157750083192, + "i": 2, + "j": 5, + "normal": [ + -0.8815729920010745, + -0.4720477303983924 ], "pi": [ - 1.4118055612670313, - 1.6793299188045316 + 1.4118055596461123, + 1.67932991922622 ], "pj": [ - 2.90356613059647, - 2.4781091443294847 - ] + 2.903566130324758, + 2.4781091446290415 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.7678900829555039, - 0.6405816267257354 + "distance": 0.732413046049657, + "i": 2, + "j": 6, + "normal": [ + -0.767890083614704, + 0.6405816259355265 ], "pi": [ - 1.367540235343216, - 1.2460994389888216 + 1.3675402338980989, + 1.246099439869235 ], "pj": [ - 1.929952947688506, - 0.7769291004701313 - ] + 1.92995294906967, + 0.7769290999743542 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9938011058835268, - 0.11117266725539723 + "distance": 1.372992580061444e-05, + "i": 2, + "j": 8, + "normal": [ + -0.9938011057107221, + 0.11117266880014352 ], "pi": [ - 1.4555044259319114, - 1.4522382542030263 + 1.4555044241628319, + 1.4522382541742658 ], "pj": [ - 1.455518070173977, - 1.4522367278746955 - ] + 1.4555180689782738, + 1.452236727781772 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.7016410528950597, - -0.7125305838294325 + "distance": 0.7177934036481715, + "i": 2, + "j": 10, + "normal": [ + -0.7016410535900276, + -0.7125305831450858 ], "pi": [ - 1.3417444940331082, - 1.772968021293847 + 1.3417444926019182, + 1.7729680216001047 ], "pj": [ - 1.8453778132534813, - 2.2844177739834453 - ] + 1.8453778125975933, + 2.284417774079232 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.8928050296375389, - 0.45044331391853637 + "distance": 1.2746615789802667, + "i": 2, + "j": 12, + "normal": [ + -0.8928050298008985, + 0.4504433135947482 ], "pi": [ - 1.4161790402802206, - 1.3201346169505195 + 1.416179038642035, + 1.3201346176493203 ], "pj": [ - 2.554203307306017, - 0.7459718320847967 - ] + 2.5542033076495723, + 0.7459718323015349 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.997588563081908, - 0.06940503445841864 + "distance": 0.7023332900451277, + "i": 2, + "j": 14, + "normal": [ + -0.9975885630340144, + 0.06940503514681354 ], "pi": [ - 1.4569791685209486, - 1.4685015421301615 + 1.4569791668005063, + 1.4685015424348429 ], "pj": [ - 2.1576188245643175, - 1.4197560760430248 - ] + 2.1576188243875767, + 1.4197560757544836 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.8479961105196253, - -0.5300024495637614 + "distance": 1.2869710361976494, + "i": 2, + "j": 16, + "normal": [ + -0.847996110990379, + -0.5300024488105621 ], "pi": [ - 1.3987315503336257, - 1.7018960595000217 + 1.3987315488151326, + 1.7018960597794697 ], "pj": [ - 2.4900779826170205, - 2.3839938607251194 - ] + 2.490077982467999, + 2.383993860512489 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.8864582696761624, - -0.4628085307367877 + "distance": 1.2423198850079518, + "i": 3, + "j": 4, + "normal": [ + 0.8864582696609822, + -0.462808530765864 ], "pi": [ - 2.8156069295112096, - 1.6626007846645534 + 2.815606930510005, + 1.6626007847041522 ], "pj": [ - 1.7143421926113862, - 2.2375570260035116 - ] + 1.714342194880426, + 2.2375570254258994 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.08045951742466625, - -0.9967578773482504 + "distance": 0.4288403911185722, + "i": 3, + "j": 5, + "normal": [ + -0.08045951640018649, + -0.9967578774309476 ], "pi": [ - 3.1660642785816893, - 1.8561296193263308 + 3.1660642792036615, + 1.8561296193853645 ], "pj": [ - 3.200568569500825, - 2.2835796572682794 - ] + 3.2005685696859287, + 2.28357965739337 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.7131548021219717, - 0.7010065821448266 + "distance": 0.6327521272199338, + "i": 3, + "j": 6, + "normal": [ + 0.7131548017995551, + 0.7010065824728305 ], "pi": [ - 2.8784204123470882, - 1.240778407716057 + 2.87842041345724, + 1.2407784076262327 ], "pj": [ - 2.4271701940872323, - 0.7972150014917432 - ] + 2.4271701955814615, + 0.7972150013713732 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.6805220766263633, - 0.7327275777696252 + "distance": 0.8309668101371414, + "i": 3, + "j": 7, + "normal": [ + -0.6805220757692907, + 0.7327275785656329 ], "pi": [ - 3.383555710200524, - 1.2292811985584142 + 3.3835557108831726, + 1.229281198298963 ], "pj": [ - 3.9490469702167768, - 0.6204088997261468 - ] + 3.9490469694130867, + 0.620408899638768 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.9981219457104326, - 0.061258317730903164 + "distance": 0.6199697132291387, + "i": 3, + "j": 8, + "normal": [ + 0.9981219456862644, + 0.06125831812469097 ], "pi": [ - 2.775134661431654, - 1.4726538409844743 + 2.775134662433707, + 1.4726538408708068 ], "pj": [ - 2.1563292872638873, - 1.434675539448004 - ] + 2.1563292859988836, + 1.4346755389501429 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.993599689531674, - 0.11295865156136042 + "distance": 0.0001521170838146755, + "i": 3, + "j": 9, + "normal": [ + -0.9935996894793977, + 0.11295865202119129 ], "pi": [ - 3.497030042492094, - 1.4539151620791997 + 3.4970300434664394, + 1.4539151619415953 ], "pj": [ - 3.497181185135362, - 1.4538979792344817 - ] + 3.497181186953682, + 1.4538979790008582 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.7402968998747469, - -0.6722800755904037 + "distance": 0.8290073641467843, + "i": 3, + "j": 10, + "normal": [ + 0.7402969003625184, + -0.6722800750532828 ], "pi": [ - 2.8685828152384754, - 1.7385233121994008 + 2.8685828160549764, + 1.7385233120337826 ], "pj": [ - 2.254871234319414, - 2.2958484449681307 - ] + 2.2548712339994106, + 2.295848445022107 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.7271406988936117, - -0.6864884587613327 + "distance": 0.7358379553357135, + "i": 3, + "j": 11, + "normal": [ + -0.7271406983831944, + -0.6864884593019758 ], "pi": [ - 3.4004525332759217, - 1.7436731112485955 + 3.400452534084215, + 1.7436731114736106 ], "pj": [ - 3.935510258960058, - 2.248817375642174 - ] + 3.9355102588238875, + 2.2488173757279406 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.3343629108406272, - 0.9424443982825633 + "distance": 0.274951012173546, + "i": 3, + "j": 12, + "normal": [ + 0.33436291150469694, + 0.9424443980469628 ], "pi": [ - 3.0157127487161266, - 1.1532697713689073 + 3.015712749468729, + 1.1532697714833602 ], "pj": [ - 2.923779327924474, - 0.8941437300797621 - ] + 2.9237793285172193, + 0.8941437303230593 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.8758477976930391, - 0.48258743795943676 + "distance": 1.5138257643780406, + "i": 3, + "j": 13, + "normal": [ + -0.8758477975403337, + 0.4825874382365821 ], "pi": [ - 3.4543511132053184, - 1.3199439740947345 + 3.4543511141432637, + 1.319943974023344 ], "pj": [ - 4.780232076262791, - 0.5893906762655297 - ] + 4.780232075733583, + 0.5893906764556113 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.9896671707159536, - 0.14338372016055292 + "distance": 0.00027705473055445194, + "i": 3, + "j": 14, + "normal": [ + 0.9896671706400897, + 0.14338372068418176 ], "pi": [ - 2.7781990771152634, - 1.4428876589876172 + 2.778199078136053, + 1.4428876588268893 ], "pj": [ - 2.777924886380123, - 1.442847934028761 - ] + 2.7779248861647527, + 1.4428479336887894 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9998260019101823, - 0.018653844223107986 + "distance": 1.0675600613999792, + "i": 3, + "j": 15, + "normal": [ + -0.9998260019088886, + 0.018653844292454765 ], "pi": [ - 3.4992867565165606, - 1.4880957441568774 + 3.4992867575093847, + 1.488095744160803 ], "pj": [ - 4.5666610662191625, - 1.4681816450407306 - ] + 4.566661065496533, + 1.468181645002604 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.4230793226471935, - -0.9060926479937865 + "distance": 0.5310636781346127, + "i": 3, + "j": 16, + "normal": [ + 0.4230793235610738, + -0.906092647567071 ], "pi": [ - 2.98355766902316, - 1.8232681947498905 + 2.9835576696852186, + 1.8232681946242884 ], "pj": [ - 2.75887560782838, - 2.3044610890536585 - ] + 2.75887560797217, + 2.304461088771986 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.8673917235863384, - -0.49762596179652957 + "distance": 1.4342605667294472, + "i": 3, + "j": 17, + "normal": [ + -0.8673917233878367, + -0.49762596214253024 ], "pi": [ - 3.4512862266611752, - 1.6752202904316644 + 3.451286227582522, + 1.675220290586132 ], "pj": [ - 4.695351973010762, - 2.3889455851643255 - ] + 4.6953519723451915, + 2.3889455850679644 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.991240266410796, - -0.13207094398789648 + "distance": 1.1198551525607587, + "i": 4, + "j": 5, + "normal": [ + -0.9912402663367039, + -0.1320709445439863 ], "pi": [ - 1.7528628876248846, - 2.4562508047992493 + 1.752862889872267, + 2.45625080443676 ], "pj": [ - 2.862908409722363, - 2.6041511322383237 - ] + 2.862908409555123, + 2.60415113218791 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.3973712159212593, - 0.9176579519392071 + "distance": 1.3081047824326908, + "i": 4, + "j": 6, + "normal": [ + -0.3973712157008553, + 0.917657952034648 ], "pi": [ - 1.5345405680970492, - 2.0703420809058546 + 1.534540570290643, + 2.0703420803038446 ], "pj": [ - 2.0543437562735583, - 0.8699493248083785 - ] + 2.0543437579500234, + 0.8699493246099324 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.38643304183260335, - 0.9223174638810661 + "distance": 0.3588896529810283, + "i": 4, + "j": 8, + "normal": [ + -0.3864330390240526, + 0.922317465057794 ], "pi": [ - 1.5305193995642454, - 2.06862911833578 + 1.5305194008063667, + 2.06862911733626 ], "pj": [ - 1.6692062203504912, - 1.7376189225857286 - ] + 1.6692062200821132, + 1.7376189223633265 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9243231272153731, - 0.38161073949090224 + "distance": 1.9347238344708517, + "i": 4, + "j": 9, + "normal": [ + -0.9243231272167614, + 0.38161073948753954 ], "pi": [ - 1.7282623380032653, - 2.2674075294280054 + 1.728262340278396, + 2.2674075288623183 ], "pj": [ - 3.5165723234539983, - 1.5290961360490034 - ] + 3.516572325257297, + 1.5290961356857278 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9928179044072771, - -0.11963531538949039 + "distance": 0.009311011660576202, + "i": 4, + "j": 10, + "normal": [ + -0.9928179042639197, + -0.11963531657917179 ], "pi": [ - 1.753442870007336, - 2.4516791315016544 + 1.7534428722292543, + 2.451679131372091 ], "pj": [ - 1.7626870117304978, - 2.4527930576361916 - ] + 1.7626870113126845, + 2.4527930571997767 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.6238249699746715, - 0.781564077242615 + "distance": 1.630936183377563, + "i": 4, + "j": 12, + "normal": [ + -0.6238249696616341, + 0.7815640774924736 ], "pi": [ - 1.6177910907669422, - 2.1203738688442866 + 1.6177910929264816, + 2.120373868185509 ], "pj": [ - 2.635209807555024, - 0.8456927341854297 - ] + 2.6352098080420516, + 0.8456927345749284 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.7306871898163808, - 0.6827124069754704 + "distance": 0.7990470325150796, + "i": 4, + "j": 14, + "normal": [ + -0.7306871890604664, + 0.6827124077845035 ], "pi": [ - 1.6570765320380503, - 2.1567144155087976 + 1.657076534034776, + 2.156714414644452 ], "pj": [ - 2.240929964106064, - 1.6111950913939042 - ] + 2.240929964150326, + 1.6111950911430193 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9976284282450545, - -0.0688296386544499 + "distance": 0.7048952061408089, + "i": 4, + "j": 16, + "normal": [ + -0.9976284282260504, + -0.06882963892989849 ], "pi": [ - 1.7552113486332919, - 2.4330015910896194 + 1.755211350900926, + 2.4330015906239586 ], "pj": [ - 2.4584348475127107, - 2.481519273576208 - ] + 2.458434847467259, + 2.4815192731460467 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.4461956243909054, - 0.8949354528536738 + "distance": 1.6302942098257303, + "i": 5, + "j": 6, + "normal": [ + 0.44619562370892946, + 0.8949354531936924 ], "pi": [ - 3.0649766474576268, - 2.3213290016216184 + 3.064976647515752, + 2.32132900165131 ], "pj": [ - 2.337546504359986, - 0.8623209142582042 - ] + 2.3375465057335036, + 0.862320914141868 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.3767172785554712, - 0.9263282852411232 + "distance": 1.7646222385914638, + "i": 5, + "j": 7, + "normal": [ + -0.3767172781859173, + 0.9263282853914124 ], "pi": [ - 3.370060942005955, - 2.309690515837148 + 3.3700609416742386, + 2.309690515937179 ], "pj": [ - 4.034824629364092, - 0.6750710235688849 - ] + 4.034824628422753, + 0.6750710232991914 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.7544332139516959, - 0.6563768168411453 + "distance": 1.1665822694615642, + "i": 5, + "j": 8, + "normal": [ + 0.7544332139862, + 0.6563768168014865 ], "pi": [ - 2.950701555612872, - 2.4097715244155964 + 2.9507015554053715, + 2.4097715245860485 ], "pj": [ - 2.0705931457205295, - 1.6440539686701714 - ] + 2.0705931444761685, + 1.6440539680198123 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.40481239150900616, - 0.9143997636049339 + "distance": 0.6954116453145179, + "i": 5, + "j": 9, + "normal": [ + -0.4048123926078733, + 0.9143997631184565 ], "pi": [ - 3.3804768410458115, - 2.3141128606507375 + 3.3804768412584933, + 2.314112860986842 ], "pj": [ - 3.661988091749537, - 1.678228617739935 - ] + 3.6619880932456415, + 1.6782286172414311 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.9903027266696833, - 0.1389262737950971 + "distance": 0.542648250125726, + "i": 5, + "j": 10, + "normal": [ + 0.9903027266447157, + 0.13892627397307333 ], "pi": [ - 2.8632559904317, - 2.601609607551279 + 2.8632559902462478, + 2.6016096076410453 ], "pj": [ - 2.3258699490033736, - 2.5262215082210857 - ] + 2.3258699485377576, + 2.5262215081730695 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9693087405069227, - 0.2458466301922466 + "distance": 0.29202471372944905, + "i": 5, + "j": 11, + "normal": [ + -0.96930874052019, + 0.2458466301399374 ], "pi": [ - 3.589756547066363, - 2.561970271009723 + 3.589756546876573, + 2.5619702711848653 ], "pj": [ - 3.872818654614174, - 2.4901769791847155 - ] + 3.872818654342434, + 2.4901769793969004 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.1955418782109606, - 0.9806953522199082 + "distance": 1.4111122004846628, + "i": 5, + "j": 12, + "normal": [ + 0.1955418779543102, + 0.980695352271082 ], "pi": [ - 3.1579032756043084, - 2.2895346303035784 + 3.157903275504749, + 2.2895346304403557 ], "pj": [ - 2.881971745502278, - 0.9056634535623651 - ] + 2.881971745817738, + 0.9056634538920275 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.5186852078352651, - 0.8549652947183808 + "distance": 0.785043515758733, + "i": 5, + "j": 14, + "normal": [ + 0.5186852076346282, + 0.8549652948401021 ], "pi": [ - 3.038102073796135, - 2.3361474197725918 + 3.0381020736758093, + 2.3361474198832144 ], "pj": [ - 2.63091161495659, - 1.664962459435663 - ] + 2.6309116147022724, + 1.664962458970239 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.8174557682234305, - 0.5759913775381026 + "distance": 1.343093440194162, + "i": 5, + "j": 15, + "normal": [ + -0.8174557680889637, + 0.57599137772894 ], "pi": [ - 3.5334590254716685, - 2.4395733843134284 + 3.533459025227108, + 2.439573384398427 ], "pj": [ - 4.631378505671645, - 1.6659631433573028 - ] + 4.631378504996275, + 1.6659631433622892 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.9629809027026016, - 0.2695696218606289 + "distance": 0.0003480905028350862, + "i": 5, + "j": 16, + "normal": [ + 0.9629809024493572, + 0.26956962276529145 ], "pi": [ - 2.873385202600966, - 2.5531752792775353 + 2.8733852025001445, + 2.553175279097892 ], "pj": [ - 2.8730499980966147, - 2.553081444652954 - ] + 2.8730499979935904, + 2.553081444472354 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9959578322538885, - 0.08982202609680645 + "distance": 1.070561272014889, + "i": 5, + "j": 17, + "normal": [ + -0.9959578322421432, + 0.08982202622704025 ], "pi": [ - 3.5996363524830324, - 2.6198143710380606 + 3.599636352283969, + 2.619814371145527 ], "pj": [ - 4.665870236750705, - 2.5236543884801086 - ] + 4.665870236042309, + 2.5236543884929534 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9971289199093616, - 0.07572263255057812 + "distance": 1.3409986847606654, + "i": 6, + "j": 7, + "normal": [ + -0.9971289198984644, + 0.07572263269407561 ], "pi": [ - 2.522506149342476, - 0.5364510197788652 + 2.5225061509412887, + 0.5364510195002026 ], "pj": [ - 3.8596547221045556, - 0.4349070689224436 - ] + 3.8596547210619523, + 0.4349070686508322 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.4099396920528856, - -0.9121126294924248 + "distance": 0.24572650516834718, + "i": 6, + "j": 8, + "normal": [ + 0.40993969476409203, + -0.9121126282739007 ], "pi": [ - 2.0501242601890297, - 0.8680876459455951 + 2.050124260881293, + 0.8680876453060239 ], "pj": [ - 1.94939121265976, - 1.0922178939793823 - ] + 1.9493912123571335, + 1.0922178937716853 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.8791795454685527, - -0.4764906366653062 + "distance": 1.1900871784320626, + "i": 6, + "j": 9, + "normal": [ + -0.8791795455244408, + -0.4764906365621864 ], "pi": [ - 2.4829081170580976, - 0.7218403782722086 + 2.4829081186793314, + 0.7218403780071014 ], "pj": [ - 3.5292084215596526, - 1.288905775556161 - ] + 3.5292084233476966, + 1.288905775222691 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.07414424296299299, - -0.9972475275654709 + "distance": 1.3104994409461883, + "i": 6, + "j": 10, + "normal": [ + 0.07414424401982832, + -0.9972475274868963 ], "pi": [ - 2.162857702795643, - 0.8966691832229761 + 2.162857704043313, + 0.8966691829661093 ], "pj": [ - 2.065691713864346, - 2.203561510298901 - ] + 2.0656917137059496, + 2.203561510222656 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.997105730191594, - -0.07602738203494988 + "distance": 0.0002944147077216999, + "i": 6, + "j": 12, + "normal": [ + -0.9971057301158103, + -0.07602738302885809 ], "pi": [ - 2.5224983640769993, - 0.5873966225444667 + 2.522498365654028, + 0.5873966226476545 ], "pj": [ - 2.5227919278305517, - 0.5874190062124841 - ] + 2.5227919282461277, + 0.5874190062274078 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.31879625611043405, - -0.9478232678563924 + "distance": 0.23438959735951426, + "i": 6, + "j": 14, + "normal": [ + -0.31879625437697384, + -0.9478232684394341 ], "pi": [ - 2.2947759146718556, - 0.8800764421349447 + 2.294775915692368, + 0.8800764421001963 ], "pj": [ - 2.369498441046113, - 1.102236357043104 - ] + 2.3694984413955087, + 1.102236356357694 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.24164118394949208, - -0.9703656724243123 + "distance": 1.4460782709516804, + "i": 6, + "j": 16, + "normal": [ + -0.24164118318576117, + -0.970365672614497 ], "pi": [ - 2.2688733691703042, - 0.8876443912493843 + 2.268873370516375, + 0.8876443910827456 ], "pj": [ - 2.6183054347763206, - 2.2908691055401125 - ] + 2.6183054348883585, + 2.290869105127982 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.9193668333197458, - -0.39340135458793596 + "distance": 1.906735387975491, + "i": 7, + "j": 8, + "normal": [ + 0.9193668333787455, + -0.39340135445005553 ], "pi": [ - 3.8816104311665027, - 0.524601956265587 + 3.8816104301041645, + 0.5246019559145301 ], "pj": [ - 2.128621155605687, - 1.2747142407098355 - ] + 2.128621154369944, + 1.2747142401219396 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.34097818137757707, - -0.9400712099753084 + "distance": 0.5108060924194199, + "i": 7, + "j": 9, + "normal": [ + 0.34097817904593825, + -0.9400712108210294 ], "pi": [ - 4.044915372220769, - 0.6789512648324252 + 4.044915371833415, + 0.6789512647590829 ], "pj": [ - 3.87074163944363, - 1.159145367153625 - ] + 3.8707416405946704, + 1.1591453665545655 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.00866277489600004, - -0.9999624774615802 + "distance": 1.471860317386601, + "i": 7, + "j": 11, + "normal": [ + 0.008662774507550475, + -0.9999624774649453 ], "pi": [ - 4.138742849099283, - 0.6958612437430918 + 4.138742848163279, + 0.6958612434319147 ], "pj": [ - 4.125992454496011, - 2.1676663326633054 - ] + 4.125992454127145, + 2.167666332888161 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.9890382303812966, - -0.14765967236938243 + "distance": 0.7492092629225712, + "i": 7, + "j": 12, + "normal": [ + 0.9890382302891242, + -0.14765967298676178 ], "pi": [ - 3.8619390850014286, - 0.45521810719710687 + 3.861939083981773, + 0.45521810705929344 ], "pj": [ - 3.12094248009962, - 0.5658461016927734 - ] + 3.120942480464614, + 0.5658461018210932 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9984091375556265, - -0.056384342200915524 + "distance": 0.32546774925399863, + "i": 7, + "j": 13, + "normal": [ + -0.9984091375295978, + -0.05638434266181124 ], "pi": [ - 4.423084214975121, - 0.4294470061168585 + 4.423084213922091, + 0.42944700593486274 ], "pj": [ - 4.748034189310962, - 0.4477982910379764 - ] + 4.748034188748475, + 0.4477982910341686 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.8617249181923546, - -0.5073757634794747 + "distance": 1.346017228690501, + "i": 7, + "j": 14, + "normal": [ + 0.8617249181221633, + -0.5073757635986873 ], "pi": [ - 3.8978853174743944, - 0.5567820207658647 + 3.8978853164485328, + 0.5567820204873967 ], "pj": [ - 2.73798873047779, - 1.2397185402518587 - ] + 2.73798873026419, + 1.2397185397112291 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.5971812531166999, - -0.8021063214599221 + "distance": 0.6693902523342828, + "i": 7, + "j": 15, + "normal": [ + -0.5971812531841185, + -0.8021063214097278 ], "pi": [ - 4.309799668679806, - 0.6399976167777666 + 4.309799667653161, + 0.6399976164514676 ], "pj": [ - 4.709546978158394, - 1.1769197693837727 - ] + 4.709546977411381, + 1.1769197693388493 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.33905252927393914, - -0.940767443310484 + "distance": 1.7094343001934322, + "i": 7, + "j": 17, + "normal": [ + -0.33905252936488306, + -0.9407674432777079 ], "pi": [ - 4.236918404688876, - 0.6791478425892312 + 4.2369184036688745, + 0.6791478422678497 ], "pj": [ - 4.816506427664493, - 2.2873279783215446 - ] + 4.816506426932548, + 2.2873279783120415 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9999891996464548, - -0.00464764353652613 + "distance": 1.3384209251760815, + "i": 8, + "j": 9, + "normal": [ + -0.9999891996458419, + -0.004647643668415871 ], "pi": [ - 2.1569862365885473, - 1.414758406880712 + 2.156986235331831, + 1.4147584062907081 ], "pj": [ - 3.4953927032840495, - 1.4209789102285293 - ] + 3.4953927050879083, + 1.4209789098292778 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.2176964443082074, - -0.9760165255442981 + "distance": 0.4642126246479358, + "i": 8, + "j": 10, + "normal": [ + -0.21769644489535533, + -0.9760165254133372 ], "pi": [ - 1.8817549531559323, - 1.7565116728506958 + 1.8817549521060062, + 1.7565116721682141 ], "pj": [ - 1.982812390792672, - 2.209590865191466 - ] + 1.9828123901674037, + 2.209590865130098 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9162982877991246, - -0.40049650157821914 + "distance": 1.9196808257509157, + "i": 8, + "j": 11, + "normal": [ + -0.9162982877367325, + -0.4004965017209669 ], "pi": [ - 2.127541560126694, - 1.554028505575468 + 2.1275415588482423, + 1.5540285049892844 ], "pj": [ - 3.8865418127369953, - 2.3228539599345717 - ] + 3.886541812484842, + 2.322853960123344 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.785187336958141, - 0.6192583030372565 + "distance": 0.6434138134766486, + "i": 8, + "j": 12, + "normal": [ + -0.7851873378025542, + 0.6192583019665843 ], "pi": [ - 2.0814132596588832, - 1.1952517921959127 + 2.0814132586994694, + 1.1952517919361973 ], "pj": [ - 2.5866136378701405, - 0.7968124463489977 - ] + 2.5866136380085885, + 0.7968124463408032 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9997437470534325, - 0.02263714265454958 + "distance": 4.623407446137086e-05, + "i": 8, + "j": 14, + "normal": [ + -0.9997437470587868, + 0.02263714241808224 ], "pi": [ - 2.1568998798739565, - 1.4051588974000095 + 2.1568998786193396, + 1.405158896846799 ], "pj": [ - 2.1569461010395448, - 1.4051578508167004 - ] + 2.1569461008461834, + 1.4051578502394708 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.6237620764326376, - -0.7816142731580867 + "distance": 0.8222329848578661, + "i": 8, + "j": 16, + "normal": [ + -0.6237620768717806, + -0.7816142728076315 ], "pi": [ - 2.024619583212693, - 1.6881158184070313 + 2.024619582110695, + 1.6881158176473257 ], "pj": [ - 2.537497336560458, - 2.330784854483255 - ] + 2.537497336418121, + 2.3307848541854552 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.8517758708773745, - -0.523906352119432 + "distance": 1.4679319433039606, + "i": 9, + "j": 10, + "normal": [ + 0.851775871125042, + -0.5239063517167699 ], "pi": [ - 3.536878958703373, - 1.5689259690308521 + 3.536878960437736, + 1.5689259685558092 ], "pj": [ - 2.28652995106592, - 2.337984837524904 - ] + 2.2865299506777297, + 2.337984837540696 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.32780353592621475, - -0.9447459139018655 + "distance": 0.524202129917342, + "i": 9, + "j": 11, + "normal": [ + -0.327803534015126, + -0.9447459145649661 ], "pi": [ - 3.8670539366520287, - 1.6867227805299305 + 3.867053937920785, + 1.6867227803532039 ], "pj": [ - 4.038889248419515, - 2.181960600944801 - ] + 4.038889248645946, + 2.1819606009988664 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.7609209754357911, - 0.6488445647008567 + "distance": 0.6703294985323599, + "i": 9, + "j": 12, + "normal": [ + 0.7609209761773967, + 0.6488445638311519 ], "pi": [ - 3.562310068237779, - 1.240662347381446 + 3.5623100698338845, + 1.2406623472625498 ], "pj": [ - 3.0522422928340402, - 0.8057226961118373 - ] + 3.0522422934501363, + 0.8057226961641663 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.7896330916190559, - 0.6135793189312461 + "distance": 1.0214328485713664, + "i": 9, + "j": 13, + "normal": [ + -0.7896330911964226, + 0.6135793194751451 ], "pi": [ - 3.9963242193370427, - 1.2505334096237812 + 3.9963242210224315, + 1.2505334091092046 ], "pj": [ - 4.802881399147703, - 0.6238033367330668 - ] + 4.802881398689407, + 0.6238033369932269 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.9998286129602167, - 0.01851336560566296 + "distance": 0.7144634050125388, + "i": 9, + "j": 14, + "normal": [ + 0.9998286129587416, + 0.018513365685341412 ], "pi": [ - 3.495437652954484, - 1.4170977688216737 + 3.4954376547585846, + 1.4170977684370367 ], "pj": [ - 2.7810966997072692, - 1.4038706466297926 - ] + 2.7810966995151185, + 1.4038706461512453 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9994132123760724, - -0.03425245871670736 + "distance": 0.5120644443486682, + "i": 9, + "j": 15, + "normal": [ + -0.9994132123645447, + -0.03425245905306135 ], "pi": [ - 4.055043578411567, - 1.431867401778637 + 4.055043580212027, + 1.431867401510451 ], "pj": [ - 4.5668075521951925, - 1.4494068681051295 - ] + 4.566807551476195, + 1.4494068679230325 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.7174417590581308, - -0.6966184912558487 + "distance": 1.0500574988115274, + "i": 9, + "j": 16, + "normal": [ + 0.7174417596446495, + -0.6966184906517979 ], "pi": [ - 3.574480295376298, - 1.617269663742646 + 3.5744802970158136, + 1.6172696632112324 ], "pj": [ - 2.8211251972658506, - 2.3487591333750926 - ] + 2.821125197340413, + 2.3487591331309217 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.7192711801722905, - -0.6947294216985203 + "distance": 1.0464599599741178, + "i": 9, + "j": 17, + "normal": [ + -0.719271179281164, + -0.6947294226211262 ], "pi": [ - 3.9766292819497293, - 1.6167408960345655 + 3.9766292835039825, + 1.616740895930477 ], "pj": [ - 4.729317773491831, - 2.343747419948006 - ] + 4.729317772985087, + 2.3437474197194224 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9995805908354363, - 0.028959323629537 + "distance": 1.537121915169803, + "i": 10, + "j": 11, + "normal": [ + -0.999580590840026, + 0.028959323471111884 ], "pi": [ - 2.328504753316639, - 2.4785439729255803 + 2.328504752859417, + 2.4785439728720116 ], "pj": [ - 3.864981985287495, - 2.43402996193136 - ] + 3.864981985018001, + 2.434029962116074 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.38318517030099924, - 0.9236715462010261 + "distance": 1.4463649591893444, + "i": 10, + "j": 12, + "normal": [ + -0.3831851707304297, + 0.9236715460228768 ], "pi": [ - 2.153455702836229, - 2.2244562237360053 + 2.153455702499657, + 2.2244562236880383 ], "pj": [ - 2.7076813060617115, - 0.8884900654597019 - ] + 2.7076813063251364, + 0.8884900657203012 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.3631883863614051, - 0.9317157270392074 + "distance": 0.5723336634512807, + "i": 10, + "j": 14, + "normal": [ + -0.3631883864423987, + 0.9317157270076356 ], "pi": [ - 2.147776851364145, - 2.2221717709793714 + 2.147776850928621, + 2.222171770889778 ], "pj": [ - 2.35564179088113, - 1.6889194960695977 - ] + 2.355641790664158, + 1.6889194955563247 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9998890683460326, - -0.014894663544466292 + "distance": 0.1293787793804434, + "i": 10, + "j": 16, + "normal": [ + -0.9998890683526933, + -0.014894663097339654 ], "pi": [ - 2.3285923573018823, - 2.4909979895500607 + 2.3285923568452485, + 2.490997989324522 ], "pj": [ - 2.4579567840754475, - 2.492925042932695 - ] + 2.4579567840245686, + 2.4929250426553384 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.5822365538977458, - 0.8130194310748529 + "distance": 1.67387832393714, + "i": 11, + "j": 12, + "normal": [ + 0.5822365537209016, + 0.8130194312014981 ], "pi": [ - 3.9730225304622784, - 2.216061485967658 + 3.9730225302397537, + 2.216061486160599 ], "pj": [ - 2.9984293832229807, - 0.8551658829803163 - ] + 2.998429383562475, + 0.8551658833327078 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.41144877913893746, - 0.9114328840595329 + "distance": 1.6331785167082835, + "i": 11, + "j": 13, + "normal": [ + -0.411448779004014, + 0.9114328841204414 ], "pi": [ - 4.230264267761853, - 2.1905845600457834 + 4.230264267458619, + 2.1905845602557417 ], "pj": [ - 4.902233574587706, - 0.7020519543554906 - ] + 4.9022335740538265, + 0.7020519544887653 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.8493272062096253, - 0.5278667415097796 + "distance": 1.3772785769219476, + "i": 11, + "j": 14, + "normal": [ + 0.8493272060308811, + 0.5278667417973758 ], "pi": [ - 3.903879048986892, - 2.289880803633543 + 3.9038790487648596, + 2.289880803784818 ], "pj": [ - 2.734118883349038, - 1.5628612492513505 - ] + 2.734118883101554, + 1.5628612488377032 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.6371509946532368, - 0.7707390025244545 + "distance": 0.6382627108653971, + "i": 11, + "j": 15, + "normal": [ + -0.637150994324312, + 0.7707390027963688 ], "pi": [ - 4.288693257403705, - 2.2270068934648557 + 4.288693257050249, + 2.22700689362019 ], "pj": [ - 4.6953629785246305, - 1.7350729282919293 - ] + 4.6953629779182675, + 1.7350729283256872 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.9988587431019031, - -0.047762028106921234 + "distance": 0.9856565635281955, + "i": 11, + "j": 16, + "normal": [ + 0.9988587431211424, + -0.04776202770456414 ], "pi": [ - 3.8651688546704537, - 2.438897539427862 + 3.865168854397168, + 2.4388975395494272 ], "pj": [ - 2.8806371782476914, - 2.485974495930671 - ] + 2.88063717820229, + 2.485974495643847 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9951042836242233, - -0.09883048473381706 + "distance": 0.28610773120395455, + "i": 11, + "j": 17, + "normal": [ + -0.9951042836494702, + -0.09883048447961261 ], "pi": [ - 4.381358936231425, - 2.4521179604878807 + 4.381358935969656, + 2.4521179606478003 ], "pj": [ - 4.666065965592822, - 2.4803941262947773 - ] + 4.666065964875942, + 2.48039412633605 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9977276148627797, - 0.06737660232030512 + "distance": 1.6283540875255265, + "i": 12, + "j": 13, + "normal": [ + -0.9977276148547473, + 0.0673766024392516 ], "pi": [ - 3.123559390167397, - 0.5900242900018728 + 3.123559390557731, + 0.5900242902803016 ], "pj": [ - 4.748213231010768, - 0.4803113241462423 - ] + 4.748213230443553, + 0.48031132429476386 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.40995496729022685, - -0.912105764039494 + "distance": 0.25038587152580777, + "i": 12, + "j": 14, + "normal": [ + 0.40995496820718136, + -0.9121057636273597 ], "pi": [ - 2.699619267674213, - 0.8850068944888785 + 2.699619267790814, + 0.8850068946790102 ], "pj": [ - 2.596972335695394, - 1.1133852916033324 - ] + 2.596972335789924, + 1.113385291228559 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9266547519599284, - -0.3759135148808614 + "distance": 1.6084439918604283, + "i": 12, + "j": 15, + "normal": [ + -0.9266547519482877, + -0.37591351490955643 ], "pi": [ - 3.1021549637810932, - 0.7235263088297607 + 3.10215496417034, + 0.7235263091526535 ], "pj": [ - 4.592627233189436, - 1.3281621437409847 - ] + 4.592627232470479, + 1.3281621436680662 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.08122368989756461, - -0.9966958975532226 + "distance": 1.3793763791422493, + "i": 12, + "j": 16, + "normal": [ + 0.08122369015911336, + -0.9966958975319083 ], "pi": [ - 2.798620548056638, - 0.9104822054845408 + 2.7986205483706224, + 0.9104822057923726 ], "pj": [ - 2.6865825087325317, - 2.285300984403275 - ] + 2.686582508738372, + 2.2853009840358705 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.08860033373396232, - -0.9960672571981425 + "distance": 0.38531840305473647, + "i": 13, + "j": 15, + "normal": [ + 0.0886003339019178, + -0.9960672571832027 ], "pi": [ - 4.987048555880971, - 0.7242861105878804 + 4.987048555267522, + 0.7242861107012291 ], "pj": [ - 4.952909216761805, - 1.1080891556316064 - ] + 4.952909216098319, + 1.1080891555741723 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.05679251244156703, - -0.9983860027717608 + "distance": 1.551724572678937, + "i": 13, + "j": 17, + "normal": [ + 0.056792512514434235, + -0.9983860027676158 ], "pi": [ - 4.995404736021501, - 0.7248952644037013 + 4.995404735433033, + 0.7248952645198858 ], "pj": [ - 4.907278398914591, - 2.274115358049165 - ] + 4.90727839822021, + 2.2741153580330966 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9996652758363981, - -0.025871534298108602 + "distance": 1.7862702948162328, + "i": 14, + "j": 15, + "normal": [ + -0.9996652758316074, + -0.025871534483220413 ], "pi": [ - 2.7810457153239807, - 1.4061674404274707 + 2.7810457151307952, + 1.4061674399818336 ], "pj": [ - 4.5667181028294594, - 1.4523809936389496 - ] + 4.566718102108071, + 1.4523809935105236 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.17954843544844518, - -0.983749134346768 + "distance": 0.5925063004501714, + "i": 14, + "j": 16, + "normal": [ + -0.17954843555094968, + -0.9837491343280595 ], "pi": [ - 2.5250527704614454, - 1.705161310055021 + 2.525052770301751, + 1.7051613095457632 ], "pj": [ - 2.6314363496728066, - 2.2880388700654954 - ] + 2.6314363496016595, + 2.2880388696975404 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.9087102486697471, - -0.41742745952149146 + "distance": 1.9119647115415765, + "i": 15, + "j": 16, + "normal": [ + 0.9087102486697075, + -0.4174274595215777 ], "pi": [ - 4.598995170992169, - 1.6096938138941694 + 4.598995170269095, + 1.6096938138314645 ], "pj": [ - 2.8615732418459228, - 2.4078003864371014 - ] + 2.861573241796444, + 2.4078003860651718 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.026119439833196558, - -0.9996588292326537 + "distance": 0.45767027860589937, + "i": 15, + "j": 17, + "normal": [ + 0.026119439820542698, + -0.9996588292329845 ], "pi": [ - 4.912198790231412, - 1.8163093489783655 + 4.912198789512814, + 1.8163093489157474 ], "pj": [ - 4.900244698927109, - 2.2738234838187497 - ] + 4.900244698213117, + 2.2738234838016544 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.999995075530531, - -0.003138298055859427 + "distance": 1.7840757524458766, + "i": 16, + "j": 17, + "normal": [ + -0.9999950755300276, + -0.003138298216302308 ], "pi": [ - 2.8808774814195535, - 2.4967385201876353 + 2.8808774813699767, + 2.4967385198496532 ], "pj": [ - 4.664944448899356, - 2.502337481655114 - ] + 4.664944448188382, + 2.502337481601303 + ], + "property": { + "type": "no friction" + } } ], "objects": [ { "id": 0, "position": [ - 1.1479985442534066, - 0.5863959833765492 - ], + 1.1830093503118508, + 0.5863959837140823 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 3.501080524810415, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 0.0, + "velocity": [ + 3.501080524810415, + 0.0 + ] + }, "quaternion": [ 1.0, 0.0, @@ -1664,20 +2385,39 @@ { "id": 1, "position": [ - 3.4681090528916227, - 0.34949726613469706 - ], + 3.466934018894761, + 0.32829172751644364 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + -2.459371340296271, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": -7.95096442532624e-15, + "velocity": [ + -0.11750339336230857, + -2.1205540027852026 + ] + }, "quaternion": [ 1.0, 0.0, 0.0, - 0.0 + -1.198305648897958e-16 ], "radius": 0.39344524019285204, "rotation": [ 1.0, - -0.0, - 0.0, + 2.396611297795916e-16, + -2.396611297795916e-16, 1.0 ], "type": "sphere" @@ -1685,20 +2425,39 @@ { "id": 2, "position": [ - 1.0685427418486737, - 1.4955261538546651 - ], + 1.0709133407815186, + 1.4989872992873317 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 3.3310665544096913, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 3.5576007905223465e-15, + "velocity": [ + 0.23706006346384534, + 0.34611448599408184 + ] + }, "quaternion": [ 1.0, 0.0, 0.0, - 0.0 + 1.3268197252916262e-17 ], "radius": 0.3893753808406301, "rotation": [ 1.0, - -0.0, - 0.0, + -2.6536394505832524e-17, + 2.6536394505832524e-17, 1.0 ], "type": "sphere" @@ -1706,20 +2465,39 @@ { "id": 3, "position": [ - 3.1369018931541905, - 1.4948567913561492 - ], + 3.1340652906650277, + 1.5101335321769092 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + -4.251076644943347, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 2.6105909481982955e-16, + "velocity": [ + -0.28366034824557285, + 1.5276740791699845 + ] + }, "quaternion": [ 1.0, 0.0, 0.0, - 0.0 + -3.050798503088662e-17 ], "radius": 0.3624479286096065, "rotation": [ 1.0, - -0.0, - 0.0, + 6.101597006177323e-17, + -6.101597006177323e-17, 1.0 ], "type": "sphere" @@ -1727,20 +2505,39 @@ { "id": 4, "position": [ - 1.3884561653116, - 2.407697954958194 - ], + 1.4306658615828514, + 2.4069882047681297 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 4.809969498921527, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 4.395694879295905e-16, + "velocity": [ + 4.220969399663074, + -0.07097496231415351 + ] + }, "quaternion": [ 1.0, 0.0, 0.0, - 0.0 + 2.1978474396479525e-18 ], "radius": 0.3676270372195159, "rotation": [ 1.0, - -0.0, - 0.0, + -4.395694879295905e-18, + 4.395694879295905e-18, 1.0 ], "type": "sphere" @@ -1748,20 +2545,39 @@ { "id": 5, "position": [ - 3.2303978929022623, - 2.6531147231999115 - ], + 3.225200483677634, + 2.6641361952966367 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + -4.456930445035487, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 1.1691119589323087e-14, + "velocity": [ + -0.5197409029919585, + 1.1021471940975907 + ] + }, "quaternion": [ 1.0, 0.0, 0.0, - 0.0 + 1.549397711323601e-16 ], "radius": 0.37073704088974313, "rotation": [ 1.0, - -0.0, - 0.0, + -3.098795422647202e-16, + 3.098795422647202e-16, 1.0 ], "type": "sphere" @@ -1769,20 +2585,39 @@ { "id": 6, "position": [ - 2.187749450975476, - 0.5618726658249886 - ], + 2.2064742661555705, + 0.5606765807991398 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 3.4411569528519603, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 4.18962213058566e-16, + "velocity": [ + 1.8724813577623771, + -0.11960847953611273 + ] + }, "quaternion": [ 1.0, 0.0, 0.0, - 0.0 + -2.215473701747818e-19 ], "radius": 0.3357205790374923, "rotation": [ 1.0, - -0.0, - 0.0, + 4.430947403495636e-19, + -4.430947403495636e-19, 1.0 ], "type": "sphere" @@ -1790,20 +2625,39 @@ { "id": 7, "position": [ - 4.141188737238698, - 0.4135271887957801 - ], + 4.137453792248542, + 0.4157624156788433 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + -2.7231552884718613, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": -2.2840496778171467e-18, + "velocity": [ + -0.37349439444757815, + 0.2235227195190354 + ] + }, "quaternion": [ 1.0, 0.0, 0.0, - 0.0 + 1.0406364654880528e-18 ], "radius": 0.2823446492352602, "rotation": [ 1.0, - -0.0, - 0.0, + -2.0812729309761056e-18, + 2.0812729309761056e-18, 1.0 ], "type": "sphere" @@ -1811,20 +2665,39 @@ { "id": 8, "position": [ - 1.805163585848999, - 1.4131232429516503 - ], + 1.8068896155999503, + 1.410945919818437 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 2.748452619769528, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": -4.930312885801841e-15, + "velocity": [ + 0.17260310074518173, + -0.21773224968071225 + ] + }, "quaternion": [ 1.0, 0.0, 0.0, - 0.0 + -3.442397615612428e-17 ], "radius": 0.3518264505896014, "rotation": [ 1.0, - -0.0, - 0.0, + 6.884795231224856e-17, + -6.884795231224856e-17, 1.0 ], "type": "sphere" @@ -1832,20 +2705,39 @@ { "id": 9, "position": [ - 3.7752987528791815, - 1.4222798278211346 - ], + 3.7700960012495686, + 1.4180902579468582 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + -4.205477752913589, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 1.0955588059861932e-17, + "velocity": [ + -0.5202753433300253, + -0.4189569511942133 + ] + }, "quaternion": [ 1.0, 0.0, 0.0, - 0.0 + -8.34166963704692e-19 ], "radius": 0.279909072712078, "rotation": [ 1.0, - -0.0, - 0.0, + 1.668333927409384e-18, + -1.668333927409384e-18, 1.0 ], "type": "sphere" @@ -1853,20 +2745,39 @@ { "id": 10, "position": [ - 2.0446356208161407, - 2.486768080268088 - ], + 2.077295895612241, + 2.48747782979267 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 2.6770274262041323, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": -3.1928858656815528e-18, + "velocity": [ + 3.266027525462585, + 0.07097496231415351 + ] + }, "quaternion": [ 1.0, 0.0, 0.0, - 0.0 + -1.5964429328407765e-20 ], "radius": 0.28398823977088655, "rotation": [ 1.0, - -0.0, - 0.0, + 3.192885865681553e-20, + -3.192885865681553e-20, 1.0 ], "type": "sphere" @@ -1874,9 +2785,28 @@ { "id": 11, "position": [ - 4.123749866032647, - 2.4265330748647904 - ], + 4.102077908961365, + 2.426533075090517 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + -2.1671956802975867, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 0.0, + "velocity": [ + -2.1671956802975867, + 0.0 + ] + }, "quaternion": [ 1.0, 0.0, @@ -1895,20 +2825,39 @@ { "id": 12, "position": [ - 2.823082015067089, - 0.6103155441546076 - ], + 2.8398827105121214, + 0.6304819420968812 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 4.8029227510966415, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": -1.1510326805864534e-15, + "velocity": [ + 1.680069505227979, + 2.01663976280228 + ] + }, "quaternion": [ 1.0, 0.0, 0.0, - 0.0 + -8.859023229004783e-19 ], "radius": 0.30116173054068834, "rotation": [ 1.0, - -0.0, - 0.0, + 1.7718046458009566e-18, + -1.7718046458009566e-18, 1.0 ], "type": "sphere" @@ -1916,9 +2865,28 @@ { "id": 13, "position": [ - 5.010324603064029, - 0.4626109283514532 - ], + 4.9891247206422475, + 0.46261092846872653 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + -2.119988185245589, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 0.0, + "velocity": [ + -2.119988185245589, + 0.0 + ] + }, "quaternion": [ 1.0, 0.0, @@ -1937,20 +2905,39 @@ { "id": 14, "position": [ - 2.4690081552647065, - 1.398091846893808 - ], + 2.4704571244287576, + 1.3857208527474982 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 2.127659631885261, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": -2.2860311393668087e-16, + "velocity": [ + 0.14489693557411507, + -1.237099364289141 + ] + }, "quaternion": [ 1.0, 0.0, 0.0, - 0.0 + 1.2730450823239416e-18 ], "radius": 0.31214204154305475, "rotation": [ 1.0, - -0.0, - 0.0, + -2.5460901646478832e-18, + 2.5460901646478832e-18, 1.0 ], "type": "sphere" @@ -1958,9 +2945,28 @@ { "id": 15, "position": [ - 4.92146775497289, - 1.4615619845311179 - ], + 4.8861968846197, + 1.4615619844683823 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + -3.5270869630101496, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 0.0, + "velocity": [ + -3.5270869630101496, + 0.0 + ] + }, "quaternion": [ 1.0, 0.0, @@ -1979,20 +2985,39 @@ { "id": 16, "position": [ - 2.669405923940098, - 2.4960748561417345 - ], + 2.6707405224574607, + 2.485053383828847 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 4.070649398726842, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 3.8789074458688093e-16, + "velocity": [ + 0.13345985668331325, + -1.1021471940975907 + ] + }, "quaternion": [ 1.0, 0.0, 0.0, - 0.0 + 6.176994984934309e-19 ], "radius": 0.211472598869812, "rotation": [ 1.0, - -0.0, - 0.0, + -1.2353989969868619e-18, + 1.2353989969868619e-18, 1.0 ], "type": "sphere" @@ -2000,9 +3025,28 @@ { "id": 17, "position": [ - 4.894255201038408, - 2.503057130686629 - ], + 4.867575935989778, + 2.50305713066961 + ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + -2.66792643375405, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 0.0, + "velocity": [ + -2.66792643375405, + 0.0 + ] + }, "quaternion": [ 1.0, 0.0, diff --git a/test/references/3spheres_friction_fp.json b/test/references/3spheres_friction_fp.json index 6ca8010c..1bbb3515 100644 --- a/test/references/3spheres_friction_fp.json +++ b/test/references/3spheres_friction_fp.json @@ -7,6 +7,25 @@ -21.365373837444146, -35.86004367004577 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 0.0, + 0.0 + ], + "force": [ + 1.7, + -1.3 + ], + "mass": 1.0, + "moment_inertia": 1.0, + "omega": 1.8490470234378233, + "velocity": [ + -2.416353080677564, + -10.341054438534952 + ] + }, "quaternion": [ -0.9149002616907835, 0.0, @@ -28,6 +47,25 @@ -24.13322557791232, -33.18749332899189 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 0.0, + 0.0 + ], + "force": [ + -0.5, + -1.7 + ], + "mass": 1.0, + "moment_inertia": 1.0, + "omega": -0.13877512798659764, + "velocity": [ + -6.138129089478195, + -10.240053601431724 + ] + }, "quaternion": [ 0.9889273447972833, 0.0, @@ -49,6 +87,25 @@ -33.20640058464355, -33.50746300096231 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 0.0, + 0.0 + ], + "force": [ + -4.5, + -1.3 + ], + "mass": 1.0, + "moment_inertia": 1.0, + "omega": -0.2855612840954528, + "velocity": [ + -14.545517829844236, + -9.518891960033335 + ] + }, "quaternion": [ 0.15719242123993657, 0.0, diff --git a/test/references/3spheres_nofriction.json b/test/references/3spheres_nofriction.json index c3de440b..8dc94f36 100644 --- a/test/references/3spheres_nofriction.json +++ b/test/references/3spheres_nofriction.json @@ -7,6 +7,25 @@ -11.636808117850325, -27.862133163298207 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 0.0, + 0.0 + ], + "force": [ + 1.7, + -1.3 + ], + "mass": 1.0, + "moment_inertia": 1.0, + "omega": 2.2518672376164648e-17, + "velocity": [ + 0.1340324738775849, + -9.174583083044446 + ] + }, "quaternion": [ 1.0, 0.0, @@ -28,6 +47,25 @@ -12.707591540049785, -22.78358576876021 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 0.0, + 0.0 + ], + "force": [ + -0.5, + -1.7 + ], + "mass": 1.0, + "moment_inertia": 1.0, + "omega": -1.0990013249084516e-16, + "velocity": [ + -3.874703857365325, + -8.83784649609858 + ] + }, "quaternion": [ 1.0, 0.0, @@ -49,6 +87,25 @@ -32.74560034209989, -23.744281067941547 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 0.0, + 0.0 + ], + "force": [ + -4.5, + -1.3 + ], + "mass": 1.0, + "moment_inertia": 1.0, + "omega": -1.5150294784380312e-17, + "velocity": [ + -16.05932861651225, + -7.787570420856969 + ] + }, "quaternion": [ 1.0, 0.0, diff --git a/test/references/3spheres_viscous.json b/test/references/3spheres_viscous.json index 61a54926..ce9a37d5 100644 --- a/test/references/3spheres_viscous.json +++ b/test/references/3spheres_viscous.json @@ -7,6 +7,25 @@ -6.8567417870701775, -40.37784940614346 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 0.0, + 0.0 + ], + "force": [ + 1.7, + -1.3 + ], + "mass": 1.0, + "moment_inertia": 1.0, + "omega": -4.764723538426645e-17, + "velocity": [ + 2.498068593322216, + -11.853119377536645 + ] + }, "quaternion": [ 1.0, 0.0, @@ -28,6 +47,25 @@ -21.53351332003981, -38.45671360463534 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 0.0, + 0.0 + ], + "force": [ + -0.5, + -1.7 + ], + "mass": 1.0, + "moment_inertia": 1.0, + "omega": -2.6212798394317093e-16, + "velocity": [ + -5.442425903902412, + -11.46024106885052 + ] + }, "quaternion": [ 1.0, 0.0, @@ -49,6 +87,25 @@ -50.314744892890005, -23.7204369892212 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 0.0, + 0.0 + ], + "force": [ + -4.5, + -1.3 + ], + "mass": 1.0, + "moment_inertia": 1.0, + "omega": -4.2342101089895316e-17, + "velocity": [ + -20.155642689419786, + -6.7866395536128445 + ] + }, "quaternion": [ 1.0, 0.0, diff --git a/test/references/3spheres_viscous_friction.json b/test/references/3spheres_viscous_friction.json index 5257dafc..a2bcf421 100644 --- a/test/references/3spheres_viscous_friction.json +++ b/test/references/3spheres_viscous_friction.json @@ -7,6 +7,25 @@ -20.33600774003362, -34.6360017758243 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 0.0, + 0.0 + ], + "force": [ + 1.7, + -1.3 + ], + "mass": 1.0, + "moment_inertia": 1.0, + "omega": 0.030262191384878456, + "velocity": [ + -1.9310766776039046, + -10.587128696359809 + ] + }, "quaternion": [ 0.4681218665331154, 0.0, @@ -28,6 +47,25 @@ -25.426990248507018, -36.81063538940381 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 0.0, + 0.0 + ], + "force": [ + -0.5, + -1.7 + ], + "mass": 1.0, + "moment_inertia": 1.0, + "omega": -0.01661125758663226, + "velocity": [ + -7.086427110163436, + -11.675501834731135 + ] + }, "quaternion": [ 0.994600709033045, 0.0, @@ -49,6 +87,25 @@ -32.942002011459394, -31.10836283477188 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 0.0, + 0.0 + ], + "force": [ + -4.5, + -1.3 + ], + "mass": 1.0, + "moment_inertia": 1.0, + "omega": -1.9219033672259802, + "velocity": [ + -14.082496212232655, + -7.837369468909055 + ] + }, "quaternion": [ -0.6962576837026954, 0.0, diff --git a/test/references/obstacles_sphere_sphere_moving.json b/test/references/obstacles_sphere_sphere_moving.json index bd07da17..3e22699f 100644 --- a/test/references/obstacles_sphere_sphere_moving.json +++ b/test/references/obstacles_sphere_sphere_moving.json @@ -1,18 +1,24 @@ { "contacts": [ { - "nij": [ - -0.7580939827349764, - -0.6521453161228878 + "distance": 5.277971842954761e-05, + "i": 0, + "j": 1, + "normal": [ + -0.7580939826234889, + -0.6521453162524876 ], "pi": [ - 0.7580939827349763, - 0.6521453161228877 + 0.7580939826234889, + 0.6521453162524876 ], "pj": [ - 0.7581339941055966, - 0.6521797356388527 - ] + 0.7581339946104348, + 0.6521797362986547 + ], + "property": { + "type": "no friction" + } } ], "objects": [ @@ -22,6 +28,25 @@ 0.0, 0.0 ], + "properties": { + "active": false, + "desired_omega": 0.0, + "desired_velocity": [ + 0.0, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.0, + "omega": 0.0, + "velocity": [ + 0.0, + 0.0 + ] + }, "quaternion": [ 1.0, 0.0, @@ -40,20 +65,39 @@ { "id": 1, "position": [ - 1.5162279768405729, - 1.3043250517617404 + 1.5257872588650372, + 1.2931318206545854 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 0.0, + 0.0 + ], + "force": [ + 0.0, + -10.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": -6.405502592001725e-16, + "velocity": [ + 1.911856326222684, + -2.2386463793113918 + ] + }, "quaternion": [ 1.0, 0.0, 0.0, - 5.960396976180292e-19 + -1.074744354435352e-16 ], "radius": 1.0, "rotation": [ 1.0, - -1.1920793952360584e-18, - 1.1920793952360584e-18, + 2.149488708870704e-16, + -2.149488708870704e-16, 1.0 ], "type": "sphere" diff --git a/test/references/sphere_plane_friction_mu01.json b/test/references/sphere_plane_friction_mu01.json index 8c5b0c8b..df8b7c64 100644 --- a/test/references/sphere_plane_friction_mu01.json +++ b/test/references/sphere_plane_friction_mu01.json @@ -1,12 +1,10 @@ { "contacts": [ { - "dij": 0.04779107645199538, - "gamma": 0.0, - "gamma_min": -2.0, + "distance": 0.04779107645199538, "i": 0, "j": 1, - "nij": [ + "normal": [ -0.5, -0.8660254037844386 ], @@ -17,7 +15,11 @@ "pj": [ 69.85088692652799, -40.27324398845621 - ] + ], + "property": { + "mu": 0.1, + "type": "friction" + } } ], "objects": [ @@ -31,6 +33,25 @@ 0.0, 0.0 ], + "properties": { + "active": false, + "desired_omega": 0.0, + "desired_velocity": [ + 0.0, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.0, + "omega": 0.0, + "velocity": [ + 0.0, + 0.0 + ] + }, "quaternion": [ 0.8660254037844386, 0.0, @@ -51,6 +72,25 @@ 71.56701162523167, -38.95437061818806 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 0.0, + 0.0 + ], + "force": [ + 0.0, + -1.0 + ], + "mass": 1.0, + "moment_inertia": 2.0, + "omega": -1.732290999947742, + "velocity": [ + 7.161246987036821, + -4.131774373007218 + ] + }, "quaternion": [ -0.7187308518193297, 0.0, diff --git a/test/references/two_spheres_asymmetrical.json b/test/references/two_spheres_asymmetrical.json index 7fb08f5b..56e02efe 100644 --- a/test/references/two_spheres_asymmetrical.json +++ b/test/references/two_spheres_asymmetrical.json @@ -1,38 +1,63 @@ { "contacts": [ { - "nij": [ - 0.9950681086098943, - -0.09919404834730595 + "distance": 1.8163788408551433, + "i": 0, + "j": 1, + "normal": [ + 0.995068108607115, + -0.0991940483751868 ], "pi": [ - 0.9037103287962477, - -0.09008698527360623 + 0.9037103288418555, + -0.09008698530372541 ], "pj": [ - -0.9037103287962477, - 0.09008698527360623 - ] + -0.9037103288418555, + 0.09008698530372541 + ], + "property": { + "type": "no friction" + } } ], "objects": [ { "id": 0, "position": [ - 1.0032171396572371, - -0.10000639010833683 + 1.004467139702567, + -0.1000063901412441 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 0.25, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 0.0, + "velocity": [ + 0.25, + 0.0 + ] + }, "quaternion": [ 1.0, 0.0, 0.0, - 8.495586006726981e-20 + 6.051466338633739e-19 ], "radius": 0.1, "rotation": [ 1.0, - -1.6991172013453962e-19, - 1.6991172013453962e-19, + -1.2102932677267479e-18, + 1.2102932677267479e-18, 1.0 ], "type": "sphere" @@ -40,20 +65,39 @@ { "id": 1, "position": [ - -1.0032171396572371, - 0.10000639010833683 + -1.004467139702567, + 0.1000063901412441 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + -0.25, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 0.0, + "velocity": [ + -0.25, + 0.0 + ] + }, "quaternion": [ 1.0, 0.0, 0.0, - 8.495586006726981e-20 + 6.051466338633739e-19 ], "radius": 0.1, "rotation": [ 1.0, - -1.6991172013453962e-19, - 1.6991172013453962e-19, + -1.2102932677267479e-18, + 1.2102932677267479e-18, 1.0 ], "type": "sphere" diff --git a/test/references/two_spheres_symmetrical.json b/test/references/two_spheres_symmetrical.json index f00196e5..a100e161 100644 --- a/test/references/two_spheres_symmetrical.json +++ b/test/references/two_spheres_symmetrical.json @@ -1,27 +1,52 @@ { "contacts": [ { - "nij": [ + "distance": -1.638529312231185e-10, + "i": 0, + "j": 1, + "normal": [ -1.0, 0.0 ], "pi": [ - 4.759179161872851e-12, + 8.192646561155925e-11, 0.0 ], "pj": [ - -4.759179161872851e-12, + -8.192646561155925e-11, 0.0 - ] + ], + "property": { + "type": "no friction" + } } ], "objects": [ { "id": 0, "position": [ - -0.09999999999524083, + -0.09999999993013149, 0.0 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 0.25, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 0.0, + "velocity": [ + -2.411591536119473e-09, + 0.0 + ] + }, "quaternion": [ 1.0, 0.0, @@ -40,9 +65,28 @@ { "id": 1, "position": [ - 0.09999999999524083, + 0.09999999993013149, 0.0 ], + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + -0.25, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 0.0, + "velocity": [ + 2.411591536119473e-09, + 0.0 + ] + }, "quaternion": [ 1.0, 0.0, diff --git a/test/references/two_worms.json b/test/references/two_worms.json index e9469222..41a8356b 100644 --- a/test/references/two_worms.json +++ b/test/references/two_worms.json @@ -1,530 +1,918 @@ { "contacts": [ { - "nij": [ - -0.9989697228329812, - 0.04538163574615628 + "distance": -1.0491876371331912e-13, + "i": 0, + "j": 1, + "normal": [ + -0.9989697228415721, + 0.045381635557047766 ], "pi": [ - -2.8866029094108026, - 1.2328654906995704 + -2.886602911262152, + 1.2328654909285808 ], "pj": [ - -2.886602909904597, - 1.232865490722003 - ] + -2.8866029112622567, + 1.2328654909285857 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.6526491521985719, - 0.7576602696027326 + "distance": 0.745478549723078, + "i": 0, + "j": 9, + "normal": [ + -0.6526491525407759, + 0.7576602693079578 ], "pi": [ - -3.232923480045212, - 0.5205868568429942 + -3.232923481562948, + 0.5205868571776708 ], "pj": [ - -2.7463875370693276, - -0.04423262156241248 - ] + -2.7463875378488547, + -0.04423262156882224 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.103051321011439, - 0.9946760403456983 + "distance": 2.4797519725989045e-05, + "i": 0, + "j": 10, + "normal": [ + 0.10305132073464351, + 0.9946760403743752 ], "pi": [ - -3.988623953255223, - 0.28357108610002846 + -3.9886239548383675, + 0.28357108611125337 ], "pj": [ - -3.9886265086707495, - 0.28354642061711843 - ] + -3.9886265102555263, + 0.2835464206125212 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.7445047332715572, - 0.6676171823255058 + "distance": 0.9631434033018828, + "i": 0, + "j": 11, + "normal": [ + 0.7445047332561826, + 0.6676171823426508 ], "pi": [ - -4.630077365515341, - 0.6106299441202208 + -4.630077367359907, + 0.6106299441429774 ], "pj": [ - -5.347142188104989, - -0.032381140978449796 - ] + -5.347142189922627, + -0.032381140961337374 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9953428934448215, - 0.09639774099474852 + "distance": -7.417094489308363e-14, + "i": 1, + "j": 2, + "normal": [ + -0.9953428934323243, + 0.09639774112378686 ], "pi": [ - -0.8922902936267941, - 1.0910861139810981 + -0.8922902949883601, + 1.091086114247751 ], "pj": [ - -0.8922902944789745, - 1.0910861140636308 - ] + -0.8922902949884339, + 1.0910861142477581 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.633060756329092, - 0.7741021113496838 + "distance": 0.8189720674279445, + "i": 1, + "j": 8, + "normal": [ + -0.633060756648455, + 0.7741021110885085 ], "pi": [ - -1.254572430742524, - 0.413381743626163 + -1.2545724317722293, + 0.41338174428302943 ], "pj": [ - -0.7361133552949386, - -0.22058626171919915 - ] + -0.7361133550923452, + -0.22058626203546283 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.10305132119159666, - 0.9946760403270335 + "distance": 2.4797520654638967e-05, + "i": 1, + "j": 9, + "normal": [ + 0.10305132073507006, + 0.994676040374331 ], "pi": [ - -1.9906845082632123, - 0.19280781464881314 + -1.9906845091557543, + 0.1928078149972069 ], "pj": [ - -1.9906870636791592, - 0.19278314916188855 - ] + -1.9906870645730088, + 0.19278314949755104 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.7576521637847793, - 0.6526585621228317 + "distance": 0.9090455332286137, + "i": 1, + "j": 10, + "normal": [ + 0.7576521637058462, + 0.6526585622144628 ], "pi": [ - -2.645285350856395, - 0.5348252928530149 + -2.64528535212653, + 0.5348252931570752 ], "pj": [ - -3.3340256658974092, - -0.05847105760574811 - ] + -3.334025667284324, + -0.058471057547391236 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9953428934443604, - 0.09639774099950996 + "distance": -4.948033209771795e-13, + "i": 2, + "j": 3, + "normal": [ + -0.9953428934323406, + 0.09639774112361955 ], "pi": [ - 1.0983954924102073, - 0.8982906320693723 + 1.0983954918762309, + 0.8982906320003518 ], "pj": [ - 1.0983954914263956, - 0.8982906321646533 - ] + 1.0983954918757384, + 0.8982906320003995 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.6330607563290916, - 0.774102111349684 + "distance": 0.8189720674279445, + "i": 2, + "j": 7, + "normal": [ + -0.633060756648455, + 0.7741021110885085 ], "pi": [ - 0.7361133552949387, - 0.22058626171919837 + 0.7361133550923452, + 0.22058626203546283 ], "pj": [ - 1.2545724307425243, - -0.41338174362616453 - ] + 1.2545724317722293, + -0.41338174428302943 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.10305132125733417, - 0.9946760403202229 + "distance": 2.4797520321123762e-05, + "i": 2, + "j": 8, + "normal": [ + 0.10305132073528021, + 0.9946760403743092 ], "pi": [ - 1.2777085128534704e-06, - 1.2332748659305004e-05 + 1.2777086100257407e-06, + 1.233274966205844e-05 ], "pj": [ - -1.2777085125342813e-06, - -1.2332748659860115e-05 - ] + -1.2777086100257407e-06, + -1.233274966205844e-05 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.7740942617052134, - 0.6330703546961117 + "distance": 0.8378856327294941, + "i": 2, + "j": 9, + "normal": [ + 0.774094261733544, + 0.6330703546614701 ], "pi": [ - -0.6710416627393663, - 0.36161801837277063 + -0.6710416632896538, + 0.3616180184625012 ], "pj": [ - -1.3196441231655425, - -0.16882253646903334 - ] + -1.3196441235745349, + -0.16882253621530985 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.9989697228333649, - 0.04538163573770926 + "distance": -1.0144533687770893e-12, + "i": 3, + "j": 4, + "normal": [ + -0.9989697228415522, + 0.04538163555748598 ], "pi": [ - 3.0927081077041207, - 0.7565112554274341 + 3.092708108149631, + 0.756511255319294 ], "pj": [ - 3.0927081068488245, - 0.756511255466289 - ] + 3.0927081081486176, + 0.7565112553193399 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.6526491521985722, - 0.7576602696027323 + "distance": 0.745478549723078, + "i": 3, + "j": 6, + "normal": [ + -0.6526491525407759, + 0.7576602693079578 ], "pi": [ - 2.746387537069328, - 0.044232621562411145 + 2.7463875378488547, + 0.04423262156882224 ], "pj": [ - 3.232923480045212, - -0.5205868568429947 - ] + 3.232923481562948, + -0.5205868571776708 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.10305132119159643, - 0.9946760403270335 + "distance": 2.4797520654638967e-05, + "i": 3, + "j": 7, + "normal": [ + 0.10305132073507006, + 0.994676040374331 ], "pi": [ - 1.9906870636791594, - -0.1927831491618901 + 1.9906870645730088, + -0.19278314949755104 ], "pj": [ - 1.9906845082632123, - -0.1928078146488149 - ] + 1.9906845091557543, + -0.1928078149972069 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.7740942617052136, - 0.6330703546961115 + "distance": 0.8378856327294941, + "i": 3, + "j": 8, + "normal": [ + 0.774094261733544, + 0.6330703546614701 ], "pi": [ - 1.3196441231655422, - 0.1688225364690319 + 1.3196441235745349, + 0.16882253621530985 ], "pj": [ - 0.6710416627393668, - -0.3616180183727713 - ] + 0.6710416632896538, + -0.3616180184625012 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - -0.999984511661103, - 0.005565648022041402 + "distance": 6.886767062119993e-08, + "i": 4, + "j": 5, + "normal": [ + -0.9999845116610182, + 0.005565648037286098 ], "pi": [ - 5.091662341343293, - 0.7055639717065383 + 5.091662342651188, + 0.7055639717245679 ], "pj": [ - 5.091662409715443, - 0.705563971325997 - ] + 5.091662411517792, + 0.7055639713412746 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.10305132101143943, - 0.9946760403456983 + "distance": 2.4797519725989045e-05, + "i": 4, + "j": 6, + "normal": [ + 0.10305132073464351, + 0.9946760403743752 ], "pi": [ - 3.98862650867075, - -0.28354642061711866 + 3.9886265102555263, + -0.2835464206125212 ], "pj": [ - 3.9886239532552237, - -0.28357108610002857 - ] + 3.9886239548383675, + -0.28357108611125337 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.7576521637847791, - 0.6526585621228319 + "distance": 0.9090455332286135, + "i": 4, + "j": 7, + "normal": [ + 0.757652163705846, + 0.652658562214463 ], "pi": [ - 3.3340256658974106, - 0.05847105760574778 + 3.334025667284324, + 0.058471057547391236 ], "pj": [ - 2.645285350856395, - -0.5348252928530165 - ] + 2.64528535212653, + -0.5348252931570752 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.7445047332715566, - 0.6676171823255063 + "distance": 0.9631434033018828, + "i": 5, + "j": 6, + "normal": [ + 0.7445047332561826, + 0.6676171823426508 ], "pi": [ - 5.347142188104989, - 0.032381140978449574 + 5.347142189922627, + 0.032381140961337374 ], "pj": [ - 4.630077365515341, - -0.6106299441202209 - ] + 4.630077367359907, + -0.6106299441429774 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.9989697228329812, - -0.0453816357461554 + "distance": -1.0491876371331912e-13, + "i": 6, + "j": 7, + "normal": [ + 0.9989697228415721, + -0.045381635557047766 ], "pi": [ - 2.886602909410803, - -1.2328654906995715 + 2.886602911262152, + -1.2328654909285808 ], "pj": [ - 2.886602909904597, - -1.2328654907220038 - ] + 2.8866029112622567, + -1.2328654909285857 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.9953428934448215, - -0.09639774099474907 + "distance": -7.417094489308363e-14, + "i": 7, + "j": 8, + "normal": [ + 0.9953428934323243, + -0.09639774112378686 ], "pi": [ - 0.8922902936267944, - -1.0910861139810992 + 0.8922902949883601, + -1.091086114247751 ], "pj": [ - 0.8922902944789748, - -1.0910861140636319 - ] + 0.8922902949884339, + -1.0910861142477581 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.9953428934443604, - -0.09639774099950937 + "distance": -4.948033209771795e-13, + "i": 8, + "j": 9, + "normal": [ + 0.9953428934323406, + -0.09639774112361955 ], "pi": [ - -1.098395492410207, - -0.8982906320693734 + -1.0983954918762309, + -0.8982906320003518 ], "pj": [ - -1.0983954914263954, - -0.8982906321646543 - ] + -1.0983954918757384, + -0.8982906320003995 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.9989697228333649, - -0.045381635737710035 + "distance": -1.0144533687770893e-12, + "i": 9, + "j": 10, + "normal": [ + 0.9989697228415522, + -0.04538163555748598 ], "pi": [ - -3.0927081077041207, - -0.7565112554274349 + -3.092708108149631, + -0.756511255319294 ], "pj": [ - -3.0927081068488236, - -0.7565112554662898 - ] + -3.0927081081486176, + -0.7565112553193399 + ], + "property": { + "type": "no friction" + } }, { - "nij": [ - 0.999984511661103, - -0.005565648022041402 + "distance": 6.886767062119993e-08, + "i": 10, + "j": 11, + "normal": [ + 0.9999845116610182, + -0.005565648037286098 ], "pi": [ - -5.091662341343292, - -0.7055639717065384 + -5.091662342651188, + -0.7055639717245679 ], "pj": [ - -5.091662409715443, - -0.7055639713259971 - ] + -5.091662411517792, + -0.7055639713412746 + ], + "property": { + "type": "no friction" + } + }, + { + "distance": 1.0491876371331912e-13, + "i": 0, + "j": 1, + "normal": [ + 0.9989697228415721, + -0.045381635557047766 + ], + "pi": [ + -2.886602911262152, + 1.2328654909285808 + ], + "pj": [ + -2.8866029112622567, + 1.2328654909285857 + ], + "property": { + "type": "no friction" + } + }, + { + "distance": 7.417094489308363e-14, + "i": 1, + "j": 2, + "normal": [ + 0.9953428934323243, + -0.09639774112378686 + ], + "pi": [ + -0.8922902949883601, + 1.091086114247751 + ], + "pj": [ + -0.8922902949884339, + 1.0910861142477581 + ], + "property": { + "type": "no friction" + } + }, + { + "distance": 4.948033209771795e-13, + "i": 2, + "j": 3, + "normal": [ + 0.9953428934323406, + -0.09639774112361955 + ], + "pi": [ + 1.0983954918762309, + 0.8982906320003518 + ], + "pj": [ + 1.0983954918757384, + 0.8982906320003995 + ], + "property": { + "type": "no friction" + } + }, + { + "distance": 1.0144533687770893e-12, + "i": 3, + "j": 4, + "normal": [ + 0.9989697228415522, + -0.04538163555748598 + ], + "pi": [ + 3.092708108149631, + 0.756511255319294 + ], + "pj": [ + 3.0927081081486176, + 0.7565112553193399 + ], + "property": { + "type": "no friction" + } + }, + { + "distance": -6.886767062119993e-08, + "i": 4, + "j": 5, + "normal": [ + 0.9999845116610182, + -0.005565648037286098 + ], + "pi": [ + 5.091662342651188, + 0.7055639717245679 + ], + "pj": [ + 5.091662411517792, + 0.7055639713412746 + ], + "property": { + "type": "no friction" + } + }, + { + "distance": 1.0491876371331912e-13, + "i": 6, + "j": 7, + "normal": [ + -0.9989697228415721, + 0.045381635557047766 + ], + "pi": [ + 2.886602911262152, + -1.2328654909285808 + ], + "pj": [ + 2.8866029112622567, + -1.2328654909285857 + ], + "property": { + "type": "no friction" + } + }, + { + "distance": 7.417094489308363e-14, + "i": 7, + "j": 8, + "normal": [ + -0.9953428934323243, + 0.09639774112378686 + ], + "pi": [ + 0.8922902949883601, + -1.091086114247751 + ], + "pj": [ + 0.8922902949884339, + -1.0910861142477581 + ], + "property": { + "type": "no friction" + } + }, + { + "distance": 4.948033209771795e-13, + "i": 8, + "j": 9, + "normal": [ + -0.9953428934323406, + 0.09639774112361955 + ], + "pi": [ + -1.0983954918762309, + -0.8982906320003518 + ], + "pj": [ + -1.0983954918757384, + -0.8982906320003995 + ], + "property": { + "type": "no friction" + } + }, + { + "distance": 1.0144533687770893e-12, + "i": 9, + "j": 10, + "normal": [ + -0.9989697228415522, + 0.04538163555748598 + ], + "pi": [ + -3.092708108149631, + -0.756511255319294 + ], + "pj": [ + -3.0927081081486176, + -0.7565112553193399 + ], + "property": { + "type": "no friction" + } + }, + { + "distance": -6.886767062119993e-08, + "i": 10, + "j": 11, + "normal": [ + -0.9999845116610182, + 0.005565648037286098 + ], + "pi": [ + -5.091662342651188, + -0.7055639717245679 + ], + "pj": [ + -5.091662411517792, + -0.7055639713412746 + ], + "property": { + "type": "no friction" + } } ], "objects": [ { + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + -1.0, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 2.4990551391140167e-17, + "velocity": [ + -0.9912335115590203, + 0.10036531997882091 + ] + }, "type": "worm", "worm": [ { "id": 0, "position": [ - -3.885572632243784, - 1.2782471264457267 + -3.890528801661519, + 1.2787489530855227 ], "quaternion": [ 1.0, 0.0, 0.0, - 7.970051284390276e-18 + 3.2786139189371474e-17 ], "radius": 1.0 }, { - "id" : 1, + "id": 1, "position": [ - -1.8876331870716156, - 1.1874838549758466 + -1.8925893457332101, + 1.1879859074943453 ], "quaternion": [ 1.0, 0.0, 0.0, - 4.969065708092221e-18 + 4.167865796629267e-17 ], "radius": 1.0 }, { - "id" : 2, + "id": 2, "position": [ - 0.10305259896584702, - 0.9946883730688822 + 0.09809634093126222, + 0.9951893906435069 ], "quaternion": [ 1.0, 0.0, 0.0, - 1.2319170875102351e-17 + 1.6255101373076792e-17 ], "radius": 1.0 }, { - "id" : 3, + "id": 3, "position": [ - 2.093738384870756, - 0.8018928911651434 + 2.0887820275955096, + 0.8023928737930022 ], "quaternion": [ 1.0, 0.0, 0.0, - 9.972148552418651e-18 + 3.0774828647595417e-18 ], "radius": 1.0 }, { - "id" : 4, + "id": 4, "position": [ - 4.091677829682189, - 0.7111296197285797 + 4.08672148352325, + 0.7116298282012287 ], "quaternion": [ 1.0, 0.0, 0.0, - 3.993595216431462e-19 + 5.388979692015133e-19 ], "radius": 1.0 }, { - "id" : 5, + "id": 5, "position": [ - 6.0916469213765465, - 0.6999983233039556 + 6.086687721551677, + 0.6999980962310877 ], "quaternion": [ 1.0, 0.0, 0.0, - -8.665263865880647e-23 + -6.642819928214928e-22 ], "radius": 1.0 } ] }, { + "properties": { + "active": true, + "desired_omega": 0.0, + "desired_velocity": [ + 1.0, + 0.0 + ], + "force": [ + 0.0, + 0.0 + ], + "mass": 1.0, + "moment_inertia": 0.1, + "omega": 1.3294555609440266e-17, + "velocity": [ + 0.9912335115590203, + -0.10036531997882085 + ] + }, "type": "worm", "worm": [ { - "id": 1, + "id": 6, "position": [ - 3.8855726322437842, - -1.278247126445727 + 3.890528801661519, + -1.2787489530855227 ], "quaternion": [ 1.0, 0.0, 0.0, - 1.2192404113505316e-17 + 3.522337703104399e-17 ], "radius": 1.0 }, { - "id": 2, + "id": 7, "position": [ - 1.8876331870716159, - -1.1874838549758484 + 1.8925893457332101, + -1.1879859074943453 ], "quaternion": [ 1.0, 0.0, 0.0, - 1.0163329267799255e-17 + 3.7016879373138877e-17 ], "radius": 1.0 }, { - "id": 3, + "id": 8, "position": [ - -0.1030525989658467, - -0.9946883730688828 + -0.09809634093126222, + -0.9951893906435069 ], "quaternion": [ 1.0, 0.0, 0.0, - 6.465852459869257e-18 + 1.6866403648259574e-17 ], "radius": 1.0 }, { - "id": 4, + "id": 9, "position": [ - -2.093738384870756, - -0.801892891165145 + -2.0887820275955096, + -0.8023928737930022 ], "quaternion": [ 1.0, 0.0, 0.0, - 1.1716753124135401e-18 + 5.708167438924732e-18 ], "radius": 1.0 }, { - "id": 5, + "id": 10, "position": [ - -4.0916778296821885, - -0.7111296197285798 + -4.08672148352325, + -0.7116298282012287 ], "quaternion": [ 1.0, 0.0, 0.0, - 1.173183017699438e-19 + 6.882525145750065e-19 ], "radius": 1.0 }, { - "id": 6, + "id": 11, "position": [ - -6.0916469213765465, - -0.6999983233039557 + -6.086687721551677, + -0.6999980962310877 ], "quaternion": [ 1.0, 0.0, 0.0, - -6.638399943006525e-23 + 1.6461101698078523e-22 ], "radius": 1.0 } diff --git a/test/test_gradient.cpp b/test/test_gradient.cpp index b1e8b12f..0d478fd1 100644 --- a/test/test_gradient.cpp +++ b/test/test_gradient.cpp @@ -62,8 +62,6 @@ namespace scopi params.optim_params.alpha = 0.01; params.optim_params.dynamic_descent = true; - params.solver_params.output_frequency = total_it - 1; - params.solver_params.filename = "sphere_plane_nofriction"; solver.run(dt, total_it); auto pos = particles.pos(); @@ -83,7 +81,6 @@ namespace scopi REQUIRE(error_q <= doctest::Approx(1e-3)); REQUIRE(error_v <= doctest::Approx(tol_analytical)); REQUIRE(omega(1) == doctest::Approx(0.)); - // CHECK(diffFile("./Results/sphere_plane_nofriction_0002.json", "../test/references/sphere_plane_nofriction.json", tol)); } TEST_CASE("sphere - plane viscous without friction") @@ -128,9 +125,6 @@ namespace scopi params.optim_params.alpha = 0.1; params.optim_params.dynamic_descent = true; - params.solver_params.output_frequency = 1; - params.solver_params.filename = "sphere_plane_viscous"; - // double gamma = 0; double gamma_min = -2.; // double gamma_tol = 1e-6; @@ -157,7 +151,6 @@ namespace scopi REQUIRE(error_q <= doctest::Approx(1e-3)); REQUIRE(error_v <= doctest::Approx(1e-3)); REQUIRE(omega(1) == doctest::Approx(0.)); - // CHECK(diffFile("./Results/sphere_plane_viscous_0005.json", "../test/references/sphere_plane_viscous.json", tol)); } TEST_CASE("sphere - plane friction no fixed point") @@ -197,6 +190,9 @@ namespace scopi using vap_t = vap_fpd; ScopiSolver solver(particles); + fs::path path = "test_gradient"; + std::string filename = "sphere_plane_friction_mu01"; + auto params = solver.get_params(); params.optim_params.tolerance = 1e-7; @@ -204,14 +200,16 @@ namespace scopi params.optim_params.alpha = 0.1; params.optim_params.dynamic_descent = true; - params.solver_params.output_frequency = Tf / dt - 1; - params.solver_params.filename = "sphere_plane_friction_mu01"; + std::size_t total_it = Tf / dt; + params.solver_params.output_frequency = total_it; + params.solver_params.path = path; + params.solver_params.filename = filename; // mu01 params.default_contact_property.mu = 0.1; - solver.run(dt, Tf / dt); + solver.run(dt, total_it); - CHECK(diffFile("./Results/sphere_plane_friction_mu01_0200.json", "../test/references/sphere_plane_friction_mu01.json", tol)); + CHECK(check_reference_file(path, filename, total_it, tol)); } TEST_CASE("sphere - plane friction fixed point") @@ -258,8 +256,6 @@ namespace scopi params.optim_params.dynamic_descent = true; double mu = 0.5; - params.solver_params.output_frequency = total_it - 1; - params.solver_params.filename = "sphere_plane_friction_fixed_point"; params.default_contact_property.mu = mu; params.default_contact_property.fixed_point_tol = 1e-6; params.default_contact_property.fixed_point_max_iter = 1000; @@ -283,8 +279,6 @@ namespace scopi REQUIRE(error_q <= doctest::Approx(1e-2)); REQUIRE(error_v <= doctest::Approx(tol_analytical)); REQUIRE(error_omega <= doctest::Approx(tol_analytical)); - // CHECK(diffFile("./Results/sphere_plane_friction_fp_mu05_0002.json", "../test/references/sphere_plane_friction_fp_mu05.json", - // tol)); } TEST_CASE("sphere - plane viscous friction") @@ -329,9 +323,6 @@ namespace scopi params.optim_params.alpha = 0.1; params.optim_params.dynamic_descent = true; - params.solver_params.output_frequency = total_it - 1; - params.solver_params.filename = "sphere_plane_viscous_friction_mu05"; - double mu = 0.5; params.default_contact_property.mu = mu; params.default_contact_property.fixed_point_tol = 1e-3; @@ -379,9 +370,6 @@ namespace scopi REQUIRE(error_q <= doctest::Approx(1e-1)); REQUIRE(error_v <= doctest::Approx(1e-3)); REQUIRE(error_omega <= doctest::Approx(1e-3)); - - // CHECK(diffFile("./Results/sphere_plane_viscous_friction_mu05_0005.json", - // "../test/references/sphere_plane_viscous_friction_mu05.json", tol)); } /// TESTS 3 SPHERES @@ -431,6 +419,9 @@ namespace scopi using vap_t = vap_fpd; ScopiSolver solver(particles); + fs::path path = "test_gradient"; + std::string filename = "3spheres_nofriction"; + auto params = solver.get_params(); params.optim_params.tolerance = 1e-7; @@ -438,10 +429,13 @@ namespace scopi params.optim_params.alpha = 0.1; params.optim_params.dynamic_descent = true; - params.solver_params.output_frequency = Tf / dt - 1; - params.solver_params.filename = "3spheres_nofriction"; - solver.run(dt, Tf / dt); - CHECK(diffFile("./Results/3spheres_nofriction_0060.json", "../test/references/3spheres_nofriction.json", tol)); + std::size_t total_it = Tf / dt; + params.solver_params.output_frequency = total_it; + params.solver_params.path = path; + params.solver_params.filename = filename; + solver.run(dt, total_it); + + CHECK(check_reference_file(path, filename, total_it, tol)); } TEST_CASE("3 Spheres Viscous") @@ -489,6 +483,9 @@ namespace scopi using vap_t = vap_fpd; ScopiSolver solver(particles); + fs::path path = "test_gradient"; + std::string filename = "3spheres_viscous"; + auto params = solver.get_params(); params.optim_params.tolerance = 1e-7; @@ -496,14 +493,13 @@ namespace scopi params.optim_params.alpha = 0.1; params.optim_params.dynamic_descent = true; - params.solver_params.output_frequency = Tf / dt - 1; - params.solver_params.filename = "3spheres_viscous"; + std::size_t total_it = Tf / dt; + params.solver_params.output_frequency = total_it; + params.solver_params.path = path; + params.solver_params.filename = filename; + solver.run(dt, total_it); - // double gamma = 0; - // double gamma_min = -2.; - // double gamma_tol = 1e-6; - solver.run(dt, Tf / dt); - CHECK(diffFile("./Results/3spheres_viscous_0070.json", "../test/references/3spheres_viscous.json", tol)); + CHECK(check_reference_file(path, filename, total_it, tol)); } TEST_CASE("3 Spheres Friction Fixed Point") @@ -551,6 +547,9 @@ namespace scopi using vap_t = vap_fpd; ScopiSolver solver(particles); + fs::path path = "test_gradient"; + std::string filename = "3spheres_friction_fp"; + auto params = solver.get_params(); params.optim_params.tolerance = 1e-7; @@ -558,15 +557,18 @@ namespace scopi params.optim_params.alpha = 0.1; params.optim_params.dynamic_descent = true; - params.solver_params.output_frequency = Tf / dt - 1; - params.solver_params.filename = "3spheres_friction_fp"; - // mu05 params.default_contact_property.mu = 0.5; params.default_contact_property.fixed_point_tol = 1e-6; params.default_contact_property.fixed_point_max_iter = 1000; - solver.run(dt, Tf / dt); - CHECK(diffFile("./Results/3spheres_friction_fp_0070.json", "../test/references/3spheres_friction_fp.json", tol)); + + std::size_t total_it = Tf / dt; + params.solver_params.output_frequency = total_it; + params.solver_params.path = path; + params.solver_params.filename = filename; + solver.run(dt, total_it); + + CHECK(check_reference_file(path, filename, total_it, tol)); } TEST_CASE("3 Spheres Viscous Friction") @@ -614,6 +616,9 @@ namespace scopi using vap_t = vap_fpd; ScopiSolver solver(particles); + fs::path path = "test_gradient"; + std::string filename = "3spheres_viscous_friction"; + auto params = solver.get_params(); params.optim_params.tolerance = 1e-7; @@ -621,16 +626,19 @@ namespace scopi params.optim_params.alpha = 0.1; params.optim_params.dynamic_descent = true; - params.solver_params.output_frequency = Tf / dt - 1; - params.solver_params.filename = "3spheres_viscous_friction"; - params.default_contact_property.mu = 0.5; params.default_contact_property.fixed_point_tol = 1e-3; params.default_contact_property.fixed_point_max_iter = 1000; params.default_contact_property.gamma = 0; params.default_contact_property.gamma_min = -1.4; params.default_contact_property.gamma_tol = 1e-6; - solver.run(dt, Tf / dt); - CHECK(diffFile("./Results/3spheres_viscous_friction_0070.json", "../test/references/3spheres_viscous_friction.json", tol)); + + std::size_t total_it = Tf / dt; + params.solver_params.output_frequency = total_it; + params.solver_params.path = path; + params.solver_params.filename = filename; + solver.run(dt, total_it); + + CHECK(check_reference_file(path, filename, total_it, tol)); } } diff --git a/test/test_obstacles.cpp b/test/test_obstacles.cpp index 9ce57f9a..a15b68ba 100644 --- a/test/test_obstacles.cpp +++ b/test/test_obstacles.cpp @@ -37,7 +37,7 @@ namespace scopi void set_params(solver_t& solver, std::size_t total_it) { auto params = solver.get_params(); - params.solver_params.output_frequency = total_it - 1; + params.solver_params.output_frequency = total_it; } TEST_CASE_TEMPLATE_DEFINE("sphere plane", SolverType, sphere_plane) @@ -239,13 +239,18 @@ namespace scopi {0., -10.} })); + fs::path path = "test_obstacles"; + std::string filename = "obstacles_sphere_sphere_moving"; + SolverType solver(particles); set_params(solver, total_it); auto params = solver.get_params(); - params.solver_params.output_frequency = 1; + params.solver_params.output_frequency = total_it; + params.solver_params.filename = filename; + params.solver_params.path = path; solver.run(dt, total_it); - CHECK(diffFile("./Results/scopi_objects_0099.json", "../test/references/obstacles_sphere_sphere_moving.json", tolerance)); + CHECK(check_reference_file(path, filename, total_it, tolerance)); } TEST_CASE_TEMPLATE_DEFINE("sphere inclined plane", SolverType, sphere_inclined_plane) diff --git a/test/test_sphere.cpp b/test/test_sphere.cpp index 44a49b3d..0f8f2cdd 100644 --- a/test/test_sphere.cpp +++ b/test/test_sphere.cpp @@ -366,12 +366,17 @@ namespace scopi {-0.25, 0} })); + fs::path path = "two_spheres"; + std::string filename = "two_spheres_asymmetrical"; + SolverType solver(particles); auto params = solver.get_params(); - params.solver_params.output_frequency = 1; // total_it-1; + params.solver_params.output_frequency = total_it; + params.solver_params.filename = filename; + params.solver_params.path = path; solver.run(dt, total_it); - CHECK(diffFile("./Results/scopi_objects_0999.json", "../test/references/two_spheres_asymmetrical.json", tolerance)); + CHECK(check_reference_file(path, filename, total_it, tolerance)); } TEST_CASE_TEMPLATE_DEFINE("two spheres symetrical", SolverType, two_spheres_symetrical) @@ -402,12 +407,17 @@ namespace scopi {-0.25, 0} })); + fs::path path = "two_spheres"; + std::string filename = "two_spheres_symmetrical"; + SolverType solver(particles); auto params = solver.get_params(); - params.solver_params.output_frequency = 1; // total_it-1; + params.solver_params.output_frequency = total_it; + params.solver_params.filename = filename; + params.solver_params.path = path; solver.run(dt, total_it); - CHECK(diffFile("./Results/scopi_objects_0999.json", "../test/references/two_spheres_symmetrical.json", tolerance)); + CHECK(check_reference_file(path, filename, total_it, tolerance)); } TEST_CASE_TEMPLATE_DEFINE("critical 2d spheres", SolverType, two_spheres_critical) @@ -459,13 +469,18 @@ namespace scopi } } + fs::path path = "two_spheres"; + std::string filename = "2d_case_spheres"; + SolverType solver(particles); auto params = solver.get_params(); - params.solver_params.output_frequency = 1; // total_it-1; + params.solver_params.output_frequency = total_it; + params.solver_params.filename = filename; + params.solver_params.path = path; solver.run(dt, total_it); - CHECK(diffFile("./Results/scopi_objects_0019.json", "../test/references/2d_case_spheres.json", tolerance)); + CHECK(check_reference_file(path, filename, total_it, tolerance)); } TEST_CASE_TEMPLATE_APPLY(two_spheres_asymetrical, solver_dry_without_friction_t<2>); diff --git a/test/test_superellipsoid.cpp b/test/test_superellipsoid.cpp index ba3cfd99..482c803c 100644 --- a/test/test_superellipsoid.cpp +++ b/test/test_superellipsoid.cpp @@ -522,12 +522,17 @@ namespace scopi {-0.25, 0} })); + fs::path path = "test_superellipsoid"; + std::string filename = "two_ellipsoids_spheres_symmetrical"; + SolverType solver(particles); auto params = solver.get_params(); - params.solver_params.output_frequency = total_it - 1; + params.solver_params.output_frequency = total_it - 2; + params.solver_params.filename = path; + params.solver_params.path = filename; solver.run(dt, total_it); - CHECK(diffFile("./Results/scopi_objects_0049.json", "../test/references/two_ellipsoids_spheres_symmetrical.json", tolerance)); + CHECK(check_reference_file(path, filename, total_it - 1, tolerance)); } TEST_CASE_TEMPLATE_DEFINE("two ellispsoids asymetrical", SolverType, two_ellispsoids_asymetrical) @@ -562,12 +567,17 @@ namespace scopi {-0.25, 0} })); + fs::path path = "test_superellipsoid"; + std::string filename = "two_ellipsoids_asymmetrical"; + SolverType solver(particles); auto params = solver.get_params(); - params.solver_params.output_frequency = total_it - 1; + params.solver_params.output_frequency = total_it - 2; + params.solver_params.filename = path; + params.solver_params.path = filename; solver.run(dt, total_it); - CHECK(diffFile("./Results/scopi_objects_0999.json", "../test/references/two_ellipsoids_asymmetrical.json", tolerance)); + CHECK(check_reference_file(path, filename, total_it - 1, tolerance)); } TEST_CASE_TEMPLATE_DEFINE("two ellispsoids spheres asymetrical", SolverType, two_ellispsoids_spheres_asymetrical) @@ -604,12 +614,17 @@ namespace scopi {-0.25, 0} })); + fs::path path = "test_superellipsoid"; + std::string filename = "two_ellipsoids_spheres_asymmetrical"; + SolverType solver(particles); auto params = solver.get_params(); - params.solver_params.output_frequency = total_it - 1; + params.solver_params.output_frequency = total_it - 2; + params.solver_params.filename = path; + params.solver_params.path = filename; solver.run(dt, total_it); - CHECK(diffFile("./Results/scopi_objects_0999.json", "../test/references/two_ellipsoids_spheres_asymmetrical.json", tolerance)); + CHECK(check_reference_file(path, filename, total_it - 1, tolerance)); } TEST_CASE_TEMPLATE_DEFINE("critical 2d superellipsoids", SolverType, critical_2d_superellipsoids) @@ -673,12 +688,17 @@ namespace scopi } } + fs::path path = "test_superellipsoid"; + std::string filename = "2d_case_superellipsoid"; + SolverType solver(particles); auto params = solver.get_params(); - params.solver_params.output_frequency = total_it - 1; + params.solver_params.output_frequency = total_it - 2; + params.solver_params.filename = path; + params.solver_params.path = filename; solver.run(dt, total_it); - CHECK(diffFile("./Results/scopi_objects_0999.json", "../test/references/two_ellipsoids_spheres_asymmetrical.json", tolerance)); + CHECK(check_reference_file(path, filename, total_it - 1, tolerance)); } TEST_CASE_TEMPLATE_APPLY(two_ellispsoids_symetrical, solver_dry_without_friction_t<2>); diff --git a/test/test_worm.cpp b/test/test_worm.cpp index 4c4bd206..35b9eaaf 100644 --- a/test/test_worm.cpp +++ b/test/test_worm.cpp @@ -512,14 +512,19 @@ namespace scopi particles.push_back(w1, prop.desired_velocity({-1., 0.})); particles.push_back(w2, prop.desired_velocity({1., 0.})); + fs::path path = "test_worm"; + std::string filename = "two_worms"; + SolverType solver(particles); auto params = solver.get_params(); set_params_test(params.optim_params); - params.contact_method_params.dmax = 1.; - // params.solver_params.output_frequency = total_it - 1; + params.contact_method_params.dmax = 1.; + params.solver_params.output_frequency = total_it; + params.solver_params.filename = filename; + params.solver_params.path = path; solver.run(dt, total_it); - CHECK(diffFile("./Results/scopi_objects_0999.json", "../test/references/two_worms.json", tolerance)); + CHECK(check_reference_file(path, filename, total_it, tolerance)); } TEST_CASE_TEMPLATE_APPLY(two_worms, solver_dry_without_friction_t<2>); diff --git a/test/utils.cpp b/test/utils.cpp index 6c5d8f7f..a626f392 100644 --- a/test/utils.cpp +++ b/test/utils.cpp @@ -1,8 +1,17 @@ +#include + #include "utils.hpp" namespace scopi { - bool diffFile(const std::string& filenameRef, const std::string& filenameResult, double tol) + bool check_reference_file(const std::filesystem::path path, const std::string_view filename, std::size_t it, double tolerance) + { + std::filesystem::path ref_path = "../test/references"; + + return diffFile(path / fmt::format("{}_{:04d}.json", filename, it), ref_path / fmt::format("{}.json", filename), tolerance); + } + + bool diffFile(const std::filesystem::path filenameResult, const std::filesystem::path filenameRef, double tol) { std::ifstream fileRef(filenameRef); std::ifstream fileResult(filenameResult); @@ -20,6 +29,8 @@ namespace scopi const std::string path_ = p["path"]; const nlohmann::json::json_pointer path(path_); + std::cerr << "reference file: " << filenameRef << std::endl; + std::cerr << "output file: " << filenameResult << std::endl; if (jsonRef["objects"][path].is_number_float() && jsonResult["objects"][path].is_number_float()) { const double error = std::abs(static_cast(jsonRef["objects"][path]) diff --git a/test/utils.hpp b/test/utils.hpp index eae84a4b..6d778aad 100644 --- a/test/utils.hpp +++ b/test/utils.hpp @@ -1,16 +1,20 @@ #pragma once +#include #include #include #include +namespace fs = std::filesystem; + #include namespace scopi { static constexpr double PI = xt::numeric_constants::PI; static constexpr double tolerance = 1e-6; - bool diffFile(const std::string& filenameRef, const std::string& filenameResult, double tol = 1e-12); + bool diffFile(const fs::path filenameRef, const std::filesystem::path filenameResult, double tol = 1e-12); + bool check_reference_file(const std::filesystem::path path, const std::string_view filename, std::size_t it, double tolerance = 1e-12); std::pair, double> analytical_solution_sphere_plane(double alpha, double mu, double t, double r, double g, double y0); std::pair, double> analytical_solution_sphere_plane_velocity(double alpha, double mu, double t, double r, double g, double y0);