format fractions to string properly; closes #584

This commit is contained in:
Ian Bell
2015-04-09 20:13:56 -06:00
parent d73de46021
commit 129dc5fc05
2 changed files with 2 additions and 2 deletions

View File

@@ -273,7 +273,7 @@ std::string CoolProp::TabularBackend::path_to_tables(void){
std::vector<CoolPropDbl> fractions = AS->get_mole_fractions();
std::vector<std::string> components;
for (std::size_t i = 0; i < fluids.size(); ++i){
components.push_back(format("%s[%0.10f]", fluids[i].c_str(), fractions[i]));
components.push_back(format("%s[%0.10Lf]", fluids[i].c_str(), fractions[i]));
}
return get_home_dir() + "/.CoolProp/Tables/" + AS->backend_name() + "(" + strjoin(components, "&") + ")";
}

View File

@@ -519,7 +519,7 @@ class TabularBackend : public AbstractState
void update(CoolProp::input_pairs input_pair, double Value1, double Value2){};
void set_mole_fractions(const std::vector<CoolPropDbl> &mole_fractions){this->AS->set_mole_fractions(mole_fractions);};
void set_mass_fractions(const std::vector<CoolPropDbl> &mass_fractions){};
const std::vector<long double> & get_mole_fractions(){throw NotImplementedError("get_mole_fractions not implemented for TTSE");};
const std::vector<long double> & get_mole_fractions(){return AS->get_mole_fractions();};
CoolPropDbl calc_molar_mass(void){return AS->molar_mass();};
virtual double evaluate_single_phase_phmolar(parameters output, std::size_t i, std::size_t j) = 0;
virtual double evaluate_single_phase_pT(parameters output, std::size_t i, std::size_t j) = 0;