-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmessages.cpp
81 lines (70 loc) · 4.07 KB
/
messages.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#include <iostream>
#include <vector>
using namespace std;
double version () {
return 0.831;
}
void print_head (ostream * out) {
*out<<"#//----------------------------------------------------------//"<<endl;
*out<<"#// Population synthesis code. Version "<<version()<<" //"<<endl;
*out<<"#// //"<<endl;
*out<<"#// Author: Andrei Igoshev. //"<<endl;
*out<<"#// e-mail: [email protected], 2010-2020 //"<<endl;
*out<<"#//----------------------------------------------------------//"<<endl;
}
void print_help () {
cout<<"The population synthesis code allows to use following flags "<<endl;
cout<<"-b file -- black hole calculations. This flag makes program "<<endl;
cout<<" calculate distributions of black holes by masses and"<<endl;
cout<<" write masses into file "<<endl;
cout<<"-e -- extended output: one output file is divided into 3 files."<<endl;
cout<<" One with P-dotP, one with positions and velocities and "<<endl;
cout<<" one with luminosities at 1400 MHz. "<<endl;
cout<<"-f -- full population. These type of calculations starts from "<<endl;
cout<<" massive stars in four spiral arms, then stars evolve and "<<endl;
cout<<" produce NS. Their evolution is considered up to now "<<endl;
cout<<"-g file -- generate file with population of massive stars. "<<endl;
cout<<" This file constain masses of newly-born NS, their "<<endl;
cout<<" positions, velocities and time of born "<<endl;
cout<<"-h -- help - show this information. "<<endl;
cout<<"-i file -- initial file. This flag makes program use file with "<<endl;
cout<<" initial positions, velocities and masses of NS. "<<endl;
cout<<"-o file -- file/s with results has/ve name as suggested. "<<endl;
cout<<"-p file -- file with parameters of synthesis is names as "<<endl;
cout<<" suggested. If it is not mentioned, file input.par is"<<endl;
cout<<" used. "<<endl;
cout<<"-u -- undetectable. This option makes program create additional"<<endl;
cout<<" file/s with information about pulsars missed in survey. "<<endl;
cout<<" (This option may cause much longer computations) "<<endl;
}
void print_exclusion () {
cout<<"Error 1: flags f, g and i cannot be used simultaneously."<<endl;
}
void print_param (ostream * out, char star_distr, bool arms, char init_distr_p, vector<double> param_p,
char init_distr_f, vector<double> param_f, char lum_model, vector <double> param_lum, char decay,
vector<double> param_decay, double time_of_run, double birthrate_val) {
*out<<"#---------------------------------------------------------------"<<endl;
*out<<"#Parameters of run."<<endl;
*out<<"#Interval of simulation "<<time_of_run<<" years."<<endl;
*out<<"#Birthrate of massive stars "<<birthrate_val<<" per thousand of years."<<endl;
*out<<"#Model of initial radial distribution of stars "<<star_distr<<endl;
*out<<"#Initial distribution of pulsars periods "<<init_distr_p<<endl;
*out<<"#Initial distribution of pulsars's magnetic fields "<<init_distr_f<<endl;
*out<<"#Model of luminocity "<<lum_model<<endl;
*out<<"#Model of magnetic field decay "<<decay<<endl;
}
void print_error_no_RDF(char tmp) {
cout<<"Error 2: no RDF model with identifier "<<tmp<<" was specified. Check file with parameters."<<endl;
}
void print_error_parameters_not_enough () {
cout<<"Error 3: not enough parameters are specified for generating of initial distributions."<<endl;
}
void print_error_flag_non_recognised (char val) {
cout<<"Error 5: in file with parameters flag for the distribution of initial "<<val<<" is not recognised."<<endl;
}
void print_error_no_MFD (char val) {
cout<<"Error 6: no MFD model with identifier "<<val<<" is specified. Check parameter file"<<endl;
}
void print_error_no_LM (char val) {
cout<<"Error 7: no LM model with identifier "<<val<<" is specified. Check parameter file"<<endl;
}