Moved drawing from density to seperate classes
This commit is contained in:
+2
-30
@@ -9,6 +9,7 @@
|
||||
#include "simulation/density_field.h"
|
||||
#include "poisson_solver/poisson_solver.h"
|
||||
#include "simulation/timer.h"
|
||||
#include "simulation/event_position_distribution.h"
|
||||
|
||||
// Note: error handling is a bit messy. Sometimes it's dealt with in the
|
||||
// called reset function (e.g. in the density field) and sometimes it's
|
||||
@@ -38,6 +39,7 @@ void Restart::restart(std::map<std::string, std::shared_ptr<species::TrackedSpec
|
||||
std::string path = pair.second->name() + "/DensityField/SimulationData/" +
|
||||
restart_identifier_;
|
||||
restartDrawingDensityField(pair.second->densityForDrawing(), path);
|
||||
pair.second->positionDistributionFromDensity()->setMaximumDensity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,32 +99,6 @@ void Restart::restartTimer(species::TrackedSpecie* reference_specie) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
void Restart::restartDrawingDensityField(DynamicDensityField* field, std::string path) {
|
||||
// restart TimeInBin field
|
||||
{
|
||||
std::string path_to_data = path + "/TimeInBin";
|
||||
DEBUG_LEVEL_3(path_to_data);
|
||||
blitz::Array<double, 4> time_in_bin = reader_.readD4Double(path_to_data);
|
||||
field->restartTimeInBin(time_in_bin);
|
||||
}
|
||||
|
||||
// restart deleted particles
|
||||
{
|
||||
std::string path_to_data = path + "/DeletedParticles";
|
||||
DEBUG_LEVEL_3(path_to_data);
|
||||
blitz::Array<long int, 4> deleted_particles = reader_.readD4LongInt(path_to_data);
|
||||
field->restartDeletedParticlesArray(deleted_particles);
|
||||
}
|
||||
|
||||
// set the density distribution and calculate the density
|
||||
{
|
||||
field->setDensityDistribution();
|
||||
}
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
void Restart::restartDrawingDensityField(DynamicDensityField* field, std::string path) {
|
||||
// restart TimeInBin field
|
||||
{
|
||||
@@ -140,10 +116,6 @@ void Restart::restartDrawingDensityField(DynamicDensityField* field, std::string
|
||||
field->restartDeletedParticlesArray(deleted_particles);
|
||||
}
|
||||
|
||||
// set the density distribution and calculate the density
|
||||
{
|
||||
field->setDensityDistribution();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user