Skip to content

Commit

Permalink
format fractions to string properly; closes #584
Browse files Browse the repository at this point in the history
  • Loading branch information
ibell committed Apr 10, 2015
1 parent d73de46 commit 129dc5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Backends/Tabular/TabularBackends.cpp
Expand Up @@ -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, "&") + ")";
}
Expand Down
2 changes: 1 addition & 1 deletion src/Backends/Tabular/TabularBackends.h
Expand Up @@ -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;
Expand Down

0 comments on commit 129dc5f

Please sign in to comment.