Commit 589eea6c authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Added constructor of unit system to make CGS units

parent e804a9bb
......@@ -41,6 +41,21 @@
#include "const.h"
#include "error.h"
/**
* @brief Initialises the UnitSystem structure with CGS system
*
* @param us The UnitSystem to initialize
*/
void units_init_cgs(struct UnitSystem* us) {
us->UnitMass_in_cgs = 1.;
us->UnitLength_in_cgs = 1.;
us->UnitTime_in_cgs = 1.;
us->UnitCurrent_in_cgs = 1.;
us->UnitTemperature_in_cgs = 1.;
}
/**
* @brief Initialises the UnitSystem structure with the constants given in
* rhe parameter file.
......
......@@ -92,6 +92,7 @@ enum UnitConversionFactor {
UNIT_CONV_TEMPERATURE
};
void units_init_cgs(struct UnitSystem*);
void units_init(struct UnitSystem*, const struct swift_params*,
const char* category);
void units_init_default(struct UnitSystem* us,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment