Fixed bugs with bad departure function names and better error message; Closes #396

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2015-01-07 13:05:39 -07:00
parent 3d68475e6b
commit fe48c7e403
3 changed files with 7 additions and 5 deletions

View File

@@ -365,6 +365,8 @@ void MixtureParameters::set_mixture_parameters(HelmholtzEOSMixtureBackend &HEOS)
// Get the dictionary itself
Dictionary &dict_dep = mixturedeparturefunctionslibrary.departure_function_map[Name];
if (dict_dep.is_empty()){throw ValueError(format("Departure function name [%s] seems to be invalid",Name.c_str()));}
// These terms are common
std::vector<double> n = dict_dep.get_double_vector("n");
std::vector<double> d = dict_dep.get_double_vector("d");