Version 2, position dependent E/B, kinetic ions, boris mover, terminator
This commit is contained in:
Executable
+28
@@ -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
|
||||
Reference in New Issue
Block a user