diff --git a/check_events.pl b/check_events.pl index 58fd96933b1aef7ec8f0e1f1d89363c2433cc890..ee5687cee1359055c47097d47bdf20900c4a4453 100755 --- a/check_events.pl +++ b/check_events.pl @@ -23,7 +23,7 @@ my $diff = "diff --suppress-blank-empty --ignore-trailing-space --ignore-space-c my $waitkdiff : shared; $waitkdiff = 0; my $q = robqueue->new( - nthreads=>1, + nthreads=>4, command_queue=>0, subr=>\&cfsystem, prepend_thread_number_to_subroutine => 1 @@ -45,8 +45,8 @@ sub cfsystem my $events_off = `tbse separation 0 random_systems 1 use_events 0 log_filename /tmp/c_log2.$nthread.ref`; my $events_off_args = ($events_off=~/(--M_1.*)/)[0]; - my $events_off_args = pop(@testsystems); - my $events_off = `tbse separation 0 random_systems 0 use_events 0 log_filename /tmp/c_log2.$nthread.ref $events_off_args | $grep `; + #my $events_off_args = pop(@testsystems); + #my $events_off = `tbse separation 0 random_systems 0 use_events 0 log_filename /tmp/c_log2.$nthread.ref $events_off_args | $grep `; my $events_on = `tbse random_systems 0 $events_off_args use_events 1 log_filename /tmp/c_log2.$nthread.dat | $grep `; diff --git a/src/common_envelope/common_envelope_evolution_BSE.c b/src/common_envelope/common_envelope_evolution_BSE.c index 85280a6d0097d94919dce1abd457f7f606ec1bb9..77c5ea646a3f72b69ae17c751e54b58d8b1332c0 100644 --- a/src/common_envelope/common_envelope_evolution_BSE.c +++ b/src/common_envelope/common_envelope_evolution_BSE.c @@ -848,7 +848,7 @@ int common_envelope_evolution_BSE ( * If the secondary was a neutron star or black hole the outcome * is an unstable Thorne-Zytkow object that leaves only the core. */ - //printf("TZ\n"); + final_separation = 0.0; if(POST_SN_OBJECT(accretor->stellar_type)) { @@ -883,6 +883,16 @@ int common_envelope_evolution_BSE ( donor->age = 0.0; donor->stellar_type = MASSLESS_REMNANT; #endif + + /* + * Set the SN type for ensemble logging, and add a supernova + * event for the log + */ + star1->SN_type = SN_TZ; + struct star_t * news = + new_supernova(stardata,donor,accretor,NULL); + + /* * The envelope mass is not required in this case. */ @@ -2524,7 +2534,7 @@ end_section: stardata->common.orbit.eccentricity)*1e-6; Append_logstring(LOG_COMENV_POST, - "post-COMENV M=%g(Mc=%g,Menv=%g,st=%d,Teff=%g) + M=%g(Mc=%g,Menv=%g,st=%d,Teff=%g) a_out=%g P_out=%g (%g d) R1=%g RL1=%g (R1/RL1 = %g) R2=%g RL2=%g (R2/RL2 = %g) SN? %d %d Single? %d : merge in %g Gy at t = %g Gy", + "post-COMENV M=%g(Mc=%g,Menv=%g,st=%d,Teff=%g) + M=%g(Mc=%g,Menv=%g,st=%d,Teff=%g) a_out=%g P_out=%g (%g d) R1=%g RL1=%g (R1/RL1 = %g) R2=%g RL2=%g (R2/RL2 = %g) SN? %d %d Single? %d : merge in %g Gy at t = %g Gy, events pending? %d", stardata->star[0].mass, stardata->star[0].core_mass, stardata->star[0].mass - stardata->star[0].core_mass, @@ -2548,7 +2558,8 @@ end_section: accretor->SN_type, System_is_single, dtmerge*1e-3, - (stardata->model.time + dtmerge) * 1e-3 + (stardata->model.time + dtmerge) * 1e-3, + events_pending(stardata) ); diff --git a/src/nucsyn/nucsyn_gce_log.c b/src/nucsyn/nucsyn_gce_log.c index 38a41b5e0513dc8f6002cd59244fb6ebc8f3390d..ae78e1b092f87a8062aab5322c14df41ecc91bf5 100644 --- a/src/nucsyn/nucsyn_gce_log.c +++ b/src/nucsyn/nucsyn_gce_log.c @@ -634,6 +634,7 @@ void nucsyn_gce_log(struct stardata_t * RESTRICT stardata, supernova_luminous_energy(star); break; case SN_TZ: + printf("SN TZ ensemble at %g\n",stardata->model.time); ensemble_weight[NUCSYN_ENSEMBLE_SN_TZ]=1.0; break; case SN_AIC_BH: