Fixed Bug in recombination formular and added logging of particles hitting the RW.
This commit is contained in:
@@ -12,18 +12,24 @@
|
||||
#include "particle_logger_base.h"
|
||||
|
||||
|
||||
class MuliZ_Particle_Logger : public Particle_Logger_Base {
|
||||
class MultiZ_Particle_Logger : public Particle_Logger_Base {
|
||||
H5TB_Particle_Interface *h5tb;
|
||||
|
||||
int numberZBins;
|
||||
double *zLogValues;
|
||||
|
||||
public:
|
||||
MuliZ_Particle_Logger(species this_species, const int &numberZBins, double *zLogValues, hid_t *h5g_z) : Particle_Logger_Base(this_species) {
|
||||
MultiZ_Particle_Logger(species this_species, const int &numberZBins, double *zLogValues, hid_t *h5g_z) : Particle_Logger_Base(this_species) {
|
||||
this->numberZBins = numberZBins;
|
||||
this->zLogValues = zLogValues;
|
||||
this->zLogValues = new double[numberZBins];
|
||||
for (int i = 0; i<numberZBins; i++) {
|
||||
this->zLogValues[i] = zLogValues[i];
|
||||
}
|
||||
create(h5g_z);
|
||||
}
|
||||
~MultiZ_Particle_Logger() {
|
||||
delete[] zLogValues;
|
||||
}
|
||||
private:
|
||||
void create(hid_t *h5g_z);
|
||||
|
||||
@@ -32,11 +38,11 @@ public:
|
||||
};
|
||||
|
||||
|
||||
inline void MuliZ_Particle_Logger::create(hid_t *h5g_z) {
|
||||
inline void MultiZ_Particle_Logger::create(hid_t *h5g_z) {
|
||||
std::string speciesName = get_species_string(get_species());
|
||||
if (numberZBins < 1) {
|
||||
std::stringstream ss;
|
||||
ss<<"MuliZ_Particle_Logger::create: numberZBins < 1.\n";
|
||||
ss<<"MultiZ_Particle_Logger::create: numberZBins < 1.\n";
|
||||
}
|
||||
h5tb = new H5TB_Particle_Interface[numberZBins];
|
||||
for (int i = 0; i < numberZBins; i++) {
|
||||
@@ -44,7 +50,7 @@ inline void MuliZ_Particle_Logger::create(hid_t *h5g_z) {
|
||||
}
|
||||
}
|
||||
|
||||
inline void MuliZ_Particle_Logger::log(const Particle &logPart, const vec3 &oldLoc_m) {
|
||||
inline void MultiZ_Particle_Logger::log(const Particle &logPart, const vec3 &oldLoc_m) {
|
||||
double zold = oldLoc_m[2];
|
||||
double znew = logPart.get_x_m()[2];
|
||||
double zmin = std::min(zold,znew);
|
||||
|
||||
Reference in New Issue
Block a user