SEVN
Loading...
Searching...
No Matches
evolve_utility::EvolveBLC Class Reference

#include <evolve.h>

Inheritance diagram for evolve_utility::EvolveBLC:
evolve_utility::EvolveFunctor

Public Member Functions

 EvolveBLC (SevnLogging &svlog, bool record_state=true, bool include_failed=false)
 
int operator() (Binstar &binary) override
 
int operator() (_UNUSED Star &star) override
 
std::string name () override
 
virtual int operator() (_UNUSED Binstar &binary)
 

Static Public Member Functions

template<typename System >
static bool check_stalling (System &system)
 

Protected Member Functions

template<class System >
void final_print (System &system, bool evolution_result)
 

Static Protected Member Functions

template<class System >
static void catched_error_message (System &system, const sevnstd::sevnerr &e)
 
static long elapsed_time (std::chrono::steady_clock::time_point start_clock)
 

Protected Attributes

SevnLogging_svlog
 
const bool _record_state
 
const bool _include_failed
 
const Options_options
 

Detailed Description

Evolve functor specialised for the analysis of stages of binary lifetime with a compact object plus a luminous variable (BLC). @record_state_policy The states start to be recorded when the binary enters the first time in a BLC phase (bound compact + Luminous star) The last record is got the first time the binary exits the BLC phase (e.g. the Luminous star becomes a compact object or a merger occurs). Inside this window the state are recorded following the dtout option. When dtout=end only the first (start of the BLC) and last (end of the BLC) states are recorded. @break_evolve_policy TThe evolution is broken when a broken trigger is true (depending on the input tf) or after we conclude a BLC phase since there is no way that a new BLC phase can occur. @Extra_options Not used @binstar_evolve Yes @star_evolve raise Not implemented error @catch sevnerr

Constructor & Destructor Documentation

◆ EvolveBLC()

evolve_utility::EvolveBLC::EvolveBLC ( SevnLogging svlog,
bool  record_state = true,
bool  include_failed = false 
)
inlineexplicit

Member Function Documentation

◆ catched_error_message()

template<class System >
static void evolve_utility::EvolveFunctor::catched_error_message ( System &  system,
const sevnstd::sevnerr e 
)
inlinestaticprotectedinherited

Special error message printed to std::cerr. This message is always print do not throw errors and can be used to print a message of a catched error during during a system evolution

Parameters
eInstance of Sevnerror
system_namename of the system (sytem.get_name())
system_IDID of the system (system.get_ID())

◆ check_stalling()

template<typename System >
static bool evolve_utility::EvolveFunctor::check_stalling ( System &  system)
inlinestaticinherited

Check if the system has been evolving for more than a given threshold (standard 20 s) If this is the case throw a sevnerror The check is performed only if the option check_stalling is set to true @TODO it could be better to move the check_stalling parameter from bool to double including the maximum time allowed for the evolution

Template Parameters
SystemAn object of the class Star or Binary
Parameters
systemthe system for which we want to check if the evolution is stalling
Returns
EXIT success if the system is not stalling otherwise throw an error @error throw a sevnerror if the system has been evolving for more than the second set as threshold

◆ elapsed_time()

static long evolve_utility::EvolveFunctor::elapsed_time ( std::chrono::steady_clock::time_point  start_clock)
inlinestaticprotectedinherited

Measure the elapsed time in seconds from a given starting clock

Parameters
start_clock,aninstance of std::chrono::steady_clock::time_point, the elapsed time is estimated from this point
Returns
elapsed time in seconds (approximated to the nearest integer)

◆ final_print()

template<class System >
void evolve_utility::EvolveFunctor::final_print ( System &  system,
bool  evolution_result 
)
inlineprotectedinherited

◆ name()

std::string evolve_utility::EvolveBLC::name ( )
inlineoverridevirtual

Reimplemented from evolve_utility::EvolveFunctor.

◆ operator()() [1/3]

virtual int evolve_utility::EvolveFunctor::operator() ( _UNUSED Binstar binary)
inlinevirtualinherited

◆ operator()() [2/3]

int evolve_utility::EvolveBLC::operator() ( _UNUSED Star star)
inlineoverridevirtual

Reimplemented from evolve_utility::EvolveFunctor.

◆ operator()() [3/3]

int evolve_utility::EvolveBLC::operator() ( Binstar binary)
inlineoverride

Evolve

The special break condition is activated the first time one star is compact and the other not and the system is not broken

Member Data Documentation

◆ _include_failed

const bool evolve_utility::EvolveFunctor::_include_failed
protectedinherited

◆ _options

const Options* evolve_utility::EvolveFunctor::_options
protectedinherited

◆ _record_state

const bool evolve_utility::EvolveFunctor::_record_state
protectedinherited

◆ _svlog

SevnLogging& evolve_utility::EvolveFunctor::_svlog
protectedinherited

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