Fixing bug, where h5 group "Population" was not properly populated.

This commit is contained in:
Christian
2019-07-23 15:08:16 +02:00
parent 7e0880697a
commit 1338b18aed
2 changed files with 6 additions and 3 deletions
+3 -2
View File
@@ -46,8 +46,9 @@ inline Population_Logger::Population_Logger(Population_Base *pop, Timer *timer,
};
inline void Population_Logger::create_h5g_species(H5_File *h5_file) {
std::string group_name = get_species_string(pop->get_species());
h5g_species = H5Gcreate(*h5_file->get_h5f(), group_name.c_str(), H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
std::stringstream ss;
ss<<h5_file->get_h5g_populations_path()<<"/"<<get_species_string(pop->get_species());
h5g_species = H5Gcreate(*h5_file->get_h5f(), ss.str().c_str(), H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
inline void Population_Logger::create_h5tb_meta() {
+3 -1
View File
@@ -117,7 +117,9 @@ void Simulation::create_out_dir(std::string dirname) {
void Simulation::doit() {
do_cycle(popCalcDecays, popCalcStep, false);
cout<<"Population calculation done.\n";
if (mpi_rank == 0) {
cout<<"Population calculation done.\n";
}
do_cycle(numberTotalDecays, simulationStepWidth, true);
};