Corrections to drawing the velocity of a tracked

species (dynamic density field of previous timestep);
some optimization changes
This commit is contained in:
2025-10-15 14:46:27 +02:00
parent 31c2b230a9
commit 753cbe31f5
9 changed files with 188 additions and 68 deletions
+2 -2
View File
@@ -75,10 +75,10 @@ class DynamicDensityField : public DensityField {
void restartTimer(double time, double delta_t);
void restartTimeInBin(blitz::Array<double, 5> time_in_bin);
private:
void recalculateDensityArray();
private:
// use ordering r, phi, z, pitch_angle, E
// time in bin now contains the physical particle number per bin
// (not renamed, since that would require many, many changes due to
+3 -4
View File
@@ -52,8 +52,7 @@ class VelocityDistributionFromDensityField : public VelocityDistribution {
// use the given magnetic field at the provided position to determine the
// direction of velocity from the pitch angle
// the direction of the perpendicular part of the velocity vector is drawn isotropically
CartesianVector rollVelocity(
const Coordinate& position, std::mt19937* engine,
CartesianVector rollVelocity(const Coordinate& position, std::mt19937* engine,
std::shared_ptr<MagneticField> magnetic_field);
private:
@@ -62,8 +61,8 @@ class VelocityDistributionFromDensityField : public VelocityDistribution {
std::shared_ptr<DynamicDensityField> density_field_;
blitz::Array<double, 1> energy_values;
blitz::Array<double, 1> mu_values;
// blitz::Array<double, 1> energy_values;
// blitz::Array<double, 1> mu_values;
std::vector<double> energyBinBorders_;
std::vector<double> pitchAngleBinBorders_;