SEVN
Loading...
Searching...
No Matches
StandardCircularisation Class Referenceabstract

#include <Circularisation.h>

Inheritance diagram for StandardCircularisation:
Circularisation Process CircularisationAngMom CircularisationPeriastron CircularisationSemimajor CircularisationPeriastronFull

Public Types

typedef std::map< std::string, size_t > _PrintMap
 

Public Member Functions

 StandardCircularisation (_UNUSED IO *_io=nullptr, bool _UNUSED=true)
 
int evolve (_UNUSED Binstar *binstar) override
 
int special_evolve (_UNUSED Binstar *binstar) override
 
std::string name () override
 
CircularisationInstance (_UNUSED IO *_io) override
 
virtual Circularisationinstance ()
 
double get (const size_t &id)
 
double get_var (const size_t &starID, const size_t &propID)
 
std::string & get_msg ()
 
void restore ()
 
int modify_SemimajorDV_by_a_factor (double factor)
 
int modify_EccentricityDV_by_a_factor (double factor)
 
bool is_mass_transfer_happening ()
 
virtual bool is_process_ongoing () const
 
void set_event (double code)
 Events handling. More...
 
double get_event ()
 
void reset_event ()
 
void special_evolution_alarm_switch_on ()
 Three methods to handle the private member special_evolution_alarm. More...
 
void special_evolution_alarm_switch_off ()
 
bool is_special_evolution_alarm_on () const
 
virtual double estimate_accreted_mass (_UNUSED double DM, _UNUSED Star *donor, _UNUSED Star *accretor, _UNUSED Binstar *binstar) const
 

Static Public Attributes

static size_t ID
 
static Circularisation _circularisation
 
static std::vector< Process * > all
 
static _PrintMap PrintMap
 

Protected Member Functions

virtual int circularise (_UNUSED Binstar *binstar)=0
 
virtual bool check_activation (Binstar *binstar) const
 
virtual std::string log_message_circ (Binstar *binstar, double a_new, double e_new) const
 
void Register (Process *_p, size_t *id, const std::string &_name)
 
void set (const size_t &id, const double &value)
 
void set_var (const size_t &starID, const size_t &propID, const double &value)
 
void set_msg (const std::string &str)
 
void set_V_to_0 ()
 

Static Protected Member Functions

static std::map< std::string, Circularisation * > & GetStaticMap ()
 
static std::vector< int > & GetUsed ()
 
static void Register_specific (Circularisation *ptr)
 

Protected Attributes

bool check_condition =false
 
Stardonor = nullptr
 
Staraccretor = nullptr
 
SevnLogging svlog
 
Orbital_changeorb_change = nullptr
 
std::uniform_real_distribution< double > _uniform_real
 

Private Attributes

std::vector< double > VB
 
std::vector< std::vector< double > > VS
 
std::string message
 
double event_code =-1
 
bool special_evolution_alarm =false
 

Static Private Attributes

static size_t size = 0
 

Detailed Description

Template class for standard circularisation, i.e. change impulsively the value of a and e

Member Typedef Documentation

◆ _PrintMap

typedef std::map<std::string,size_t> Process::_PrintMap
inherited

Constructor & Destructor Documentation

◆ StandardCircularisation()

StandardCircularisation::StandardCircularisation ( _UNUSED IO _io = nullptr,
bool  _UNUSED = true 
)
inline

Member Function Documentation

◆ check_activation()

bool StandardCircularisation::check_activation ( Binstar binstar) const
protectedvirtual

Check the triggering condition of the circularisation

Parameters
binstarPointer to the binary
Returns
True if the RLO is ongoing

Reimplemented in CircularisationPeriastronFull.

◆ circularise()

virtual int StandardCircularisation::circularise ( _UNUSED Binstar binstar)
protectedpure virtual

Actual method to estimate the change on a due to the circularisation and set the variation. It is a pure/virtual method, so it has to be implemented in all the other derived classes

Parameters
binstarPointer to the binary
Returns
EXIT_SUCCESS

Implemented in CircularisationPeriastron, CircularisationAngMom, and CircularisationSemimajor.

◆ estimate_accreted_mass()

virtual double Process::estimate_accreted_mass ( _UNUSED double  DM,
_UNUSED Star donor,
_UNUSED Star accretor,
_UNUSED Binstar binstar 
) const
inlinevirtualinherited

Public interface to allow the user to get information without actually evolving the systems. NOTICE: to be self-consistent the protected and private methods (such DA and DE should use these methods) when changing the properties of stars and binaries. This function should be an interface for the user to return the amount of mass accreted on the accretor given the binary, the donor and the available amount of mass DM. NOTICE: internally the accrete mass should use this method to be self-consistent

Parameters
DMamount of mass available to be accreted in Msun.
donorPointer to the Star that is donating the mass
accretorPointer to the star that is receiving the mass
binstarPointer to the binary system hosting the donor and the accretore
Returns
the amount of accreted mass

Reimplemented in WindaccretionHurley.

◆ evolve()

int StandardCircularisation::evolve ( _UNUSED Binstar binstar)
overridevirtual

The standard evolve just check if the circularisation conditions have been reached and set a couple of flag.

Parameters
binstarPointer to the binary
Returns
EXIT SUCCESS

Reimplemented from Process.

◆ get()

double Process::get ( const size_t &  id)
inlineinherited

◆ get_event()

double Process::get_event ( )
inlineinherited

◆ get_msg()

std::string & Process::get_msg ( )
inlineinherited

◆ get_var()

double Process::get_var ( const size_t &  starID,
const size_t &  propID 
)
inlineinherited

◆ GetStaticMap()

static std::map< std::string, Circularisation * > & Circularisation::GetStaticMap ( )
inlinestaticprotectedinherited

◆ GetUsed()

static std::vector< int > & Circularisation::GetUsed ( )
inlinestaticprotectedinherited

◆ instance()

virtual Circularisation * Circularisation::instance ( )
inlinevirtualinherited

◆ Instance()

Circularisation * Circularisation::Instance ( _UNUSED IO _io)
overridevirtualinherited

Reimplemented from Process.

◆ is_mass_transfer_happening()

bool Process::is_mass_transfer_happening ( )
inlineinherited

Check if this process is changing the mass

Returns
false if the DV regarding the Mass of both stars is currently set to 0, true otherwise

◆ is_process_ongoing()

virtual bool Process::is_process_ongoing ( ) const
inlinevirtualinherited

Check if the current process is ongoing

Returns
true if the process is ongoing, false otherwise

Reimplemented in Kollision, Hardening, Windaccretion, WindaccretionHurley, and WindaccretionDisabled.

◆ is_special_evolution_alarm_on()

bool Process::is_special_evolution_alarm_on ( ) const
inlineinherited

◆ log_message_circ()

std::string StandardCircularisation::log_message_circ ( Binstar binstar,
double  a_new,
double  e_new 
) const
protectedvirtual

Standard log-message for circularisation. It just reportes the old and new orbital parameters

Parameters
binstarPointer to the binary
a_newsemimajor axis after circularisation
e_neweccentricity a
Returns

◆ modify_EccentricityDV_by_a_factor()

int Process::modify_EccentricityDV_by_a_factor ( double  factor)
inlineinherited

Correct the VB cell containing the Eccentricity variation

Parameters
factorcorrection factor the new DE will be DE*factor.
Returns
EXIT_SUCCESS

◆ modify_SemimajorDV_by_a_factor()

int Process::modify_SemimajorDV_by_a_factor ( double  factor)
inlineinherited

Correct the VB cell containing the Semimajor variation

Parameters
factorcorrection factor the new DA will be DA*factor.
Returns
EXIT_SUCCESS

◆ name()

std::string Circularisation::name ( )
inlineoverridevirtualinherited

◆ Register()

void Process::Register ( Process _p,
size_t *  id,
const std::string &  _name 
)
inlineprotectedinherited

◆ Register_specific()

static void Circularisation::Register_specific ( Circularisation ptr)
inlinestaticprotectedinherited

◆ reset_event()

void Process::reset_event ( )
inlineinherited

◆ restore()

void Process::restore ( )
inlineinherited

◆ set()

void Process::set ( const size_t &  id,
const double &  value 
)
inlineprotectedinherited

◆ set_event()

void Process::set_event ( double  code)
inlineinherited

Events handling.

◆ set_msg()

void Process::set_msg ( const std::string &  str)
inlineprotectedinherited

◆ set_V_to_0()

void Process::set_V_to_0 ( )
inlineprotectedinherited

◆ set_var()

void Process::set_var ( const size_t &  starID,
const size_t &  propID,
const double &  value 
)
inlineprotectedinherited

◆ special_evolution_alarm_switch_off()

void Process::special_evolution_alarm_switch_off ( )
inlineinherited

◆ special_evolution_alarm_switch_on()

void Process::special_evolution_alarm_switch_on ( )
inlineinherited

Three methods to handle the private member special_evolution_alarm.

◆ special_evolve()

int StandardCircularisation::special_evolve ( _UNUSED Binstar binstar)
overridevirtual

Special evolve, just call circularise and disable a and e check in the adaptive timestep

Parameters
binstarPointer to the binary
Returns
0 (it measn that the binary is not broken)

Reimplemented from Process.

Member Data Documentation

◆ _circularisation

Circularisation Circularisation::_circularisation
staticinherited

◆ _uniform_real

std::uniform_real_distribution<double> Process::_uniform_real
protectedinherited

◆ accretor

Star* Process::accretor = nullptr
protectedinherited

◆ all

std::vector< Process * > Process::all
staticinherited

◆ check_condition

bool StandardCircularisation::check_condition =false
protected

auxiliary variable used to check when the circularisation has to be activated

◆ donor

Star* Process::donor = nullptr
protectedinherited

◆ event_code

double Process::event_code =-1
privateinherited

◆ ID

size_t Circularisation::ID
staticinherited

◆ message

std::string Process::message
privateinherited

◆ orb_change

Orbital_change* Process::orb_change = nullptr
protectedinherited

◆ PrintMap

Process::_PrintMap Process::PrintMap
staticinherited

◆ size

size_t Process::size = 0
staticprivateinherited

Instruction for adding new property PROC 1- Add the size_t PROC::ID 2- Initialise the static (fake) instance PROC PROC::_proc. NB: take care of the order of initialisation. The processes will be evolved exactly in the same order in which they are initialised here Define: @size: total number of instances of Process and derived classes (both fake and real). @all: vector containing all the (pointers) to the processes. @PrintMap: map containing the pair (process_name, process_id) for output purpose. Note all and PrintMap are filled during the instantiation of the fake Processes (see below)

◆ special_evolution_alarm

bool Process::special_evolution_alarm =false
privateinherited

Member used to check if a special evolution is required

◆ svlog

SevnLogging Process::svlog
protectedinherited

◆ VB

std::vector<double> Process::VB
privateinherited

values of the properties of the binary system (e.g. processes change eccentricity, semimajor...)

◆ VS

std::vector<std::vector<double> > Process::VS
privateinherited

variations of the single star parameters due to binary stellar evolution processes (e.g. mass, radius...)


The documentation for this class was generated from the following files: