![]() |
SEVN
|
#include <params.h>
Public Member Functions | |
| SEVNpar () | |
| Constructor. More... | |
| SEVNpar (int argc, char **argv) | |
| ~SEVNpar () | |
| int | load (int n, char **val, bool initialise=false) |
| load More... | |
| const map_num & | get_num_map () |
| GET and GET like stuff. More... | |
| const map_str & | get_str_map () |
| const map_bool & | get_bool_map () |
| double | get_num (std::string name) |
| std::string | get_str (std::string name) |
| bool | get_bool (std::string name) |
| int | get (std::string name, double &val) |
| int | get (std::string name, std::string &val) |
| int | get (std::string name, bool &val) |
| std::vector< std::string > | keys () |
| int | set (std::string name, double val) |
| SET and SET like stuff. More... | |
| int | set (std::string name, std::string val) |
| int | set_zlimit (const std::vector< double > &Zlist) |
| SPECIAL SET. More... | |
| int | set_zlimit_HE (const std::vector< double > &Zlist_HE) |
| int | set_zams_limit (const std::vector< std::vector< double > > &Zams_list) |
| int | set_zams_limit_he (const std::vector< std::vector< double > > &Zams_list_HE) |
| int | set_myself () |
| int | set_tables (std::string tables) |
| int | set_tablesHE (std::string tablesHE) |
| std::string | print (bool use_default=false) |
| double | ts_maximum_variation () |
| Parameter function. More... | |
Protected Attributes | |
| SevnLogging | svlog |
Static Protected Attributes | |
| static std::size_t | instance_counter =0 |
Private Member Functions | |
| int | prv_set (std::string name, double val) |
| SET. More... | |
| int | prv_set (std::string name, std::string val) |
| int | prv_set (std::string name, bool val) |
| int | set_from_string (std::string name, std::string val) |
| bool | is_public_settable (std::string name) |
| bool | is_private_settable (std::string name) |
| bool | is_settable (std::string name) |
| bool | is_num_par (std::string name) |
| bool | is_str_par (std::string name) |
| bool | is_bool_par (std::string name) |
| bool | is_par (std::string name) |
| int | default_value_num () |
| Initialisation methods. More... | |
| int | default_value_str () |
| int | default_value_bool () |
| int | init () |
| bool | check () |
| CHECK. More... | |
| bool | check_star () |
| bool | check_ns () |
| bool | check_sn () |
| bool | check_timestep () |
| bool | check_mzams () |
| bool | check_mzams_he () |
| bool | check_z () |
| bool | check_z_he () |
| bool | check_jtrack () |
| bool | check_rlobe () |
| bool | check_GW () |
| bool | check_winds () |
| bool | check_accretion () |
| bool | check_ce () |
| bool | check_hard () |
| bool | check_parameters () |
| bool | check_option_mode () |
| bool | check_ev () |
| bool | check_log () |
| bool | check_systems () |
| std::string | n2s (std::string name) |
| std::string | n2s (double val) |
Private Attributes | |
| map_num | params_num |
| map_str | params_str |
| map_bool | params_bool |
Static Private Attributes | |
| static std::set< std::string > | public_settable {} |
| static std::set< std::string > | private_settable |
Friends | |
| std::ostream & | operator<< (std::ostream &os, SEVNpar &svpar) |
|
inline |
Constructor.
Default constructor: just the parameters to the default value.
|
inline |
Constructor to load parameters from line command
| argc | Number of arguments |
| argv | arguments |
|
inline |
|
inlineprivate |
CHECK.
Method to check the values of the parameters
| sevnstd::params_error | Thrown if one of the checks raise an error when it is not satisfied |
|
inlineprivate |
|
inlineprivate |
check the parameter(s) related to the common envelope process.
| sevnstd::params_error | Thrown if one of the checks fail. |
|
inlineprivate |
Check the parameter(s) related to the general evolution process
| sevnstd::params_error | Thrown if one of the checks fail. |
|
inlineprivate |
check the parameter(s) related to the GW rad process.
| sevnstd::params_error | Thrown if one of the checks fail. |
|
inlineprivate |
check the paramters related to the hardening process.
| sevnstd::params_error | Thrown if one of the checks fail. |
|
inlineprivate |
check the parameter(s) related the tracks jump
| sevnstd::params_error | Thrown if one of the checks fail. |
|
inlineprivate |
|
inlineprivate |
check the parameter(s) containing the limit of the ZAMS mass from the tables.
| sevnstd::params_error | Thrown if one of the checks fail. |
|
inlineprivate |
check the parameter(s) containing the limit of the ZAMS mass from the pureHE tables.
| sevnstd::params_error | Thrown if one of the checks fail. |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Check the parameter(s) related to the Roche Lobe Overflow
| sevnstd::params_error | Thrown if one of the checks fail. |
|
inlineprivate |
|
inlineprivate |
check the parameter(s) related to the star properties.
| sevnstd::params_error | Thrown if one of the checks fail. |
|
inlineprivate |
|
inlineprivate |
check the parameter(s) related to the adaptive time step.
| sevnstd::params_error | Thrown if one of the checks fail. |
|
inlineprivate |
check the parameter(s) related to the winds process.
| sevnstd::params_error | Thrown if one of the checks fail. |
|
inlineprivate |
check the parameter(s) containing the limit of Z from the tables.
| sevnstd::params_error | Thrown if one of the checks fail. |
|
inlineprivate |
check the parameter(s) containing the limit of Z from the tables.
| sevnstd::params_error | Thrown if one of the checks fail. |
|
private |
Method to define the boolean parameters and their default value. A parameter can be added as params_bool["name"] = std::make_pair(value,documentation);
IO options
Evolution
GWcheck parameters
RLO options
Extra tables options
Optimistic scenario
|
private |
Initialisation methods.
Double params.
Method to define the numeric parameters and their default value. A parameter can be added as params_num["name"] = std::make_pair(value,documentation);
STAR
Tracks check
< Max Zams Mass in the loaded tables
< Min Zams Mass in the loaded tables
< Max Z in the loaded tables
< Min Z in the loaded tables
< Max Zams Mass in the loaded tables
SN
Jump track parameters
< relative accumulated mass threshold to change tracks
< relative difference in total mass to consider the convergence reached
< The maximum new zams that will be tested is Mzams + jtrack_DM_factor_max*dM_accumul
< The minimum new zams that will be tested is Mzams + jtrack_DM_factor_min*dM_accumul
< Maximum, number of iteration to found the convergence
< Mass increment when trying to matche the core ans in case the binding energy
GWcheck parameters
< Time in units of Hubble time. If GWtime<GW_TSHOLD*tHubble, enable GW process
Winds parameters
Roche Lobe
Kicks parameters
CE
Evolution
|
private |
Method to define the literal parameters and their default value. A parameter can be added as params_str["name"] = std::make_pair(value,documentation);
INPUT OPTIONS
Roche Lobe
Overwrite Z
Evolution
System
Output
Input
Folders
LOG
|
inline |
Store directly the value of a boolean parameters in an input variable. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
Store directly the value of a numerical parameters in an input variable.
| name | name of the parameter |
| val | variable where to store the parameter's value |
| sevnstd::params_error | Thrown if the parameter name is not present. |
|
inline |
Store directly the value of a literal parameters in an input variable. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
get a boolean variable
| name | of the parameter |
| sevnstd::params_error | Thrown if the parameter name is not present in the str group. |
|
inline |
|
inline |
get a numerical variable
| name | name of the parameter |
| sevnstd::params_error | Thrown if the parameter name is not present in the numerical group. |
|
inline |
GET and GET like stuff.
|
inline |
get a literal variable
| name | of the parameter |
| sevnstd::params_error | Thrown if the parameter name is not present in the str group. |
|
inline |
|
inlineprivate |
Initialise all the parameters to default values
| sevnstd::params_error | Thrown if the one of the parameters checks fail. |
|
inlineprivate |
Check if a giben parameter is a boolean parameter.
| name | name of the parameter |
|
inlineprivate |
Check if a given parameter is a numeric parameter.
| name | name of the parameter |
|
inlineprivate |
Check if a given parameter is a parameter of the class.
| name | name of the parameter |
|
inlineprivate |
Check if it is settable
| name | name of the parameter |
|
inlineprivate |
Check if it is directly settable
| name | name of the parameter |
|
inlineprivate |
Check if a given parameter is settable
| name | name of the parameter |
|
inlineprivate |
Check if a given parameter is a literal parameter.
| name | name of the parameter |
|
inline |
Store all the names of the parameters in a vector
| int SEVNpar::load | ( | int | n, |
| char ** | val, | ||
| bool | initialise = false |
||
| ) |
load
load parameters from a list of arguments
| n | number of arguments |
| val | arguments |
| initialise | if true initialise all the parameters to default before to set them |
| sevnstd::params_error | Thrown if one of the parameters is not settable. |
|
inlineprivate |
Transform a double to a string.
| value | to transform to a string |
value.
|
inlineprivate |
Transform the numeric parameter of a given name to a string.
| name | name of the parameter |
|
inline |
Create a formatted string storing the name, values and comment of each parameter.
| use_default | if true the string will contain the default values independently of the current values. (the current values are not overwritten). |
|
inlineprivate |
Set the value of a given boolean parameter
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlineprivate |
SET.
Set the value of a given numeric parameter
| name | name of the parameter. |
| val | value to save in the parameter. |
| sevnstd::params_error | Thrown if:
|
|
inlineprivate |
Set the value of a given literal parameter
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
SET and SET like stuff.
Set the value of a given numeric parameter
| name | name of the parameter. |
| val | value to save in the parameter. |
| sevnstd::params_error | Thrown if:
|
|
inline |
Set the value of a given literal parameter This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlineprivate |
Basic method to set value from a string.
| name | name of the parameter. |
| val | value to save in the parameter. |
| sevnstd::params_error | Thrown if:
|
|
inline |
Set the paramter myself containing the PATH of the SEVN folder.
|
inline |
Set the tables path
| tables | path to the tables |
|
inline |
Set the pureHE tables path
| tablesHE | path to the pureHE tables |
|
inline |
Set the min and max ZAMS Mass. Notice: the max Zams is the minimum between the zams upper limits considering all the metallicites. The min zams is the maximum between the zams lower limits.
| Zams_list | Vector of vector of doubles containing the list of zams Mass at each metallicity (loaded in IO). |
| sevnstd::params_error | Thrown if:
|
|
inline |
Set the min and max ZAMS pureHE Mass. Notice: the max Zams is the minimum between the zams upper limits considering all the metallicites. The min zams is the maximum between the zams lower limits.
| Zams_list_HE | Vector of vector of doubles containing the list of zams Mass at each metallicity (loaded in IO). |
| sevnstd::params_error | Thrown if:
|
|
inline |
SPECIAL SET.
Set the min and max Z
| Zlist | Vector of doubles containing the list of loaded metallicites (loaded in IO). |
| sevnstd::params_error | Thrown if:
|
|
inline |
Set the min and max Z of the pureHE tables
| Zlist_HE | Vector of doubles containing the list of loaded metallicites (loaded in IO). |
| sevnstd::params_error | Thrown if:
|
|
inline |
Parameter function.
|
friend |
Overload of the << operator, it just calls the print method
@overloaded
|
staticprotected |
Stores the number of active instance of this class
|
private |
map containing the boolean parameters {name: {boolean value, comment}}
|
private |
map containing the numer parameters {name: {double value, comment}}
|
private |
map containing the literal parameters {name: {string value, comment}}
|
staticprivate |
set containing the name of all the properties that can be set directly
|
staticprivate |
set containing the name of all the properties that can be set directly
|
protected |
logging instance