Files
karl/include/generators/density_field_generator.h
T
2024-12-04 17:15:04 +01:00

29 lines
1.2 KiB
C++
Executable File

#ifndef DENSITY_FIELD_GENERATOR_H
#define DENSITY_FIELD_GENERATOR_H
#include "simulation/density_field.h"
#include "simulation/jansson_additionals.h"
#include "simulation/parameter.h"
#include "simulation/timer.h"
namespace generator {
// return a shared_ptr to a ConstantDensityField object described by the give json-object
// object has to contain a json-object "ScalarField", that has to follow the form
// described in "buildScalarField" (defined in "generators/scalar_field_generator.h")
std::shared_ptr<ConstantDensityField> buildConstantDensityField(json_t* object);
// return a shared_ptr to a DynamicDensityField object described by the json-object
// at the give path in the Parameter object which uses the given Timer object
// the json-object at path_to_field has to contain two json-objects called
// "PositionBinning" and "EnergyBinning", which are described in "buildPositionBinning"
// and "buildEnergyBinning" respectivley (both defined in "generators/binning_generator.h")
std::shared_ptr<DynamicDensityField> buildDynamicDensityField(
Parameter& parameter,
const json_path& path_to_field,
std::shared_ptr<Timer>& timer);
}; // namespace generator
#endif /* DENSITY_FIELD_GENERATOR_H */