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

#include <evolve.h>

Inheritance diagram for evolve_utility::EvolveBHMSTarantula:
evolve_utility::EvolveStopCondition evolve_utility::EvolveFunctor

Public Member Functions

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

Static Public Member Functions

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

Protected Member Functions

bool stop_condition (Binstar &binstar) override
 
virtual bool stop_condition (_UNUSED Binstar &binstar)
 
virtual bool stop_condition (_UNUSED Star &star)
 
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 analysis of the BH-MS objects by https://ui.adsabs.harvard.edu/abs/2022NatAs...6.1085S/abstract @record_state_policy The state is recorded only the first time the system becomes BH - Main sequence system with some other requirements (see the stop_condition method). dtout is not used @break_evolve_policy The evolution is stopped when the conditions in the method stop_condition are fulfilled or following the tf input option. @Extra_options Not used @binstar_evolve Yes @star_evolve raise Not implemented error @catch sevnerr

Constructor & Destructor Documentation

◆ EvolveBHMSTarantula()

evolve_utility::EvolveBHMSTarantula::EvolveBHMSTarantula ( 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::EvolveBHMSTarantula::name ( )
inlineoverridevirtual

◆ operator()() [1/4]

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

◆ operator()() [2/4]

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

Reimplemented from evolve_utility::EvolveFunctor.

◆ operator()() [3/4]

virtual int evolve_utility::EvolveStopCondition::operator() ( Binstar binary)
inlineoverridevirtualinherited

Evolve

Check record state

◆ operator()() [4/4]

virtual int evolve_utility::EvolveStopCondition::operator() ( Star star)
inlineoverridevirtualinherited

Evolve

Check record state

◆ stop_condition() [1/3]

virtual bool evolve_utility::EvolveStopCondition::stop_condition ( _UNUSED Binstar binstar)
inlineprotectedvirtualinherited

◆ stop_condition() [2/3]

virtual bool evolve_utility::EvolveStopCondition::stop_condition ( _UNUSED Star star)
inlineprotectedvirtualinherited

◆ stop_condition() [3/3]

bool evolve_utility::EvolveBHMSTarantula::stop_condition ( Binstar binstar)
inlineoverrideprotected

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: