Implemented pitch angle resolution.

Still includes (and uses) the non-pitch angle
resolved fields as well; have to be either removed
completely or refactored s.t. one of the two options
is chosen.
Pitch angle distribution has a hardcoded number of
bins for now, and exists in 'energy_binning.h'
This commit is contained in:
2024-10-28 15:00:19 +01:00
parent b4cbd8c44c
commit 5fc227e1b1
24 changed files with 1126 additions and 42 deletions
+37 -3
View File
@@ -35,9 +35,19 @@ void Restart::restart(std::map<std::string, std::shared_ptr<species::TrackedSpec
restartTimer(species.begin()->second.get());
for(const auto& pair: species) {
std::string path = pair.second->name() + "/DensityField/SimulationData/" +
restart_identifier_;
restartDrawingDensityField(pair.second->densityForDrawing(), path);
{
std::string path = pair.second->name() + "/DensityField/SimulationData/" +
restart_identifier_;
restartDrawingDensityField(pair.second->densityForDrawing(), path);
}
{
std::string path = pair.second->name() +
"/DensityFieldWithPitchAngle/SimulationData/" +
restart_identifier_;
restartDrawingDensityField(pair.second->dynamicDensityFieldWithPitchAngleForDrawing(),
path);
}
}
}
@@ -121,6 +131,30 @@ void Restart::restartDrawingDensityField(DynamicDensityField* field, std::string
return;
}
void Restart::restartDrawingDensityField(DynamicDensityFieldWithPitchAngle* field, std::string path) {
// restart TimeInBin field
{
std::string path_to_data = path + "/TimeInBin";
DEBUG_LEVEL_3(path_to_data);
blitz::Array<double, 5> time_in_bin = reader_.readD5Double(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, 5> deleted_particles = reader_.readD5LongInt(path_to_data);
field->restartDeletedParticlesArray(deleted_particles);
}
// set the density distribution and calculate the density
{
field->setDensityDistribution();
}
return;
}
// could be removed, but then the potential has to be calculated
// as in the normal simulation cycle
void Restart::restartPoissonSolver(PoissonSolver* solver) {