Version 2, position dependent E/B, kinetic ions, boris mover, terminator
This commit is contained in:
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#include "generators/terminator_generator.h"
|
||||
|
||||
#include "generators/geometry_generator.h"
|
||||
|
||||
namespace generator {
|
||||
|
||||
std::shared_ptr<Terminator> buildTerminator(
|
||||
Parameter& parameter,
|
||||
const json_path& path_to_terminator) {
|
||||
DEBUG_LEVEL_2("Creating terminator.");
|
||||
long int max_interactions = static_cast<long int>(parameter.doubleValue(
|
||||
json_path_append(path_to_terminator, {"MaximumInteractions"})));
|
||||
double max_time_alive = parameter.doubleValue(
|
||||
json_path_append(path_to_terminator, {"MaxTimeAlive", "value"}));
|
||||
DEBUG_LEVEL_3("with max interactions: " + std::to_string(max_interactions));
|
||||
DEBUG_LEVEL_3("with max time alive: " + std::to_string(max_time_alive));
|
||||
|
||||
std::shared_ptr<Geometry> geometry = buildGeometry(
|
||||
parameter, json_path_append(path_to_terminator, {"BoundaryGeometry"}));
|
||||
|
||||
return std::shared_ptr<Terminator>(
|
||||
new Terminator(max_interactions, max_time_alive, geometry));
|
||||
}
|
||||
|
||||
}; // namespace generator
|
||||
Reference in New Issue
Block a user