Minor adjustments
This commit is contained in:
@@ -316,7 +316,7 @@ void SimulationOutput::writeSpectrum(DynamicDensityField* density_field,
|
|||||||
void SimulationOutput::writeDensity(DynamicDensityField* density_field,
|
void SimulationOutput::writeDensity(DynamicDensityField* density_field,
|
||||||
std::string path) {
|
std::string path) {
|
||||||
// precaution, shouldn't be necessary due to calculation after cpu sync
|
// precaution, shouldn't be necessary due to calculation after cpu sync
|
||||||
density_field->recalculateDensityArray();
|
// density_field->recalculateDensityArray();
|
||||||
writer.write(density_field->densityArray(), path + "/Density");
|
writer.write(density_field->densityArray(), path + "/Density");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ blitz::Array<double, 3> DynamicDensityField::densityArray() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
blitz::Array<double, 4> DynamicDensityField::spectrumArray() {
|
blitz::Array<double, 4> DynamicDensityField::spectrumArray() {
|
||||||
recalculateDensityArray();
|
// recalculateDensityArray();
|
||||||
return density_per_m3_;
|
return density_per_m3_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -358,13 +358,14 @@ void Simulation::processDensityEvents() {
|
|||||||
DEBUG_LEVEL_2("Particles in queue: " +
|
DEBUG_LEVEL_2("Particles in queue: " +
|
||||||
std::to_string(queue_.size()));
|
std::to_string(queue_.size()));
|
||||||
#endif
|
#endif
|
||||||
const int particle_number =
|
// const int particle_number =
|
||||||
particleNumberFromQueue(queue_.size(), random_.get());
|
// particleNumberFromQueue(queue_.size(), random_.get());
|
||||||
|
|
||||||
// extract particle from queue here, so that an extension of the queue does
|
// extract particle from queue here, so that an extension of the queue does
|
||||||
// not mess up the reference
|
// not mess up the reference
|
||||||
particle::Particle particle = queue_.at(particle_number);
|
particle::Particle particle = queue_.back();// queue_.at(particle_number);
|
||||||
queue_.erase(queue_.begin() + particle_number);
|
// queue_.erase(queue_.begin() + particle_number);
|
||||||
|
queue_.pop_back();
|
||||||
|
|
||||||
processUntilTermination(particle);
|
processUntilTermination(particle);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user