Skip to content
Snippets Groups Projects
Commit 783d90db authored by Izzard, Robert Dr (Maths & Physics)'s avatar Izzard, Robert Dr (Maths & Physics)
Browse files

add nova yielding

parent 4217bea1
No related branches found
No related tags found
No related merge requests found
......@@ -192,10 +192,8 @@ struct rinterpolate_data_t * rinterpolate(
*/
if(unlikely(rinterpolate_data==NULL))
{
printf("rinterpolate call alloc dataspace\n");
rinterpolate_alloc_dataspace(&rinterpolate_data);
printf("rinterpolate post call alloc dataspace %p\n",rinterpolate_data);
table_id = -1;
rinterpolate_alloc_dataspace(&rinterpolate_data);
table_id = -1;
}
else
{
......
......@@ -79,7 +79,6 @@ void free_tmpstore(struct tmpstore_t * RESTRICT const tmpstore)
#ifdef CHECK_RINTERPOLATE
printf("FREE %p\n",tmpstore->rinterpolate_data);
#endif
printf("rinterpolate free %p\n",tmpstore->rinterpolate_data);
rinterpolate_free_data(tmpstore->rinterpolate_data);
Safe_free(tmpstore->rinterpolate_data);
}
......
......@@ -38,6 +38,28 @@ Event_handler_function nova_event_handler(void * const eventp,
accretor->dm_novaH = 0.0;
accretor->mass -= dm_lost;
accretor->novastate = NOVA_STATE_POST;
/*
* yield nova material
*/
double Xnova[ISOTOPE_ARRAY_SIZE];
nucsyn_set_nova_abunds(stardata,
accretor,
donor->Xenv,//THIS IS WRONG
Xnova);
nucsyn_calc_yields(stardata,
accretor,
dm_lost,
Xnova,
0.0,
NULL,
accretor->starnum,
YIELD_NOT_FINAL,
NUCSYN_SOURCE_NOVAE);
/*
* Todo : re-accretion of a fraction
*/
return NULL;
}
......
......@@ -42,14 +42,12 @@ void eldridge2015_colours(struct stardata_t * const stardata,
char *c[STELLAR_COLOUR_STRING_LENGTH] = STELLAR_COLOUR_STRINGS;
#endif
printf("rinterpolate alloc %p\n",stardata->tmpstore->rinterpolate_data);
rinterpolate(basel,
stardata->tmpstore->rinterpolate_data,
ELDRIDGE2015_METADATA_BASEL,
param,
mags,
0);
printf("rinterpolate post alloc %p\n",stardata->tmpstore->rinterpolate_data);
/* set magnitudes */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment