Removed deleted particles array;
resturctured debug output a bit
This commit is contained in:
@@ -92,11 +92,7 @@ void Injector::drawNewParticleFromDensityField(std::mt19937* engine,
|
||||
const double injection_time) {
|
||||
blitz::TinyVector<int, 5> index = specie->randomIndex()->index();
|
||||
|
||||
std::stringstream out;
|
||||
out << "drawn index: " << index;
|
||||
// DEBUG_LEVEL_1(out.str());
|
||||
const double num_part_in_bin = specie->densityForDrawing()->particleNumber(index);
|
||||
out << "\nnumber of particles (" << specie->name() << ") at index: " << num_part_in_bin;
|
||||
|
||||
if(num_part_in_bin == 0) {
|
||||
return;
|
||||
@@ -107,8 +103,6 @@ void Injector::drawNewParticleFromDensityField(std::mt19937* engine,
|
||||
specie->positionDistributionFromDensity()->drawPosition(engine,
|
||||
index(0), index(1), index(2));
|
||||
|
||||
out << "\ndrawn position: " << position.cylinderEntries();
|
||||
|
||||
DEBUG_LEVEL_3("Injected z position: " +
|
||||
std::to_string(position.cylinderEntries()(2)));
|
||||
DEBUG_LEVEL_3("Injected r position: " +
|
||||
@@ -128,8 +122,14 @@ void Injector::drawNewParticleFromDensityField(std::mt19937* engine,
|
||||
drawVelocity(index, engine, position, magnetic_field);
|
||||
}
|
||||
|
||||
#ifdef debug_level2
|
||||
std::stringstream out;
|
||||
out << "drawn index: " << index;
|
||||
out << "\nnumber of particles (" << specie->name() << ") at index: " << num_part_in_bin;
|
||||
out << "\ndrawn position: " << position.cylinderEntries();
|
||||
out << "\ndrawn velocity: " << velocity.cartesianEntries();
|
||||
DEBUG_LEVEL_2(out.str());
|
||||
#endif
|
||||
|
||||
particle::Particle drawn_particle(specie, position,
|
||||
velocity, injection_time, weight_factor*num_part_in_bin);
|
||||
|
||||
Reference in New Issue
Block a user