preprocessor now filters debug output
This commit is contained in:
@@ -27,12 +27,18 @@ void Restart::restart(std::map<std::string, std::shared_ptr<species::TrackedSpec
|
||||
if(!do_restart_) {
|
||||
return;
|
||||
}
|
||||
#ifdef debug_level1
|
||||
DEBUG_LEVEL_1("Restarting rng");
|
||||
#endif
|
||||
restartRandomNumbers(random_numbers);
|
||||
#ifdef debug_level1
|
||||
DEBUG_LEVEL_1("Restarting poisson solver.");
|
||||
#endif
|
||||
restartPoissonSolver(poisson_solver);
|
||||
|
||||
#ifdef debug_level1
|
||||
DEBUG_LEVEL_1("Restarting timer.");
|
||||
#endif
|
||||
restartTimer(species.begin()->second.get());
|
||||
|
||||
for(const auto& pair: species) {
|
||||
@@ -68,7 +74,9 @@ void Restart::restartTimer(species::TrackedSpecie* reference_specie) {
|
||||
{
|
||||
std::string path = reference_specie->name() + "/DensityField/SimulationData/" +
|
||||
restart_identifier_ + "/PhysicalTime";
|
||||
#ifdef debug_level3
|
||||
DEBUG_LEVEL_3(path);
|
||||
#endif
|
||||
// probably add a function in the reader to read a single double value instead of
|
||||
// an 1d array of doubles
|
||||
blitz::Array<double, 1> restart_time = reader_.readD1Double(path);
|
||||
@@ -84,7 +92,9 @@ void Restart::restartTimer(species::TrackedSpecie* reference_specie) {
|
||||
{
|
||||
std::string path = reference_specie->name() + "/CurrentCollector/SimulationData/" +
|
||||
restart_identifier_ + "/PhysicalTime";
|
||||
#ifdef debug_level3
|
||||
DEBUG_LEVEL_3(path);
|
||||
#endif
|
||||
// probably add a function in the reader to read a single double value instead of
|
||||
// a 1d array of doubles
|
||||
blitz::Array<double, 1> time_resolution = reader_.readD1Double(path);
|
||||
@@ -103,7 +113,9 @@ void Restart::restartDrawingDensityField(DynamicDensityField* field, std::string
|
||||
// restart TimeInBin field
|
||||
{
|
||||
std::string path_to_data = path + "/TimeInBin";
|
||||
#ifdef debug_level3
|
||||
DEBUG_LEVEL_3(path_to_data);
|
||||
#endif
|
||||
blitz::Array<double, 5> time_in_bin = reader_.readD5Double(path_to_data);
|
||||
field->restartTimeInBin(time_in_bin);
|
||||
}
|
||||
@@ -124,7 +136,9 @@ void Restart::restartDrawingDensityField(DynamicDensityField* field, std::string
|
||||
void Restart::restartPoissonSolver(PoissonSolver* solver) {
|
||||
std::string path = "PoissonSolver/SimulationData/" + restart_identifier_ +
|
||||
"/Potential/";
|
||||
#ifdef debug_level3
|
||||
DEBUG_LEVEL_3(path);
|
||||
#endif
|
||||
blitz::Array<double, 3> potential = reader_.readD3Double(path);
|
||||
solver->setPotential(potential);
|
||||
}
|
||||
Reference in New Issue
Block a user