Version 2, position dependent E/B, kinetic ions, boris mover, terminator

This commit is contained in:
Jonas Kellerer
2022-10-21 10:09:19 +02:00
parent acc55cf003
commit 83fd2e5d7e
869 changed files with 1033204 additions and 3634436 deletions
+28
View File
@@ -0,0 +1,28 @@
#include "generators/geometry_generator.h"
#include <string>
#include "simulation/errors.h"
namespace generator {
std::shared_ptr<Geometry> buildGeometry(Parameter& parameter,
const json_path& path_to_geometry) {
if (parameter.jsonObjectFromBase(
json_path_append(path_to_geometry, {"Cylinder"}))) {
DEBUG_LEVEL_2("Creating geometry: cylinder.");
double radius =
json_read_length(parameter.jsonObjectFromBase(json_path_append(
path_to_geometry, {"Cylinder", "Radius"})),
"m");
double height =
json_read_length(parameter.jsonObjectFromBase(json_path_append(
path_to_geometry, {"Cylinder", "Height"})),
"m");
DEBUG_LEVEL_3("with radius: " + std::to_string(radius) + " m");
DEBUG_LEVEL_3("with height: " + std::to_string(height) + " m");
return std::shared_ptr<Geometry>(new Cylinder(radius, height));
} else {
ERROR("This geometry is not implemented.");
return nullptr;
}
}
}; // namespace generator