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

33 lines
934 B
C++
Executable File

#ifndef MASS_GENERATOR_H
#define MASS_GENERATOR_H
#include <map>
#include "jansson.h"
// defined in "simulation/species.h"
namespace species {
enum class ImplementedSpecies;
};
namespace generator {
// class containing a map of the masses (in kg) to the respective ImplementedSpecies
class SpeciesMasses {
public:
// return the mass of the ImplementedSpecies
static double mass(const species::ImplementedSpecies& species);
private:
static std::map<species::ImplementedSpecies, double> mass_;
};
// return the mass of the specie at the json-object
// has to contain either a json-string "FromParticleType" or a json-double "value"
// if "FromParticleType" is specified, it has to be one of the strings defined in the SpecieAlias class in "generators/species_generator.h"
// if "value" is specified, it has to be the value in (kg)
double buildMass(json_t* object);
}; // namespace generator
#endif /* MASS_GENERATOR_H */