From b672ea191ecc534e763bd19a63b246ed0429cc50 Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Tue, 5 May 2015 21:19:29 -0600 Subject: [PATCH] fix REFPROP PATH for fluids on *nix --- src/Backends/REFPROP/REFPROPMixtureBackend.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Backends/REFPROP/REFPROPMixtureBackend.cpp b/src/Backends/REFPROP/REFPROPMixtureBackend.cpp index 4036ca9b..dba67c86 100644 --- a/src/Backends/REFPROP/REFPROPMixtureBackend.cpp +++ b/src/Backends/REFPROP/REFPROPMixtureBackend.cpp @@ -56,9 +56,17 @@ std::string endings[number_of_endings] = {"", ".FLD", ".fld", ".PPF", ".ppf"}; static char rel_path_HMC_BNC[] = "HMX.BNC"; static char default_reference_state[] = "DEF"; +#if defined(__powerpc__) || defined(__ISLINUX__) || defined(__ISAPPLE__) + char refpropPath[] = "/opt/refprop"; +#elif defined(__ISWINDOWS__) + char refpropPath[] = ""; +#else + #pragma error +#endif + std::string get_REFPROP_fluid_path() { - std::string rpPath = ""; + std::string rpPath = refpropPath; // Allow the user to specify an alternative REFPROP path by configuration value std::string alt_refprop_path = CoolProp::get_config_string(ALTERNATIVE_REFPROP_PATH); if (!alt_refprop_path.empty()){ rpPath = alt_refprop_path; }