small fixes and cosmetic changes
This commit is contained in:
@@ -227,19 +227,18 @@ blitz::TinyVector<double, 4> DynamicDensityField::drawPositionAndEnergy(
|
||||
std::mt19937* engine) {
|
||||
// if the density is empty, then return a TinyVector filled with 0s as
|
||||
// an indiction of that (probably not the best solution)
|
||||
recalculateDensityArray();
|
||||
|
||||
// stuff below not optimal, since it's done for every particle that is drawn,
|
||||
// but maybe not certain that otherwise the density is right...
|
||||
// recalculateDensityArray();
|
||||
if (isEqual(blitz::max(density_per_m3_), 0.)) {
|
||||
DEBUG_LEVEL_3("Density is empty");
|
||||
return blitz::TinyVector<double, 4> (0,0,0,0);
|
||||
}
|
||||
setDensityDistribution();
|
||||
// setDensityDistribution();
|
||||
double random_r, random_z, random_phi, random_E, random_n;
|
||||
double density_in_random_cell;
|
||||
|
||||
// random_r = 0.01;
|
||||
// random_phi = 0.;
|
||||
// random_z = 1.;
|
||||
// draw random position (independent of the Energy)
|
||||
do {
|
||||
DEBUG_LEVEL_3("Missed.");
|
||||
random_r = std::sqrt(r_dist_(*engine));
|
||||
@@ -327,7 +326,7 @@ void DynamicDensityField::resetDynamicDensityField() {
|
||||
|
||||
void DynamicDensityField::restartTimer(double time, double delta_t) {
|
||||
// make sure that the timer can only be restarted once (per dynamicDensityField object)
|
||||
// probably not necessary, but whatever
|
||||
// probably not necessary, but whatever...
|
||||
if(timer_restarted_) {
|
||||
return;
|
||||
}
|
||||
@@ -344,11 +343,7 @@ void DynamicDensityField::restartTimeInBin(blitz::Array<double, 4> time_in_bin)
|
||||
out << " for time_in_bin array";
|
||||
ERROR(out.str());
|
||||
}
|
||||
std::stringstream out;
|
||||
out << "Before: " << time_in_bin_s_;
|
||||
time_in_bin_s_ = time_in_bin.copy();
|
||||
out << "After: " << time_in_bin_s_;
|
||||
// DEBUG_LEVEL_0(out.str());
|
||||
}
|
||||
|
||||
void DynamicDensityField::restartDeletedParticlesArray(
|
||||
|
||||
Reference in New Issue
Block a user