Major changes:
- Added individul operators for species and better selecting process. - Switched to C arrays for main loop operations and calculating array indizes using knowledge of binning instead of doing sorted search - Added Recombination - Reworked elastic scattering kinematics - Added inelastic scattering kinematics
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// h5_file.cpp
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 18.05.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#include "h5_file.hpp"
|
||||
|
||||
#include "read_system.h"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
H5_File::H5_File() {
|
||||
create();
|
||||
h5p = H5_Particles(&h5_file);
|
||||
}
|
||||
|
||||
void H5_File::create() {
|
||||
const string constH5Name = getFileName();
|
||||
h5_file = H5Fcreate(constH5Name.c_str(), H5F_ACC_EXCL, H5P_DEFAULT, H5P_DEFAULT);
|
||||
}
|
||||
|
||||
std::string H5_File::getFileName() {
|
||||
string parname = getparName();
|
||||
stringstream H5name;
|
||||
int i = 1;
|
||||
do {
|
||||
H5name.str(std::string());
|
||||
H5name << parname << "_" << getTimeString() << "_" << i++<<".h5";
|
||||
} while ( isFile(H5name.str()) );
|
||||
return (H5name.str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user