Version 2, position dependent E/B, kinetic ions, boris mover, terminator
This commit is contained in:
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#include "generators/drift_velocity_generator.h"
|
||||
#include "generators/vector_field_generator.h"
|
||||
#include "simulation/errors.h"
|
||||
|
||||
namespace generator {
|
||||
|
||||
std::shared_ptr<DriftVelocity> buildDriftVelocity(
|
||||
Parameter& parameter,
|
||||
const json_path& path_to_drift_velocity) {
|
||||
if (parameter.jsonObjectFromBase(
|
||||
json_path_append(path_to_drift_velocity, {"VectorField"}))) {
|
||||
DEBUG_LEVEL_2("Creating drift velocity: Vector field.");
|
||||
std::shared_ptr<VectorField> field =
|
||||
buildVectorField(parameter.jsonObjectFromBase(
|
||||
json_path_append(path_to_drift_velocity, {"VectorField"})));
|
||||
return std::shared_ptr<DriftVelocity>(new DriftVelocity(field));
|
||||
} else if (parameter.jsonObjectFromBase(
|
||||
json_path_append(path_to_drift_velocity, {"null"}))) {
|
||||
DEBUG_LEVEL_2("Creating drift velocity: null.");
|
||||
return nullptr;
|
||||
} else {
|
||||
ERROR("No drift velocity given.");
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
}; // namespace generator
|
||||
Reference in New Issue
Block a user