![]() |
SEVN
|
#include <star.h>
Public Member Functions | |
| double | get_last_fromtable (Lookup::Tables tab_id, unsigned int interpolating_track) const |
| Star () | |
| Star (IO *_io, std::vector< std::string > ¶ms, size_t &_ID, bool pureHE=false, unsigned long _rseed=0) | |
| Star (const Star *s, size_t _ID, double mzams=utilities::NULL_DOUBLE, double Z=utilities::NULL_DOUBLE, std::string tini=utilities::NULL_STR, bool pureHE=false, unsigned long _rseed=0) | |
| Star (const Star *s, size_t _ID, double mzams=utilities::NULL_DOUBLE, double Z=utilities::NULL_DOUBLE, double tini=utilities::NULL_DOUBLE, bool pureHE=false, unsigned long _rseed=0) | |
| bool | has_been_properly_initiliased () |
| double | Mcore (bool old=false) |
| double | Rcore (bool old=false) |
| double | Menvelope (bool old=false) |
| double | Renvelope (bool old=false) |
| utilities::jump_convergence | find_track_after_CE_Ebinding (double Ebind, double Min_Mass, double Max_mass, bool pureHE=false) |
| bool | isoutputtime () |
| bool | printall () |
| bool | notprint () |
| bool | printevents () |
| template<class T > | |
| void | castp (const size_t &id, T classtype) |
| std::vector< std::string > | get_initparams (bool effective_values=true) const |
| std::vector< std::vector< double > > | load_auxiliary_table (std::string tab_name) const |
| void | recordstate () |
| void | recordstate_w_timeupdate () |
| void | print () |
| void | print_to_log (std::string &message) |
| void | print_failed (bool include_in_output=false) |
| std::string | log_message_SNIa () |
| bool | just_exploded () |
| bool | aminakedhelium () const |
| Flag check. More... | |
| bool | amifollowingpureHetrack () const |
| bool | amiWR () const |
| bool | amiWR_0 () const |
| bool | aminakedco () const |
| bool | amiempty () const |
| bool | amiremnant () const |
| bool | amiremnant_0 () const |
| bool | amiWD () const |
| bool | amiWD_0 () const |
| bool | amiNS () const |
| bool | amiNS_0 () const |
| bool | amiBH () const |
| bool | amiBH_0 () const |
| bool | amiCompact () const |
| bool | amiCompact_0 () const |
| bool | amIdegenerate () const |
| bool | amIdegenerate_0 () const |
| bool | haveienvelope () const |
| bool | amifollowingQHE () const |
| bool | amiauxiliary () const |
| bool | amiRRL (double Lmin=1.3, double Lmax=1.9, bool just_He_core=false) const |
| Material | whatamidonating () const |
| Material | whatamidonating_0 () const |
| bool | breaktrigger () const |
| int | get_bse_phase () const |
| int | get_bse_phase_0 () const |
| unsigned long | get_rseed () |
| double | get_max_zams () const |
| double | get_min_zams () const |
| double | get_max_Z () const |
| double | get_min_Z () const |
| double | get_zams () const |
| double | get_Z () const |
| double | get_rzams () |
| double | get_zams0 () const |
| double | get_Z0 () const |
| double | get_rzams0 () const |
| double | get_MCO_max () const |
| double | get_MHE_min () const |
| double | get_tf () const |
| double | get_tini () const |
| double | get_dtout_original () const |
| size_t | get_jcounter () const |
| const supernova * | get_supernova () const |
| double | get_staremnant (size_t ID) |
| Staremnant * | get_staremnant () const |
| double | get_svpar_num (std::string name) const |
| Get the value of the parameters store in the svpar class in io. More... | |
| std::string | get_svpar_str (std::string name) const |
| bool | get_svpar_bool (std::string name) const |
| const std::vector< double > & | getstate () |
| double | getp (const size_t &id) const |
| double | getp_fk (const size_t &id) const |
| double | getp_0 (const size_t &id) const |
| double | getp_fk0 (const size_t &id) const |
| double | get_Vlast (const size_t &id) const |
| double | get_last_Timestep () const |
| unsigned int | get_dtout_type () |
| std::string | getps (const size_t &id) const |
| std::string | getps_fk (const size_t &id) const |
| std::string | getps_0 (const size_t &id) const |
| std::string | getps_fk0 (const size_t &id) const |
| std::string | get_id_name () const |
| double | getp_raw (const size_t &id) const |
| double | getp_fk_raw (const size_t &id) const |
| double | getp_0_raw (const size_t &id) const |
| double | getp_fk0_raw (const size_t &id) const |
| bool | table_loaded (size_t propID) const |
| double * | get_table_pointer_atpos (size_t table_id, int interpolating_track, int pos) |
| double | get_current_tphase () const |
| double | get_next_tphase () const |
| std::string | get_phase_str () const |
| size_t | get_ID () const |
| std::string & | get_name () |
| std::string | get_sn_type () const |
| double * | get_mtrack () |
| double * | get_ztrack () |
| const double * | get_tphase () const |
| double & | costart () |
| double & | hestart () |
| bool & | kicked () |
| void | copy_property_from (const size_t &prop_id, const size_t ©_from_id) |
| void | set_kicked () |
| Set flags. More... | |
| void | set_forcejump () |
| void | set_empty () |
| void | set_empty_in_bse (Binstar *b) |
| void | set_staremnant (Staremnant *remnant) |
| void | set_remnant () |
| void | set_COnaked () |
| void | set_QHE () |
| void | reset_QHE () |
| void | set_MCO_max_aftermerge (Star *merged_star) |
| void | set_MHE_min_aftermerge (Star *merged_star) |
| void | evolution_step_done () |
| void | evolution_guard (const char *file_input=nullptr, int line_input=-1) |
| bool | get_COnaked () |
| double | get_dtout () |
| double | get_dtmax () |
| void | evolve_to_tini () |
| void | evolve_to_tini_as_remnant () |
| utilities::evolution | evolve () |
| int | lose_the_envelope () |
| void | update_from_binary (int Property_id, double DV, Binstar *b=nullptr) |
| void | restore () |
| void | resynch (const double &dt) |
| void | sync_with (Star *s) |
| void | sync_with (double dt) |
| double | plife () const |
| void | tracktimes () |
| void | lookuppositions () |
| void | explode_as_SNI () |
| void | tobe_exploded_as_SNI () |
| bool | is_exploding_as_SNI () const |
| void | explode_as_SNI (_UNUSED Binstar *b) |
| utilities::sn_explosion | check_remnant_mass_limits () |
| void | init (std::vector< std::string > ¶ms, bool isareset) |
| double | inspect_param_dt (std::string p) |
| double | inspect_param_tini (std::string p, bool ignore_global=false) |
| double | inspect_param_tf (std::string p) |
| double | inspect_param_mass (std::string p) |
| double | inspect_param_Z (std::string p, bool ignore_global=false) |
| unsigned long | inspect_param_rseed (std::string p) |
| std::string | inspect_param_sntype (std::string p) |
| double | inspect_param_spin (std::string p) |
| utilities::jump_convergence | find_new_track (bool is_merger=false) |
| CHANGE OF TRACKS METHODS. More... | |
| utilities::jump_convergence | find_new_track_after_merger () |
| utilities::jump_convergence | jump_to_pureHE_tracks () |
| utilities::jump_convergence | jump_to_normal_tracks () |
| ~Star () | |
| Star (const Star &)=delete | |
| Star & | operator= (const Star &)=delete |
| Star (Star &&other)=default | |
| Star & | operator= (Star &&other)=default |
Public Attributes | |
| double | ttimes [4] |
| size_t | pos [4] |
| double * | times_in [4] |
| bool | repeatstep |
| bool | changedphase |
| double | vkick [4] |
Protected Types | |
| enum | Init_params { _Mzams = 0 , _Z , _Spin , _SN_type , _Tini , _Tfin , _Dtout } |
Protected Member Functions | |
| void | set_MCO_max () |
| void | set_MHE_min () |
| double | age_phase (std::string phase) |
| void | remnant () |
| void | remnant_in_bse (Binstar *b) |
| void | turn_into_remnant () |
| void | crem_transition_to_NS () |
| void | crem_transition_to_BH () |
| void | initialise_auxiliary_star (const Star *s, double mzams, double Z, std::string tini, bool pureHE) |
| void | initialise_auxiliary_star (const Star *s, double mzams, double Z, double tini, bool pureHE) |
| void | change_params (double mzams=utilities::NULL_DOUBLE, double Z=utilities::NULL_DOUBLE, std::string tini=utilities::NULL_STR) |
| void | change_params (double mzams=utilities::NULL_DOUBLE, double Z=utilities::NULL_DOUBLE, double tini=utilities::NULL_DOUBLE) |
| void | default_initialiser (bool isareset=false, bool pureHE=false) |
| void | reset (double mzams=utilities::NULL_DOUBLE, double Z=utilities::NULL_DOUBLE, std::string tini=utilities::NULL_STR) |
| void | reset (double mzams=utilities::NULL_DOUBLE, double Z=utilities::NULL_DOUBLE, double tini=utilities::NULL_DOUBLE) |
| double | find_mass_linear (double mlow, double mhigh, const double MAX_MASS, const double MIN_MASS, const double plife, const size_t Phase, const bool pureHE, double &best_rel_err, utilities::jump_convergence &convergence, const size_t property_id=Mass::ID, const double z_look=utilities::NULL_DOUBLE) |
| CHANGE OF TRACKS METHODS. More... | |
| double | find_mass_bisection (double mlow, double mhigh, const double MAX_MASS, const double MIN_MASS, const double plife, const size_t Phase, const bool pureHE, double &best_rel_err, utilities::jump_convergence &convergence, const size_t property_id=Mass::ID, const double z_look=utilities::NULL_DOUBLE) |
| utilities::jump_convergence | match_M (double &best_rel_err, bool is_merger=false) |
| utilities::jump_convergence | match_core (double &best_rel_err, _UNUSED bool is_merger=false) |
| utilities::jump_convergence | match_HE_and_binding (double Ebind, double &best_rel_err, double Min_Mass=utilities::NULL_DOUBLE, double Max_Mass=utilities::NULL_DOUBLE, bool pureHe=false) |
| utilities::jump_convergence | jump_tracks (Star *s) |
| void | update_jtrack_counter () |
| void | correct_evolution_error () |
| int | _main_get_bse_phase (bool old=false) const |
| std::string | log_mess_COnaked () |
| std::string | log_mess_HEnaked (utilities::jump_convergence outcome) |
| std::string | log_mess_jumped (_UNUSED utilities::jump_convergence outcome) |
Protected Attributes | |
| double | tphase [Nphases] = {0.} |
| double | t_co_start |
| double | t_he_start |
| std::vector< std::vector< double > > | tphase_neigh |
| double | tf |
| double | tini |
| double | dtout |
| unsigned int | dtout_type = Lookup::DTout_type::_DTUNKNOWN |
| double | Z0 |
| double | Z |
| double | mzams0 |
| double | mzams |
| double | rzams0 |
| double | rzams =-1 |
| size_t | jtrack_counter =0 |
| double | MCO_max =std::nan("") |
| double | MHE_min =std::nan("") |
| double | Mtrack [4] = {0.} |
| double | Ztrack [2] = {0.} |
Private Member Functions | |
| bool | is_dtout_generator_callable () |
| void | set_rzams () |
| void | reset_staremnant () |
| void | default_destructor () |
| void | set_mzams (const double a, const char *file, const int line) |
| void | set_Z (const double a, const char *file, const int line) |
| void | set_sntype (const std::string &a, _UNUSED const char *file, _UNUSED const int line) |
| void | set_tf (const double a, const char *file, const int line) |
| void | set_dtout (const double a, const char *file, const int line) |
| void | set_rseed (const unsigned long a, const char *file, const int line) |
| void | init_1 (std::vector< std::string > ¶ms) |
| void | init_2 (std::vector< std::string > ¶ms) |
| void | init_on_lookup () |
Private Attributes | |
| supernova * | SN = nullptr |
| Staremnant * | staremnant = nullptr |
| std::unique_ptr< utilities::ListGenerator > | dtout_generator =nullptr |
| Lookup::Remnants | initialise_as_remnant |
| FLAGS. More... | |
| bool | faulty_initialisation =false |
| bool | auxiliary_star =false |
| bool | needsinit |
| bool | isremnant |
| bool | isempty |
| bool | iskicked |
| bool | tobe_SNIA =false |
| bool | isconaked |
| bool | once_conaked |
| bool | break_at_remnant |
| bool | print_all_steps |
| bool | print_per_phase |
| bool | print_only_end |
| bool | print_events |
| bool | initialised_on_zams |
| bool | force_jump |
| bool | ami_on_pureHE_track |
| bool | ami_following_QHE |
| bool | evolution_step_completed |
| std::vector< std::vector< double > > | allstates |
| std::string | sntype |
| SevnLogging | svlog |
| IO * | io |
| std::vector< std::string > | init_params |
| size_t | ID |
| std::string | name |
| std::vector< double > | state |
| std::vector< std::vector< std::vector< double > * > > | tables |
| vector< Property * > | properties |
| std::vector< double > | dtout_phase |
| unsigned long | rseed =0 |
Friends | |
| class | Binstar |
Class representing a single star in SEVN. It contains a list of properties, the info about the interpolating tracks. It has also method to call the single stellar evolution and the print function to returns the properties.
|
protected |
|
inline |
Standard Constructor. It does nothing.
|
inline |
Constructor through input properties (tables and parameters).
| _io | instance of the class IO. Note the instance should have already loaded the tracks tables. |
| params | a vector of string with the stellar paramters (mass, Z, spin, sn_type, tfinal_evolution, t_output_evolution) |
| _ID | integer ID that identifies the star. |
| pureHE | If true initialise the star on pureHE tracks. Notice even if false the tracks can end in a pure HE track if explicitly stated in the params |
| _rseed | Random seed, if 0 it will geneterated automatically |
|
inline |
Special constructor. It creates a star with a mass mass and metallicity Z but with starting time tini, and all the other properties that are copied from the star s. In practice, it is like we call the classical constructor Star(io, params, ID) mixing the new mass, metallicity and starting age with the other information from s.
| s | pointer to a star object, we take all the infos (except for mzams and Z and tini) from this star. |
| _ID | integer ID that identifies the star. |
| mzams | Mass [in Msun] on the ZAMS of the star (actually it is the mass at the beginning of the pre-MS) [default NULL] If default the mzams is the same of the star s. |
| Z | Metallicity of the star [default NULL]. If default the Z is the same of the star s. |
| tini | Starting age of the stars [default NULL]. Note, this is a string value so that we can use also the string initialisation (e.g. phase init (zams, tms, hsb, cheb, tcheb, thesb) or phase (e.g. %20:1 for 20% of pfile in the zams). If default tini is the same of the star s. |
| pureHE | If true initialise the star on pureHE tracks. Notice even if false the tracks can end in a pure HE track if explicitly stated in the params |
| _rseed | Random seed, if 0 it will geneterated automatically |
|
inline |
Special constructor. It creates a star with a mass mass and metallicity Z but with starting time tini, and all the other properties that are copied from the star s. In practice, it is like we call the classical constructor Star(io, params, ID) mixing the new mass, metallicity and starting age with the other information from s.
| s | pointer to a star object, we take all the infos (except for mzams and Z and tini) from this star. |
| _ID | integer ID that identifies the star. |
| mzams | Mass [in Msun] on the ZAMS of the star (actually it is the mass at the beginning of the pre-MS) [default NULL] If default the mzams is the same of the star s. |
| Z | Metallicity of the star [default NULL]. If default the Z is the same of the star s. |
| tini | Starting age of the stars [default NULL]. It has to be a number. |
| pureHE | If true initialise the star on pureHE tracks. Notice even if false the tracks can end in a pure HE track if explicitly stated in the params |
| _rseed | Random seed, if 0 it will geneterated automatically |
| Star::~Star | ( | ) |
Destructor use default
Here we have to delete all the pointer to stuff allocated on the heap
|
delete |
Copy constructor Disable copy constructor
|
default |
Move constuctor Use default
| other |
|
protected |
Core function to translate SEVN phase to BSE phases. Notice, we assume that nakedHe BSE is equivalent to pureHe in SEVN (i.e., star on pureHe tracks)
| old | if true use getp_0 properties |
Separate from Deep of fully convective low mass Ms and high mass MS
|
inlineprotected |
Return the age of a given phase in Myr
| phase | Name of the phase (zams, tms, hsb, cheb, tcheb, hesb, end) |
|
inline |
Check if the star is an auxiliary star
|
inline |
Check if the star is a BH
|
inline |
Check if the star is a BH
|
inline |
Check if the star is a compact remnant (NS or BH)
|
inline |
Check if the star was a compact remnant (NS or BH) in the previous step
|
inline |
Check if the star is a degenerate remnant (WD NS or BH)
|
inline |
Check if the star was a degenerate remnant (WD NS or BH) in the previous step
|
inline |
|
inline |
Check if it is currently following pureHe tables
|
inline |
Check if the star is following the Quasi homegenous evolution path. E.g. the radius does not evolve during MS and after MS the star becomes a pureHE.
|
inline |
|
inline |
Flag check.
Check if it is currently a naked Helium star
|
inline |
Check if the star was a NS
|
inline |
Check if the star was a NS
|
inline |
|
inline |
|
inline |
Check if the star has the right condition to be a RRL pulsators. The check is based on Temperature, Luminosity and phase of the star. The temperature range is taken from Karczmarek+17, the check on luminositu and phase depends on the function paramter.
| Lmin | minimum luminosity threshold in Lsun (default 1.3 Lsun) |
| Lmax | maximum luminosity cap in Lsun (defulat 1.9 Lsun) |
| just_He_core | if false consider only the star with phase 4 (CoreHeBurning), otherwise all the stars with an He core (Phase>MainSequence) (default false) |
|
inline |
Check if the star is a WD
|
inline |
Check if the star was a WD in the previous step
|
inline |
Check if the star is a Wolf-Rayet based on the Eq.2 of Spera+19
|
inline |
Check if the star was a Wolf-Rayet based on the Eq.2 of Spera+19
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inline |
Check if the remnant has exceeded the Chandrasekhar or VTO limits and call the transition to the new remnant
|
inline |
Pubblic wrapper for the property function copy_V_from
| prop_id | Id of the property for which we have to change V copying from another property |
| copy_from_id | Id of the property from which we have to copy the value of v |
|
inlineprotected |
Take into account the correction due to errors on evolution (E.g. Mhe>Mtot ecc) So far we use only the correct_interpolation_errors_real from properties
|
inline |
|
protected |
|
protected |
|
private |
Perform all the required actions to safely destroy heap allocated members
Here we have to delete all the pointer to stuff allocated on the heap
|
protected |
Initialise the class to the default
| isareset | if true avoid to reinitialise unnecessary staff |
| pureHE | if true initialise the stars on the pureHE track |
| _rseed | Random seed, if 0 it will generated automatically |
needsinit=true is needed in lookup position to reinisialise the binary search of the position in the lookup tables
|
inline |
|
inline |
Set some flags/methods at the end of a successful evolution step, i.e. when all the repetitions are done
| utilities::evolution Star::evolve | ( | ) |
Evolve the star from the current state to the end of simulation (or one of the breaking condition is verified). It each step, it evolves the times and the Phase, then it checks for breaking condition (isempty, isremnant, isconade). If they are not verified it set the right position in the interpolating tracks and then it evolves all the properties in the list. Finally it checks if the repeatstep member (it is managed by the TimeStep property), if is true it reset the properties to the last stage and repeat the evolution with a smaller timestep.
If empty, force V0=V and return
If time to explode and the star is not already a remnant turno into remnant and return.
If it is remnant of conaked just evolve accordingly the properties
Here the star is a remnant so just evolve the time and put V0=V
Here the star is a remnant so just evolve the time and put V0=V
|
inline |
The proposed timestep is equal to the initial time of the star (tini)
Set the rigth positions on the interpolating tracks
| void Star::evolve_to_tini_as_remnant | ( | ) |
Just propose a very large timestep
| void Star::explode_as_SNI | ( | ) |
Explode as SNI leaving an empty remnant
Explode as SNI leaving an empty remnant triggered by BSE
|
protected |
Iterative process to find the zams that match the mass defined in property_id at given plife and Phase, using a bisection method.
| mlow | Initial low guess for mzams |
| mhigh | Initial high guess for mzams |
| MAX_MASS | Maximum allowed value of mzams |
| MIN_MASS | Minimum allowe value of mazams |
| plife | Percentage of life at given phase (see below) |
| Phase | Phase |
| pureHE | If true use the tracks from the pureHE tables |
| best_rel_err | Best relative error considering the property_id (see below) |
| convergence | 0-utilities::JUMP_CONVERGE 1-utilities::JUMP 2-utilities::NO_JUMP |
| property_id | Property to match, it can be Mass, MHE, MCO |
| z_look | Metallicity to use to find the zams, if equal to utilities::NULL_double it is the same Z of the calling star |
Start bisection guess
|
protected |
CHANGE OF TRACKS METHODS.
Iterative process to find the zams that match the mass defined in property_id at given plife and Phase, using a linear interpolation. We start with a low and high guess for mzams. If one of them has a relative error smaller than best_rel_err return the given zams, otherwise start an iterative approach, where a the line that connect low and high are used to predict a new zams. If this one is not enough to reach the convergence, the new zams takes tha place of the low or high limit and the iteration continues.
| mlow | Initial low guess for mzams |
| mhigh | Initial high guess for mzams |
| MAX_MASS | Maximum allowed value of mzams |
| MIN_MASS | Minimum allowe value of mazams |
| plife | Percentage of life at given phase (see below) |
| Phase | Phase |
| pureHE | If true use the tracks from the pureHE tables |
| best_rel_err | Best relative error considering the property_id (see below) |
| convergence | 0-utilities::JUMP_CONVERGE 1-utilities::JUMP 2-utilities::NO_JUMP |
| property_id | Property to match, it can be Mass, MHE, MCO |
| z_look | Metallicity to use to find the zams, if equal to utilities::NULL_double it is the same Z of the calling star |
If the convergence has not been reached jump to the tracks with the best relative error.
| utilities::jump_convergence Star::find_new_track | ( | bool | is_merger = false | ) |
CHANGE OF TRACKS METHODS.
Find new interpolating track given the new conditions on mass of the star. This function checks if a track change is needed, in case it calls the appropriate change track functions
| is_a_merger | if true, this function is called to match the total mass after a merger |
1- CHECK IF THE STAR HAS BECOME A pureHE
2- CHECK IF THE STAR HAS BECOME a NAKED CO
|
inline |
Function to call after a merger, it set the proper flags and call find_new_track
| utilities::jump_convergence Star::find_track_after_CE_Ebinding | ( | double | Ebind, |
| double | Min_Mass, | ||
| double | Max_mass, | ||
| bool | pureHE = false |
||
| ) |
| int Star::get_bse_phase | ( | ) | const |
| int Star::get_bse_phase_0 | ( | ) | const |
|
inline |
|
inline |
|
inline |
1) Max dt is the time to reach the end of the simulation
2) Max_dt_dtout, this is the maximum time to reach the next output time
3) Now we have two conditions for non remnant and not nakedco stars
3a) Do not jump more than two steps in the interpolating tables
3b) Use a dt so that we should have a minimum number of points per phase as defined in input (parameter ts_min_points_per_phase)
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return the initial parameters, the order of the parameters are the one in the Enum Star::Init_params. Notice if the parameter effective_values is false and there are some parameters that have been set in the command line option (e.f. Z) there will be a mismatch between the parameter returned by this function and the one currently used in the run. Be careful!
| effective_values | If false return the init_parameter as it is stores in init_params conserving the possible placeholder and the values from the input file, if true replace the placeholders and input values with the current effective values (Z from get_Z, sntype from get_sntype, tini from get_tini(), tfin from get_tfin(), dtout from get_dtout_original(),spin from get_svpar_str("spin") if != list or from the values stored in init_params) |
|
inline |
|
inline |
|
inline |
Method that return the current Timestep, i.e. the value from getp(Timestep::ID) if evolution_step_completed=false, i.e. we are currently evolving the properties the value from getp_0(Timestep::ID) if evolution_step_completed=false, i.e. if the the evolution step successfully ended and now getp(Timestep::ID) returns the Timestep predicted for the next step
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get rzams, if it has never been set set it.
|
inline |
|
inline |
|
inline |
| double Star::get_staremnant | ( | size_t | ID | ) |
|
inline |
|
inline |
|
inline |
Get the value of the parameters store in the svpar class in io.
|
inline |
|
inline |
Get the pointer to a given position inside the tables for Properties in table_id for given interpolating_track at position pos. For example get_table_atpos(_Mass,0,0) returns the pointer to the Mass tables for the interpolating track 0 (with Zams_0 and Z_0) at position in the array 0.
| tabled_id | Id of the table (see Lookup::Tables) |
| interpolating_track | Id of the interpolating track |
| pos | Position inside the table |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Check if the stars has a clear core/envelope separation.
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Set the 4 interpolating tracks and set the various variables to look into them. NB: The info here are used by the properties to set their interpolating weights. The weights can be different between properties. E.g. for the Mass the weights are linear, while for Luminosity and Radius the weights are estimated as the Log difference (between the interpolating Mass tracks).
Find Zlow and Zhigh
Find neighbour ZAMSs at zlow and zhigh
|
inlineprotected |
Wrapper of the function initialise_auxiliary_star(const Star *s, double mzams, double Z, std::string tini, bool pureHE), where tini is a double instead of a string. Internally it will transform tini to a string and call the origianl function
| s | pointer to an instance of class Star to get the initial parameters |
| mzams | New Mzams mass in Msun |
| Z | New Z metallicity |
| tini | New initial time (double) |
| pureHE | if true initialise it as a pureHE otherwsie as an H star |
|
inlineprotected |
This function takes care of the initiliasation of the auxiliary stars, i.e. stars that are generated starting from another star. Essentially, we got the initial parameters from another stars initialising a new stars. Notice, before to make the initiliasation we save the state of utilities::mtrand (it is a static threadlocal local varialbe, e.g. global variable for each thread), indeed during the initiliastion the mtrand engin will be reset, restarting the random number generation from the beginning. After the initliasation mtrand is restored to the old state so that the random number generation is not affcted by the creation of a auxiliary star. Without this save/restore, after a change of track mtrand is reset and if this happens before a SN kick you could end with a systems with the same natal kick for both stars chaning some of their parameters, i.e. Mzams,Z,tini, pureHE or not
| s | pointer to an instance of class Star to get the initial parameters |
| mzams | New Mzams mass in Msun |
| Z | New Z metallicity |
| tini | New initial time (string) |
| pureHE | if true initialise it as a pureHE otherwsie as an H star |
| double Star::inspect_param_dt | ( | std::string | p | ) |
Set the dtout parameter from the dtout in input
| p | String |
Check if the global variable is set
|
inline |
Set the zams mass of the star in Msun
| p | zams in Msun, if HE is added at the end the star will be initiliased as a pureHE |
|
inline |
Set the rseed for the star
| p | rseed |
|
inline |
Check if the global variable is set
|
inline |
Check if the global variable is set
|
inline |
Set time in Myr for tfin
| p | number or string end |
Check if the global variable is set
|
inline |
Set in Myr from tini. If the input is a number just return the number. Alternatively it can be ne name of a phase (zams,tms,hsb,cheb,tcheb,hesb,end) or a given fraction of phase lifetime, e.g. %80:2.
| p | Number or string |
| ignore_global | if true dot not consider the global input parameter tini |
Check if the global variable is set
Transform all to lowercase
TSTART
|
inline |
Set the Z of the star
| p | zams can be list or a number |
| ignore_global | if true dot not consider the global input parameter tini |
Check if the global variable is set
|
inlineprivate |
| bool Star::is_exploding_as_SNI | ( | ) | const |
Get the flag tobe_SNIa
|
inline |
| utilities::jump_convergence Star::jump_to_normal_tracks | ( | ) |
| utilities::jump_convergence Star::jump_to_pureHE_tracks | ( | ) |
|
protected |
Set the interpolating tracks info from the one stored in the input star s. The function modify the pointer to the interpolating tracks tables and update the properties weights
| s | star |
Set the new parameters
First of all change the properties (this is the first thing to do, before s is changed by the jump)
Init stars
|
inline |
This function return true if it exploded as SNII (remnant is NS or BH)
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
| std::string Star::log_message_SNIa | ( | ) |
Create a log message about SNIa explosion
|
inline |
|
inline |
Handle the losing of the envelope for the star
|
protected |
Jump to a new track matching the innermost core Mass at the same Phase and plife. It uses a bisection method to find the matching track.
| best_rel_err,reference | to a double, it stores the best relative error reached in the matching |
| is_a_merger | if true, this function is called to match the total mass after a merger |
Check if the innercore is too small do not jump
jump to the tracks with the best relative error.
|
protected |
Specialised function that finds new interpolating track for stars without He or CO core (Phase 1)
| best_rel_err,reference | to a double, it stores the best relative error reached in the matching. |
If the convergence has not been reached jump to the tracks with the best relative error.
|
protected |
Jump to a new track, matching the total mass (used for MS and pureMS stars)
| best_rel_err | Best relative error of the match |
| is_a_merger | if true, this function is called to match the total mass after a merger |
jump to the tracks with the best relative error.
|
inline |
|
inline |
|
inline |
|
inline |
Estimate the fraction of life spent in the current phase.
|
inline |
Print the current star properties. It is supposed that the evolution of this stars is not stopped by an error, therefore the summary is printed in the evolved files It uses the method print_evolved_summary and print_formatted_output of the class IO.h
|
inline |
Print the current star properties. It is supposed that the evolution of this stars is stopped by an error, therefore the summary is printed in the failed files It uses the method print_failed_summary and print_formatted_output of the class IO.h
| include_in_output | If true flush allstates to the output even if the evolution failed |
|
inline |
Print a message to the log file. It is a wrapper of the method log_put of the class IO
| message |
|
inline |
|
inline |
|
inline |
|
inline |
Record the current state and put it inside the 2D vector (allstates) containing all the states.
|
inline |
NOTICE, this function can be called only after a complete evolution step. Record the current state and put it inside the 2D vector (allstates) containing all the states. Then update the dtout_generator Then Evolve the NextOutput property.
Check that the evolution has been done
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inlineprotected |
Reset the current star to a new state. This is similar to the call of a constructor but without creating a new object
| mzams | New zams Mass of the star in Msun, default[Old values] |
| Z | New Z of the star, default[Old values] |
| tini | New initial age of the star in Myr, default[Old values] |
|
inlineprotected |
Reset the current star to a new state. This is similar to the call of a constructor but without creating a new object. Notice the reset cannot change tracks from normal to pureHE and viceversa
| mzams | New zams Mass of the star in Msun, default[Old values] |
| Z | New Z of the star, default[Old values] |
| tini | New initial age of the star in Myr, default[Old values] |
|
inline |
|
private |
Reset the staremnant pointer and cler the associated memory space. The pointer is then set to nullptr
|
inline |
Restore all the properties and handle some flags
Restore all the properties
Restore other keywords
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
Set flags.
|
inlineprotected |
|
inline |
Update MCO_max after a merge with another star. If the two stars already developed a CO core the maximum CO is the sum of the two, otherwise it is just the MCO_max of the star that already developed a CO core If neither of them has a CO core, the MCO_max remains unset (it is nan)/
| merged_star | Pointer to the merged star |
|
inlineprotected |
|
inline |
Update MHE_max after a merge with another star. If the two stars already developed a CO core the minimum MHE is the sum of the two, otherwise it is just the MHE_min of the star that already developed a CO core If neither of them has a CO core, the MHE_min remains unset (it is nan)/
| merged_star | Pointer to the merged star |
|
inlineprivate |
|
inline |
|
inline |
|
inlineprivate |
|
private |
Set the Rzams //WARNING! Since this use an auxiliary star, this method must no be called inside this special constructor otherwise it will generate a infinite nested call to this function.
|
inlineprivate |
| void Star::set_staremnant | ( | Staremnant * | remnant | ) |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
| void Star::tobe_exploded_as_SNI | ( | ) |
Set the flat tobe_SNIa to true. This is flag that can be used to delay the SNIa explosion that will be managed elsewhere in the code
|
inline |
|
protected |
|
inline |
Update the stellar properties after binary evolution (if any)
| Property_id | id of the Property to update in the list |
| DV | Variation of the property to update |
|
inlineprotected |
Add 1 to the counter of the tracks changes.
| Material Star::whatamidonating | ( | ) | const |
What material is transferred from this star to other objects through winds or rlo.
| Material Star::whatamidonating_0 | ( | ) | const |
What material is transferred from this star to other objects through winds or rlo considering the get_0 properties.
|
friend |
|
private |
|
private |
True if the star is following a Quasi-homogeneous evolution
|
private |
True if the star is evolving on pureHE tracks
|
private |
If true the star is considered auxiliary
|
private |
Break the evolution when the stars become remnant
| bool Star::changedphase |
If true, move star and interpolating track to a new phase. It is set in Timestep::evolve(Star *s) in property.h
|
protected |
|
private |
Unique pointer to a list generator to handle dtout
|
private |
|
protected |
|
private |
|
private |
If true this object has not been properly initiliased
|
private |
If true force the jump
|
private |
|
private |
|
private |
FLAGS.
|
private |
Set to true when the tini is zams or cheb for pureHE stars
|
private |
Pointer to io class
|
private |
If true the star is COnaked
|
private |
|
private |
|
private |
|
protected |
Counter for track jumps
|
protected |
maximum MCO reachable by this star. It is set the first time the star develop a CO core, i.e. pass from the phase 4 to 5
|
protected |
|
protected |
|
protected |
Current zams (actually it is the mass at the PreMS)
|
protected |
Initial zams (set only in the Star constructor) (actually it is the mass at the PreMS). Notice if we initiliase the star as remnant, this is the initial remant mass not the mass of the progenitor
|
private |
|
private |
|
private |
If true the star was a nakedCO before to become a remnant
| size_t Star::pos[4] |
It contains the index of the current position in the tables of the interpolating tracks. The current time is between i nad i+1
|
private |
Print al the intermediate steps
|
private |
If true print only the timesteps where events happen
|
private |
If true do not print intermediate steps
|
private |
Print each phase, currently disabled
|
private |
| bool Star::repeatstep |
If true, the evolution is restarted from the last point where repeastep=false. It is set in Timestep::evolve(Star *s) in property.h or in BTimestep::evolve(Binstar *binstar) in BinaryProperty.h
|
private |
|
protected |
raiud at t=tzams for the current interpolating track
|
protected |
initial radius at t=tzams (set only in the standard Star constructor). Notice if we initiliase the star as remnant, this indicate the radius of a non remnant star with zams=mass
|
private |
Pointer to the SN model. Notice this will point to dynamically allocated memory, it has to be freed in the destructor
|
private |
|
private |
Pointer to the remnant class
|
private |
|
private |
|
protected |
|
protected |
|
private |
|
protected |
| double* Star::times_in[4] |
Pointer to array containing the largest time present in the Time table of the interpolating tracks that is smaller than ttimes. It is updated in lookuppositions() (called inside evolvestar() )
|
protected |
|
private |
Flag that can be used to rember that this star is exploding as SN Ia
|
protected |
|
protected |
| double Star::ttimes[4] |
Contains the current times of the interpolating tracks (estimated using the plife). It is updated in tracktimes() (called inside
| double Star::vkick[4] |
Vkick
|
protected |
Current metallicity
|
protected |
Initial metallicity (set only in the Star constructor)
|
protected |