Moved drawing from density to seperate classes
This commit is contained in:
@@ -46,9 +46,11 @@ class DynamicDensityField : public DensityField {
|
||||
double energy_eV,
|
||||
double pitch_angle);
|
||||
|
||||
// return the particle number stored in the density of this object
|
||||
double particleNumber();
|
||||
blitz::TinyVector<double, 5> draw(std::mt19937* engine);
|
||||
|
||||
// returns true if the old pitch angle and the new pitch angle are in different bins
|
||||
// of the pitch angle binning
|
||||
bool changedPitchAngleBin(double old_pitch_angle, double new_pitch_angle) const;
|
||||
|
||||
blitz::Array<double, 3> densityArray();
|
||||
@@ -57,6 +59,16 @@ class DynamicDensityField : public DensityField {
|
||||
blitz::Array<long int, 5> deletedParticlesArray() const;
|
||||
blitz::Array<double, 3> binVolumeArray() const;
|
||||
|
||||
// return an array of the density values at the Coordinate position (only energy
|
||||
// direction left); over and underflow bin are removed
|
||||
// (might not be good, since then the underflow particles are lost...)
|
||||
blitz::Array<double, 1> sliceSpectrumArray(const Coordinate& position) const;
|
||||
|
||||
// return an array of the time in bin at the Coordinate position and the energy
|
||||
// energy_eV (only pitch angle direction left); over and underflow bin are removed
|
||||
blitz::Array<double, 1> sliceTimeInBinArray(const Coordinate& position,
|
||||
double energy_eV) const;
|
||||
|
||||
const EnergyBinning* energyBinning() const;
|
||||
const CylinderBinning* positionBinning() const;
|
||||
const PitchAngleBinning* pitchAngleBinning() const;
|
||||
@@ -68,19 +80,15 @@ class DynamicDensityField : public DensityField {
|
||||
|
||||
friend class CpuSynchronizer;
|
||||
|
||||
void setDensityDistribution();
|
||||
|
||||
void restartTimer(double time, double delta_t);
|
||||
void restartTimeInBin(blitz::Array<double, 5> time_in_bin);
|
||||
void restartDeletedParticlesArray(blitz::Array<long int, 5> deleted_particles);
|
||||
|
||||
private:
|
||||
|
||||
// BinCoordinate densityBin(const CylinderCoordinate& position) const;
|
||||
void recalculateDensityArray();
|
||||
void initPositionDistributions();
|
||||
// use ordering r, phi, z, pitch_angle, E
|
||||
|
||||
// use ordering r, phi, z, pitch_angle, E
|
||||
blitz::Array<double, 5> time_in_bin_s_;
|
||||
blitz::Array<long int, 5> deleted_particles_;
|
||||
|
||||
@@ -92,13 +100,6 @@ class DynamicDensityField : public DensityField {
|
||||
|
||||
const CylinderBinning position_binning_;
|
||||
const EnergyBinning energy_binning_;
|
||||
|
||||
// random distributions for drawing from
|
||||
std::uniform_real_distribution<double> r_dist_;
|
||||
std::uniform_real_distribution<double> phi_dist_;
|
||||
std::uniform_real_distribution<double> z_dist_;
|
||||
std::uniform_real_distribution<double> density_dist_;
|
||||
|
||||
const PitchAngleBinning pitch_angle_binning_;
|
||||
|
||||
std::shared_ptr<Timer> timer_;
|
||||
|
||||
Reference in New Issue
Block a user