Added Ionization Channels for e+T2 -> now 3 Processes from Janev are available:

eT2_T2I_Ionization_Janev_(label)
1. non dissoziative labeled as ndiss
2. dissoziative via X2 Sigma^+_g labeled as diss_g
3. dissoziative via B2 Sigma^+_u labeled as diss_u

Added more Excitation Channels e + T2 from Janev
This commit is contained in:
Christian
2019-07-04 10:24:36 +02:00
parent 6ba3de7c6c
commit 4b744769c6
69 changed files with 843 additions and 378 deletions
+22 -22
View File
@@ -29,7 +29,7 @@ inline double get_parameter_value(std::string csv_line) {
ss_err<<"get_parameter_value: Could not read line.\n";
throw MyException(ss_err.str());
}
return (parameter_value);
return parameter_value;
}
inline bool is_parameter_line(std::string csv_line, const std::string &parameter_name) {
@@ -42,9 +42,9 @@ inline bool is_parameter_line(std::string csv_line, const std::string &parameter
throw MyException(ss_err.str());
}
if (temp == parameter_name) {
return (true);
return true;
} else {
return (false);
return false;
}
}
@@ -54,9 +54,9 @@ inline bool is_faulty(std::string csv_line) {
std::string name_dummy;
double value_dummy;
if (ss>>name_dummy && ss>>value_dummy) {
return (false);
return false;
} else {
return (true);
return true;
}
}
@@ -99,14 +99,14 @@ inline double find_parameter(std::ifstream *parameter_file_stream, const std::st
break;
}
}
return (parameter_value);
return parameter_value;
}
inline std::string make_path (const std::string &path) { // append '/' if necessary to path.
if (path.back() != '/') {
return (path + '/');
return path + '/';
} else {
return (path);
return path;
}
}
@@ -126,7 +126,7 @@ inline std::string get_parameter_file_path() {
}
parameter_file_path = make_path(parameter_file_path);
return (parameter_file_path + parameter_file_name);
return parameter_file_path + parameter_file_name;
}
inline double load_parameter(const std::string &parameter_name) {
@@ -144,7 +144,7 @@ inline double load_parameter(const std::string &parameter_name) {
ss<<"Parameter::getParameter: Parameter not found in file.\n parameter_name:\t"<<parameter_name<<"\n loadFilePath: \t"<<parameter_file_path;
throw MyException(ss.str());
} else {
return (parameter_value);
return parameter_value;
}
}
@@ -156,46 +156,46 @@ inline std::string get_time_string() {
timeinfo = localtime(&rawtime);
strftime(buffer,sizeof(buffer),"%Y%m%d",timeinfo);
std::string str(buffer);
return(str);
return str;
}
inline std::string get_homebase() {
std::string Homebase = get_enviroment_variable("HOMEBASE");
Homebase = make_path(Homebase);
return (Homebase);
std::string homebase = get_enviroment_variable("HOMEBASE");
homebase = make_path(homebase);
return homebase;
}
inline std::string get_data_path() {
return (get_homebase() + "src/mc_electron/data/");
return get_homebase() + "src/mc_electron/data/";
}
inline std::string remove_cat (std::string cat_string) {
if ( cat_string.substr(cat_string.size()-4, 4) == ".cat" ){
return (cat_string.substr(0, cat_string.size()-4) );
return cat_string.substr(0, cat_string.size()-4);
} else {
return (cat_string);
return cat_string;
}
}
inline std::string get_parameter_filename() {
std::string parameter_file_path = getenv("parpath");
std::string parameter_file_name = remove_cat(getenv("parfile"));
return (parameter_file_path + "/" + parameter_file_name);
return parameter_file_path + "/" + parameter_file_name;
}
inline bool is_file(std::string file_path) {
struct stat buffer;
return (stat (file_path.c_str(), &buffer) == 0);
return stat (file_path.c_str(), &buffer) == 0;
}
inline bool is_dir(std::string dir_path) {
struct stat info;
if( stat( dir_path.c_str(), &info ) != 0 )
return (false);
return false;
else if( info.st_mode & S_IFDIR ) // S_ISDIR() doesn't exist on my windows
return (true);
return true;
else
return (false);
return false;
}