removed the 4d density field

This commit is contained in:
2024-11-04 16:08:40 +01:00
parent b1519cb4ca
commit 5dffc0c102
21 changed files with 110 additions and 647 deletions
+5 -56
View File
@@ -46,8 +46,6 @@ void SimulationOutput::writeMetaData(
std::string specie_path = "/" + task.specie_name;
writeMetaData(species.at(task.specie_name)->dynamicDensityField(),
specie_path);
writeMetaData(species.at(task.specie_name)->dynamicDensityFieldWithPitchAngle(),
specie_path);
}
for (auto& task : tasks_current_collector_) {
@@ -73,8 +71,6 @@ void SimulationOutput::writeSimulationData(
for (auto& task : tasks_density_fields_) {
if (cpu_sync % task.intervall == 0) {
std::string specie_path = "/" + task.specie_name;
writeSimulationData(species.at(task.specie_name)->dynamicDensityFieldWithPitchAngle(),
specie_path, cpu_sync, task.overwrite_last);
writeSimulationData(species.at(task.specie_name)->dynamicDensityField(),
specie_path, cpu_sync, task.overwrite_last);
}
@@ -132,28 +128,6 @@ void SimulationOutput::writeSimulationData(DynamicDensityField* density_field,
writePhysicalTime(density_field, path);
}
void SimulationOutput::writeSimulationData(DynamicDensityFieldWithPitchAngle* density_field,
std::string species_path,
int cpu_sync,
bool overwrite_last) {
std::string sync_path = "SyncPeriod_" + std::to_string(cpu_sync);
if (overwrite_last) {
sync_path = "LastSyncPeriod";
}
std::string path = species_path + "/DensityFieldWithPitchAngle/SimulationData/" + sync_path;
DEBUG_LEVEL_3("Write spectrum.");
writeSpectrum(density_field, path);
DEBUG_LEVEL_3("Write density.");
writeDensity(density_field, path);
DEBUG_LEVEL_3("Write time in bin.");
writeTimeInBin(density_field, path);
DEBUG_LEVEL_3("Write deleted particles.");
writeDeletedParticles(density_field, path);
DEBUG_LEVEL_3("Write physical time.");
writePhysicalTime(density_field, path);
}
void SimulationOutput::writeSimulationData(CurrentCollector* current_collector,
std::string species_path,
int cpu_sync,
@@ -273,55 +247,27 @@ void SimulationOutput::writeSpectrum(DynamicDensityField* density_field,
writer.write(density_field->spectrumArray(), path + "/Spectrum");
}
void SimulationOutput::writeSpectrum(DynamicDensityFieldWithPitchAngle* density_field,
std::string path) {
writer.write(density_field->spectrumArray(), path + "/Spectrum");
}
void SimulationOutput::writeDensity(DynamicDensityField* density_field,
std::string path) {
writer.write(density_field->densityArray(), path + "/Density");
}
void SimulationOutput::writeDensity(DynamicDensityFieldWithPitchAngle* density_field,
std::string path) {
writer.write(density_field->densityArray(), path + "/Density");
}
void SimulationOutput::writeTimeInBin(DynamicDensityField* density_field,
std::string path) {
writer.write(density_field->timeInBinArray(), path + "/TimeInBin");
}
void SimulationOutput::writeTimeInBin(DynamicDensityFieldWithPitchAngle* density_field,
std::string path) {
writer.write(density_field->timeInBinArray(), path + "/TimeInBin");
}
void SimulationOutput::writeDeletedParticles(DynamicDensityField* density_field,
std::string path) {
writer.write(density_field->deletedParticlesArray(),
path + "/DeletedParticles");
}
void SimulationOutput::writeDeletedParticles(DynamicDensityFieldWithPitchAngle* density_field,
std::string path) {
writer.write(density_field->deletedParticlesArray(),
path + "/DeletedParticles");
}
void SimulationOutput::writePhysicalTime(DynamicDensityField* density_field,
std::string path) {
writer.write(density_field->physicalTime(), path + "/PhysicalTime");
}
void SimulationOutput::writePhysicalTime(DynamicDensityFieldWithPitchAngle* density_field,
std::string path) {
writer.write(density_field->physicalTime(), path + "/PhysicalTime");
}
void SimulationOutput::writePotential(PoissonSolver* poisson_solver, std::string path) {
writer.write(poisson_solver->potential(), path + "/Potential");
}
@@ -333,6 +279,7 @@ void SimulationOutput::writeMetaData(species::TrackedSpecie* specie) {
writer.write(specie->charge_C(), specie_path + "/Charge");
}
/*
void SimulationOutput::writeMetaData(DynamicDensityField* density_field,
std::string path) {
std::string path_to_field = path + "/DensityField";
@@ -341,10 +288,12 @@ void SimulationOutput::writeMetaData(DynamicDensityField* density_field,
writeBinBorders(density_field, path_to_field);
writeNumBins(density_field, path_to_field);
}
*/
void SimulationOutput::writeMetaData(DynamicDensityFieldWithPitchAngle* density_field,
// Todo: use the functions again (as in the method thats uncommented above)
void SimulationOutput::writeMetaData(DynamicDensityField* density_field,
std::string path) {
std::string path_to_field = path + "/DensityFieldWithPitchAngle";
std::string path_to_field = path + "/DensityField";
// write bin volumes
{