bertiniteam / b2

Bertini 2.0: The redevelopment of Bertini in C++.
92 stars 34 forks source link

Feature/changing tracking layout #64

Closed timothodge closed 7 years ago

timothodge commented 7 years ago

Restructured b2/core to reflect functionality.

  1. Endgames have been moved into their own folder and out of tracking.
  2. Trackers and tracking related files go into a tracking folder.
  3. Systems are now in their own folder.

Headers have been altered to address this change. In addition, the b2/core has been compiled and passes a make check.

ofloveandhate commented 7 years ago

I built and ran tests for the core, and it worked nicely. built python just fine. but it's segfaulting in the python tests. i will try to debug and suggest a patch to you.

integral:python ofloveandhate$ python test/test_all.py 
(<module 'classes.mpfr_test' from '/Users/ofloveandhate/math_projects/bertini2/ofloveandhate/b2/python/test/classes/mpfr_test.pyc'>, <module 'classes.function_tree_test' from '/Users/ofloveandhate/math_projects/bertini2/ofloveandhate/b2/python/test/classes/function_tree_test.pyc'>, <module 'classes.differentiation_test' from '/Users/ofloveandhate/math_projects/bertini2/ofloveandhate/b2/python/test/classes/differentiation_test.pyc'>, <module 'classes.system_test' from '/Users/ofloveandhate/math_projects/bertini2/ofloveandhate/b2/python/test/classes/system_test.pyc'>, <module 'classes.parser_test' from '/Users/ofloveandhate/math_projects/bertini2/ofloveandhate/b2/python/test/classes/parser_test.pyc'>)
<unittest.suite.TestSuite tests=[<unittest.suite.TestSuite tests=[<classes.mpfr_test.MPFRComplex testMethod=test_arith_mp_complex>, <classes.mpfr_test.MPFRComplex testMethod=test_arith_mp_float>, <classes.mpfr_test.MPFRComplex testMethod=test_change_prec>, <classes.mpfr_test.MPFRComplex testMethod=test_construct>, <classes.mpfr_test.MPFRComplex testMethod=test_misc_funcs>, <classes.mpfr_test.MPFRComplex testMethod=test_trancendentals>]>, <unittest.suite.TestSuite tests=[<classes.mpfr_test.MPFRFloat testMethod=test_arith_int>, <classes.mpfr_test.MPFRFloat testMethod=test_arith_mpfr>, <classes.mpfr_test.MPFRFloat testMethod=test_change_prec>, <classes.mpfr_test.MPFRFloat testMethod=test_trancendentals>]>]>
<unittest.suite.TestSuite tests=[<unittest.suite.TestSuite tests=[<classes.function_tree_test.OperatorTest testMethod=test_Homogenize>, <classes.function_tree_test.OperatorTest testMethod=test_Operator_degree>, <classes.function_tree_test.OperatorTest testMethod=test_Operator_ishom>, <classes.function_tree_test.OperatorTest testMethod=test_Operator_ispoly>, <classes.function_tree_test.OperatorTest testMethod=test_num_times_var>, <classes.function_tree_test.OperatorTest testMethod=test_plus>, <classes.function_tree_test.OperatorTest testMethod=test_power>, <classes.function_tree_test.OperatorTest testMethod=test_sub>, <classes.function_tree_test.OperatorTest testMethod=test_trans_funcs>, <classes.function_tree_test.OperatorTest testMethod=test_var_div_var>, <classes.function_tree_test.OperatorTest testMethod=test_var_times_var>]>, <unittest.suite.TestSuite tests=[<classes.function_tree_test.SymbolTest testMethod=test_E_construct>, <classes.function_tree_test.SymbolTest testMethod=test_Float_construct>, <classes.function_tree_test.SymbolTest testMethod=test_Float_eval>, <classes.function_tree_test.SymbolTest testMethod=test_Float_funcs>, <classes.function_tree_test.SymbolTest testMethod=test_I_construct>, <classes.function_tree_test.SymbolTest testMethod=test_Pi_construct>, <classes.function_tree_test.SymbolTest testMethod=test_Variable_construct>, <classes.function_tree_test.SymbolTest testMethod=test_Variable_eval>, <classes.function_tree_test.SymbolTest testMethod=test_Variable_funcs>]>]>
<unittest.suite.TestSuite tests=[<unittest.suite.TestSuite tests=[<classes.differentiation_test.DiffTest testMethod=test_power_rule>, <classes.differentiation_test.DiffTest testMethod=test_prod_rule>, <classes.differentiation_test.DiffTest testMethod=test_sum_rule>, <classes.differentiation_test.DiffTest testMethod=test_trancendental>]>]>
<unittest.suite.TestSuite tests=[<unittest.suite.TestSuite tests=[<classes.system_test.SystemTest testMethod=test_add_systems>, <classes.system_test.SystemTest testMethod=test_mult_system_node>, <classes.system_test.SystemTest testMethod=test_system_Jac>, <classes.system_test.SystemTest testMethod=test_system_create>, <classes.system_test.SystemTest testMethod=test_system_eval>]>]>
<unittest.suite.TestSuite tests=[<unittest.suite.TestSuite tests=[<classes.parser_test.ParserTest testMethod=test_create_system>]>]>
test_arith_mp_complex (classes.mpfr_test.MPFRComplex) ... ok
test_arith_mp_float (classes.mpfr_test.MPFRComplex) ... ok
test_change_prec (classes.mpfr_test.MPFRComplex) ... ok
test_construct (classes.mpfr_test.MPFRComplex) ... ok
test_misc_funcs (classes.mpfr_test.MPFRComplex) ... ok
test_trancendentals (classes.mpfr_test.MPFRComplex) ... ok
test_arith_int (classes.mpfr_test.MPFRFloat) ... ok
test_arith_mpfr (classes.mpfr_test.MPFRFloat) ... ok
test_change_prec (classes.mpfr_test.MPFRFloat) ... ok
test_trancendentals (classes.mpfr_test.MPFRFloat) ... ok
test_Homogenize (classes.function_tree_test.OperatorTest) ... ok
test_Operator_degree (classes.function_tree_test.OperatorTest) ... ok
test_Operator_ishom (classes.function_tree_test.OperatorTest) ... ok
test_Operator_ispoly (classes.function_tree_test.OperatorTest) ... ok
test_num_times_var (classes.function_tree_test.OperatorTest) ... ok
test_plus (classes.function_tree_test.OperatorTest) ... ok
test_power (classes.function_tree_test.OperatorTest) ... ok
test_sub (classes.function_tree_test.OperatorTest) ... ok
test_trans_funcs (classes.function_tree_test.OperatorTest) ... ok
test_var_div_var (classes.function_tree_test.OperatorTest) ... ok
test_var_times_var (classes.function_tree_test.OperatorTest) ... ok
test_E_construct (classes.function_tree_test.SymbolTest) ... ok
test_Float_construct (classes.function_tree_test.SymbolTest) ... ok
test_Float_eval (classes.function_tree_test.SymbolTest) ... ok
test_Float_funcs (classes.function_tree_test.SymbolTest) ... ok
test_I_construct (classes.function_tree_test.SymbolTest) ... ok
test_Pi_construct (classes.function_tree_test.SymbolTest) ... ok
test_Variable_construct (classes.function_tree_test.SymbolTest) ... ok
test_Variable_eval (classes.function_tree_test.SymbolTest) ... ok
test_Variable_funcs (classes.function_tree_test.SymbolTest) ... ok
test_power_rule (classes.differentiation_test.DiffTest) ... ok
test_prod_rule (classes.differentiation_test.DiffTest) ... ok
test_sum_rule (classes.differentiation_test.DiffTest) ... ok
test_trancendental (classes.differentiation_test.DiffTest) ... ok
test_add_systems (classes.system_test.SystemTest) ... ok
test_mult_system_node (classes.system_test.SystemTest) ... ok
test_system_Jac (classes.system_test.SystemTest) ... ok
test_system_create (classes.system_test.SystemTest) ... ok
test_system_eval (classes.system_test.SystemTest) ... ok
test_create_system (classes.parser_test.ParserTest) ... ok

----------------------------------------------------------------------
Ran 40 tests in 0.009s

OK
test_tracker_linear (tracking.amptracking_test.AMPTrackingTest) ... ok
test_tracker_quad (tracking.amptracking_test.AMPTrackingTest) ... ok
test_tracker_singular_start (tracking.amptracking_test.AMPTrackingTest) ... ok
test_tracker_sqrt (tracking.amptracking_test.AMPTrackingTest) ... ok
test_using_total_degree_ss (tracking.endgame_test.EndgameTest) ... 1 variable groups, containing these variables:
group 0: 
x y 
1 homogenizing variables:
HOM_VAR_0 
2 functions:
unnamed_function = unnamed_function((((26758956134983775393922613994027581620204539954518/8632452516079174589462920354446167755002084559799,56481649743149231263842441954876239358943647838987/39863955311008836358684348156531407406508522663670)*t)*((x^3)-((HOM_VAR_0^3)*(87875689673604064165221985854203548465865180691292/8911565280764980293934931900449430513350337560581,-92031624450269693309676773076457207663154971209561/36829431348433428313705797321460662044567237237590))))+((t-1)*((x-(HOM_VAR_0*1))^3)))
unnamed_function = unnamed_function((((26758956134983775393922613994027581620204539954518/8632452516079174589462920354446167755002084559799,56481649743149231263842441954876239358943647838987/39863955311008836358684348156531407406508522663670)*t)*((y^2)-((HOM_VAR_0^2)*(9215126146405988386300422552813438491596469014004/18831809439874092151531390861220941995712612447011,-34979570316540871529966189550041755413443953059471/3298415588464117388268211317293113094514010909093))))+((t-1)*((y-(HOM_VAR_0*1))^2)))

path variable defined.  named t
system not differentiated
1 variable groups being patched
patch 0 has 3 coefficients:
                  (0.629447,0.465597)
                  (0.912269,0.211856)
                  (0.334337,0.365933)
current patch precision: 50

Segmentation fault: 11
ofloveandhate commented 7 years ago

the segfault is in the num_start_points() call at endgame_test.py: 97.

ofloveandhate commented 7 years ago

this was entirely my fault, i was testing an old install of pybertini against new bertini library. so was due to a version clash. the tests all run just fine on my machine under python 2.7.

ofloveandhate commented 7 years ago

the following generated files got added to the repo in commit 385fd732fb2bdff8826dbec410e7c07ecc7e2ac2, and should be removed. i think there may be no good way to retroactively remove these from your repo, so please, don't blindly commit all files. you always have to pay attention to what files you are adding.

ofloveandhate commented 7 years ago

here are additional changes to make:

other than that, things look good. make these changes (removing generated files, and these comment issues), and i'll accept the PR.

thanks!

timothodge commented 7 years ago

Thank you for taking the time to look at this pull request!

I apologize for adding files not necessary to the repo, and I have committed the changes you have asked for. I have not implemented events in endgames/events.hpp or any observers in endgames/observers.hpp. This is a future goal moving forward.

ofloveandhate commented 7 years ago

done