Parameter file improvements - Units
It would be great if the parser could deal with units.
For instance:
TimeIntegration:
time_end: 5. s #The final time
would convert the five seconds into the internal units.
One possible interface for this would be:
UnitSystem us;
swift_params params;
double time_end = parser_get_param_double(¶ms, "TimeIntegration:time_end", &us, UNIT_CONV_TIME);
Most unit conversions are already implemented in unit.[ch]
. This module would need to be enhanced to recognize common unit symbols.