Version 2, position dependent E/B, kinetic ions, boris mover, terminator
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#include "generators/random_numbers_generator.h"
|
||||
|
||||
#include "simulation/errors.h"
|
||||
#include "simulation/jansson_additionals.h"
|
||||
#include "simulation/mpi_communication.h"
|
||||
|
||||
namespace generator {
|
||||
|
||||
std::shared_ptr<RandomNumbers> buildRandomNumbers(Parameter& parameter) {
|
||||
if (parameter.jsonObjectFromBase({"RandomNumbers"})) {
|
||||
int seed =
|
||||
json_int(parameter.jsonObjectFromBase({"RandomNumbers", "Seed"}));
|
||||
int local_seed = seed + MpiCommunication::mpi_rank;
|
||||
|
||||
return std::shared_ptr<RandomNumbers>(new RandomNumbers(local_seed));
|
||||
|
||||
} else {
|
||||
ERROR("No information given for random numbers.");
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
}; // namespace generator
|
||||
Reference in New Issue
Block a user