00001
00002
00003
00004
00005 #include "general_support.h"
00006 #include "double_star.h"
00007 #include "double_support.h"
00008 #include "star_support.h"
00009
00010 void put_state(double_star* b,
00011 star_state& prim,
00012 star_state& sec) {
00013
00014 cout << "status at time = " << b->get_current_time()
00015 << " id = " << b->get_identity() << endl;
00016 cout << type_string(b->get_bin_type());
00017
00018 switch (b->get_bin_type()) {
00019 case Merged:
00020 cout << " (";
00021 prim.put_star_state();
00022 cout << ")" << endl;
00023 break;
00024 case Disrupted:
00025 cout << " )";
00026 prim.put_star_state();
00027 cout << ", ";
00028 sec.put_star_state();
00029 cout << "(" << endl;
00030 break;
00031 default:
00032 cout << " [a = "<<b->get_semi()<<", e = "<<b->get_eccentricity()
00033 << ", v = "<<b->get_velocity() << "]";
00034 cout << " (";
00035 prim.put_star_state();
00036 cout << ", ";
00037 sec.put_star_state();
00038 cout << ")" << endl;
00039 }
00040 }
00041
00042 void put_initial_conditions(double_init& init) {
00043
00044 cout << "\nInitial conditions: \n";
00045 if (init.start_time>0)
00046 cout << "start time = " << init.start_time << endl;
00047 cout << type_string(Detached)
00048 << " [a = " << init.semi << ", e = " << init.eccentricity
00049 << "]"
00050 << " (M = " << init.mass_prim << ", m = "
00051 << init.q*init.mass_prim << ")" << endl;
00052
00053 }