#include <property.h>
|
| typedef std::map< std::string, size_t > | _PrintMap |
| |
|
| | Timestep (bool reg=true) |
| |
| Timestep * | Instance () override |
| |
| std::string | name () const override |
| |
| double | timestep_remnant (Star *s) |
| |
| void | set_remnant (_UNUSED Star *s) override |
| |
| void | set_remnant_in_bse (_UNUSED Star *s, _UNUSED Binstar *b) override |
| |
| void | evolve_remnant (_UNUSED Star *s) override |
| |
| void | evolve_nakedco (_UNUSED Star *s) override |
| |
| void | set_empty (_UNUSED Star *s) override |
| |
| void | set_empty_in_bse (_UNUSED Star *s, _UNUSED Binstar *b) override |
| |
| void | evolve_empty (_UNUSED Star *s) override |
| |
| bool | check_repeat (_UNUSED Star *s, const double &m0, const double &m, const double &derivative, const double tstart) |
| |
| bool | check_repeat_almost_naked (_UNUSED Star *s) |
| |
| void | evolve (_UNUSED Star *s) override |
| |
| void | synch () override |
| |
| void | resynch (const double &dt, bool set0) override |
| |
| void | resynch (Star *s) override |
| |
| void | changed_track (_UNUSED Star *s, _UNUSED Star *s_jtrack) override |
| |
| virtual void | copy_V_from (Property *p) |
| |
| virtual bool | amiderived () |
| |
| virtual void | resynch (_UNUSED const double &dt, _UNUSED bool set0=true) |
| |
| virtual void | resynch (_UNUSED Star *s) |
| |
| virtual size_t | TabID () |
| |
| virtual void | special_evolve (_UNUSED Star *s) |
| |
| virtual void | evolve_fake (Star *s) |
| |
| virtual void | init (_UNUSED const double &a) |
| |
| virtual void | evolve_real () |
| |
| virtual void | update_from_binary (_UNUSED Star *s, const double &DV, _UNUSED Binstar *b=nullptr) |
| |
| virtual void | update_derived (_UNUSED Star *s) |
| |
| virtual void | update_variation () |
| |
| virtual void | correct_interpolation_errors (_UNUSED Star *s) |
| |
| virtual void | correct_interpolation_errors_real (_UNUSED Star *s) |
| |
| virtual void | restore () |
| |
| virtual void | reset () |
| |
| virtual double | get_fk (_UNUSED const Star *s=nullptr) |
| |
| virtual double | get_0_fk (_UNUSED const Star *s=nullptr) |
| |
| virtual double | get (_UNUSED const Star *s=nullptr) |
| |
| virtual double | get_0 (_UNUSED const Star *s=nullptr) |
| |
| double | get_fk_raw (_UNUSED const Star *s=NULL) const |
| |
| double | get_0_fk_raw (_UNUSED const Star *s=NULL) const |
| |
| double | get_raw (_UNUSED const Star *s=NULL) const |
| |
| double | get_0_raw (_UNUSED const Star *s=NULL) const |
| |
| virtual double | get_Vlast (_UNUSED const Star *s) const |
| |
| double * | get_wm () |
| |
| double * | get_wz () |
| |
| virtual void | set_w (_UNUSED Star *s) |
| |
| virtual bool | are_table_loaded () const |
| |
| virtual void | set_refpointers (_UNUSED Star *s) |
| |
◆ _PrintMap
◆ Timestep()
| Timestep::Timestep |
( |
bool |
reg = true | ) |
|
|
inline |
◆ amiderived()
| virtual bool Property::amiderived |
( |
| ) |
|
|
inlinevirtualinherited |
Check if this is a derived. A property is defined dervied if it is estimated by the combination of other properties and it is not the derivative of a property.
- Returns
- true if it is derived, false if it is not (overrided in the derived properties)
Reimplemented in Derived_Property, and OptionalTableProperty.
◆ are_table_loaded()
| virtual bool Property::are_table_loaded |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ changed_track()
Handle the modification of the property after a track change. It does nothing by default.
- Parameters
-
| s | The star for which we are changing the tracks. |
| s_jtrack | The star that we are using to get info of the new tracks. |
Reimplemented from Property.
◆ check_dt_limits()
| void Timestep::check_dt_limits |
( |
double & |
dt, |
|
|
Star * |
s |
|
) |
| |
|
protected |
Check if the proposed dt is larger than max_dt or lower than min_dt. In that cases force dt to be one of the limits.
- Parameters
-
| dt | reference to the timestep to analyse |
| s | pointer to the star |
◆ check_repeat()
| bool Timestep::check_repeat |
( |
_UNUSED Star * |
s, |
|
|
const double & |
m0, |
|
|
const double & |
m, |
|
|
const double & |
derivative, |
|
|
const double |
tstart |
|
) |
| |
|
inline |
This function check if the current evolution time step has caused a too fast evolution of a property with values m0 (before the evolution), m (after the evolution) and time derivative (derivative). If the property is related to some subphase (e.g. MHE, MCO) we should also set the initial time of this phase with the parameter tstart. If the property has not subphases (e.g. the Radius) tstart should be set to 0. At the beginning of the function the new_dt is set to the max dt allowed (Delta_t phase/starparameter::min_points_per_phase). Then if tstart is 0 the function check if the relative variation (m -m0)/ m is lower that 2 times starparameter::maximum_variation (default 0.05). If it is lower return false, else set a new dt to half of the current dt and set repeat to true. if tstart is not 0 there are different options: if m0=0 and m>starparameter::maximum_variation: set a new_dt as 0.5*(Localtime - tstart) + (tstart - Localtime_0) (time from Localtime_0 to start + half of Localtime-tstart) if the realtive variaiton ((Localtime + new_dt)-tstart)/tstart <1e-2 do not repeat else repeat with the new dt (return immediatly). if m0>2 and relative difference (m-m0)/m0 < 2*starparameter::maximum_variation not needed to repeat else set repeat to true and set new_dt=starparameter::maximum_variation*(m/derivative) if m02<2 and absolute difference (m-m0) <4*starparameter::maximum_variation not needed to repeat else set repeat to true and new_dt=2.0*starparameter::maximum_variation*(m/derivative)
Finally there is a final check, if the new_dt is larger than 0.8*dt return False.
Example of usage
static size_t ID
Definition: property.h:826
static size_t ID
Definition: property.h:713
bool check_repeat(_UNUSED Star *s, const double &m0, const double &m, const double &derivative, const double tstart)
Definition: property.cpp:1516
static size_t ID
Definition: property.h:1737
static size_t ID
Definition: property.h:1799
- Parameters
-
| s | Object of class star |
| m0 | Value to check (before the evolution) |
| m | Value to check (after the evolution) |
| derivative | derivative of the value to check |
| tstart | Starting time of a given subphase if we are checking the core mass of that subphase. E.g. s->hestart(). If we are checking a varaible without subphase tstart should be set to 0. |
- Returns
- Return true if the evolve step should be reset and repeated with a new smaller time step. The new time step is selected inside the function with set(new_dt).
- Note
- This function is called inside Timestep::evolve. Notice that the new_dt is only used for the repeated step. If this function return false the proper new time step is estimated in Timestep::evolve.
◆ check_repeat_almost_naked()
| bool Timestep::check_repeat_almost_naked |
( |
_UNUSED Star * |
s | ) |
|
|
inline |
This function check if the star is close to become a pureHE or nakedCO (the difference between Mass and MHE or MHE and CO or Mass and CO are smaller than ev_naked_tshold)
- Parameters
-
- Returns
◆ copy_V_from() [1/2]
|
|
inlineoverrideprivateinherited |
◆ copy_V_from() [2/2]
| virtual void Property::copy_V_from |
( |
Property * |
p | ) |
|
|
inlinevirtualinherited |
◆ correct_interpolation_errors()
| virtual void Property::correct_interpolation_errors |
( |
_UNUSED Star * |
s | ) |
|
|
inlinevirtualinherited |
◆ correct_interpolation_errors_real()
| virtual void Property::correct_interpolation_errors_real |
( |
_UNUSED Star * |
s | ) |
|
|
inlinevirtualinherited |
◆ evolve()
Evolve the Timestep, the new value V will be the dt to use in the next iteration. The function passes through the following steps:
- Check if the MHE, MCO or the Radius have evolved too much (comparing with starparameter::maximum_variation). If this happened the function set repeat to True and set a new dt (see Timestep::checkrepeat)
- If not needed to repeat determine next dt by imposing a maximum relative variation of stellar mass and radius.
- Check if the dt should be changed because we are close to phase change (e.g. formation of the He core, CO core, remnant, ...)
- Set reference_time to 0 if Localtime + new_dt<time_next_phase else reference_time=time_next_phase
- if reference_time is 0, new_dt=min(new_dt, 0.999*(reference_time - Localtime) ) else new_dt=min(new_dt, 1.001 *(reference_time -Localtime).
- Finally set Timestep::V to new_dt
- Parameters
-
Timestep
Check and repeat
Check on Wolrdtime
Predict timestep trying to avoid the Mass to become smaller than the MHE
Spins
Reimplemented from Property.
◆ evolve_empty()
◆ evolve_fake()
| void Property::evolve_fake |
( |
Star * |
s | ) |
|
|
virtualinherited |
Set v0=v
Move to new value in the interpolating track
Find new values at times t for the interpolatring tracks using linear interpolation
Find the interpolating z value, M1*v1 + M2*v2
Find the final interpolated value, v=Z1*v1 + Z2*v2
Reimplemented in Radius.
◆ evolve_nakedco()
◆ evolve_real()
| virtual void Property::evolve_real |
( |
| ) |
|
|
inlinevirtualinherited |
◆ evolve_remnant()
◆ get()
| virtual double Property::get |
( |
_UNUSED const Star * |
s = nullptr | ) |
|
|
inlinevirtualinherited |
Reimplemented in Radius, Luminosity, Inertia, Lambda, Ebind, PhaseBSE, Zams, Zmet, Event, dMRLOdt, dMaccwinddt, NSsalpha, and Plife.
◆ get_0()
| virtual double Property::get_0 |
( |
_UNUSED const Star * |
s = nullptr | ) |
|
|
inlinevirtualinherited |
◆ get_0_fk()
| virtual double Property::get_0_fk |
( |
_UNUSED const Star * |
s = nullptr | ) |
|
|
inlinevirtualinherited |
◆ get_0_fk_raw()
| double Property::get_0_fk_raw |
( |
_UNUSED const Star * |
s = NULL | ) |
const |
|
inlineinherited |
◆ get_0_raw()
| double Property::get_0_raw |
( |
_UNUSED const Star * |
s = NULL | ) |
const |
|
inlineinherited |
◆ get_fk()
| virtual double Property::get_fk |
( |
_UNUSED const Star * |
s = nullptr | ) |
|
|
inlinevirtualinherited |
Here Star is optional, because it is needed only by property that have to estimate V on the fly. Notice that const Star*s means that inside the function we can only call method that we are sure will not change the Star s.
Reimplemented in Radius, Luminosity, Inertia, and JIT_Property.
◆ get_fk_raw()
| double Property::get_fk_raw |
( |
_UNUSED const Star * |
s = NULL | ) |
const |
|
inlineinherited |
◆ get_raw()
| double Property::get_raw |
( |
_UNUSED const Star * |
s = NULL | ) |
const |
|
inlineinherited |
◆ get_Vlast()
| virtual double Property::get_Vlast |
( |
_UNUSED const Star * |
s | ) |
const |
|
inlinevirtualinherited |
Get the value of the property expected at the end of the evolution (before becoming a remnant). It is based on the last values of the tables.
- Parameters
-
- Returns
- The value of the property at the end of the evolution estimated as the weighted mean of the interpolating track values
◆ get_wm()
| double * Property::get_wm |
( |
| ) |
|
|
inlineinherited |
◆ get_wz()
| double * Property::get_wz |
( |
| ) |
|
|
inlineinherited |
◆ handle_star_check_repeat()
| void Timestep::handle_star_check_repeat |
( |
Star * |
s | ) |
|
|
protected |
Set or reset the appropriate flag on Star after a check and repeat
- Parameters
-
◆ init()
| virtual void Property::init |
( |
_UNUSED const double & |
a | ) |
|
|
inlinevirtualinherited |
◆ Instance()
◆ name()
| std::string Timestep::name |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ Register()
| void Property::Register |
( |
Property * |
_p, |
|
|
size_t * |
id, |
|
|
const std::string & |
_name |
|
) |
| |
|
inlineprotectedinherited |
◆ reset()
| virtual void Property::reset |
( |
| ) |
|
|
inlinevirtualinherited |
◆ restore()
| virtual void Property::restore |
( |
| ) |
|
|
inlinevirtualinherited |
◆ resynch() [1/4]
| virtual void Property::resynch |
( |
_UNUSED const double & |
dt, |
|
|
_UNUSED bool |
set0 = true |
|
) |
| |
|
inlinevirtualinherited |
◆ resynch() [2/4]
◆ resynch() [3/4]
| void Timestep::resynch |
( |
const double & |
dt, |
|
|
bool |
set0 |
|
) |
| |
|
inlineoverride |
◆ resynch() [4/4]
| void Timestep::resynch |
( |
Star * |
s | ) |
|
|
override |
◆ safety_check()
| virtual void Property::safety_check |
( |
| ) |
|
|
inlineprotectedvirtualinherited |
◆ set()
| virtual void Property::set |
( |
const double & |
a | ) |
|
|
inlineprotectedvirtualinherited |
◆ set_0()
| virtual void Property::set_0 |
( |
const double & |
a | ) |
|
|
inlineprotectedvirtualinherited |
◆ set_0_fk()
| void Property::set_0_fk |
( |
const double & |
a | ) |
|
|
inlineprotectedinherited |
◆ set_empty()
◆ set_empty_in_bse()
The only difference with set_empty is that we do not change T0 because we are inside BSE
- Parameters
-
| s | Pointer to Star |
| b | Pointer to Binary |
Reimplemented from Property.
◆ set_fk()
| void Property::set_fk |
( |
const double & |
a | ) |
|
|
inlineprotectedinherited |
◆ set_refpointers()
| virtual void Property::set_refpointers |
( |
_UNUSED Star * |
s | ) |
|
|
inlinevirtualinherited |
◆ set_remnant()
◆ set_remnant_in_bse()
The only difference with set_remnant is that we do not change T0 because we are inside BSE
- Parameters
-
| s | Pointer to Star |
| b | Pointer to Binary |
Reimplemented from Property.
◆ set_VBIN()
| void Property::set_VBIN |
( |
const size_t & |
id, |
|
|
const double & |
a |
|
) |
| |
|
inlineprotectedinherited |
◆ set_w()
◆ size()
| static size_t Property::size |
( |
| ) |
|
|
inlinestaticinherited |
◆ special_evolve()
| virtual void Property::special_evolve |
( |
_UNUSED Star * |
s | ) |
|
|
inlinevirtualinherited |
◆ synch()
◆ TabID()
| virtual size_t Property::TabID |
( |
| ) |
|
|
inlinevirtualinherited |
◆ timestep_remnant()
| double Timestep::timestep_remnant |
( |
Star * |
s | ) |
|
◆ units()
| std::string Time_object::units |
( |
| ) |
|
|
inlineoverrideprivatevirtualinherited |
◆ update_derived()
| virtual void Property::update_derived |
( |
_UNUSED Star * |
s | ) |
|
|
inlinevirtualinherited |
This function can be called to update the value of V in derived proprties (without setting V0) It is empty for all the others. This is needed since after a binary evolution, the derived properties have to be updated without setting V0 (same as update_from_binary).
Reimplemented in JIT_Property.
◆ update_from_binary()
◆ update_variation()
| virtual void Property::update_variation |
( |
| ) |
|
|
inlinevirtualinherited |
◆ _size
| size_t Property::_size = 0 |
|
staticprotectedinherited |
Instruction for adding new property PROP 1- Add the size_t PROP::ID 2- Initialise the static (fake) instance PROP PROP::_prop. NB: take care of the order of initilisation. The properies will be evolved exactly in the same order in which they are initialised here Define: @size: total number of instances of Property and derived classes (both fake and real). @all: vector containing all the (pointers) to the Property. @PrintMap: map containing the pair (Property_name, Property_id) for output purpose. Note all and PrintMap are filled during the instantiation of the fake Processes (see below)
◆ _timestep
◆ all
◆ checked_almost_naked
| bool Timestep::checked_almost_naked =false |
|
private |
◆ Dvalue
◆ ID
◆ interpolating_values
| double Property::interpolating_values[4] |
|
protectedinherited |
◆ PrintMap
◆ svlog
◆ V0
◆ val_in
| double* Property::val_in[4] |
|
inherited |
◆ val_ref
| double* Property::val_ref[4] |
|
inherited |
◆ value
◆ value0
◆ VBIN
| vector<double> Property::VBIN |
|
protectedinherited |
◆ wM
◆ wZ
The documentation for this class was generated from the following files:
- /Users/giulianoiorio/Documents/sevn_public/src/star/property.h
- /Users/giulianoiorio/Documents/sevn_public/src/star/property.cpp
- /Users/giulianoiorio/Documents/sevn_public/include/static_main.h