Reworked logging model:

Added T+, T3+.
Changes in logging hierarchie: Every species individually logs positions.
This commit is contained in:
Christian
2019-07-22 10:40:21 +02:00
parent ad5b66dc0d
commit 5965e3e90a
10 changed files with 105 additions and 282 deletions
+11 -7
View File
@@ -10,27 +10,31 @@
#define sf_particle_logger_h
#include "particle_logger_base.h"
#include "h5_file.hpp"
class SF_Particle_Logger : public Particle_Logger_Base {
hid_t h5g_species;
H5TB_Particle_Interface h5tb;
public:
SF_Particle_Logger(species this_species, hid_t *h5g_z) : Particle_Logger_Base(this_species) {
create(h5g_z);
SF_Particle_Logger(species this_species, H5_File *h5_file) : Particle_Logger_Base(this_species) {
create(h5_file, this_species);
}
private:
void create(hid_t *h5g_z);
void create(H5_File *h5_file, species this_species);
public:
void log(const Particle &logPart, const vec3 &oldLoc_m);
};
inline void SF_Particle_Logger::create(hid_t *h5g_z) {
std::string speciesName = get_species_string(get_species());
h5tb = H5TB_Particle_Interface(speciesName, h5g_z);
inline void SF_Particle_Logger::create(H5_File *h5_file, species this_species) {
std::stringstream ss;
ss<<h5_file->get_h5g_particles_path()<<"/"<<get_species_string(this_species);
h5g_species = H5Gcreate(*h5_file->get_h5f(), ss.str().c_str(), H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
h5tb = H5TB_Particle_Interface("all", &h5g_species);
}
inline void SF_Particle_Logger::log(const Particle &logPart, const vec3 &oldLoc_m) {