From 89c5269f1fdaade19ef793fb49094e9b36614bf9 Mon Sep 17 00:00:00 2001 From: Allan Leal Date: Mon, 21 Nov 2022 14:08:13 +0100 Subject: [PATCH 1/3] Fixed memory leak in `thermoPropertiesGasCORK` --- ThermoFun/Substances/Gases/GasCORK.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ThermoFun/Substances/Gases/GasCORK.cpp b/ThermoFun/Substances/Gases/GasCORK.cpp index d12075bd..58d50bb7 100644 --- a/ThermoFun/Substances/Gases/GasCORK.cpp +++ b/ThermoFun/Substances/Gases/GasCORK.cpp @@ -1,3 +1,4 @@ +#include #include "Substances/Gases/GasCORK.h" #include "Substances/Gases/s_solmod_.h" #include "Substance.h" @@ -18,13 +19,13 @@ auto thermoPropertiesGasCORK(Reaktoro_::Temperature TK, Reaktoro_::Pressure Pbar solmod::TCORKcalc myCORK( 1, Pbar.val, (TK.val), Eos_Code ); // modified 05.11.2010 (TW) double TClow = subst.thermoParameters().temperature_intervals[0][0]; - double * CPg = new double[7]; + std::array CPg; for (unsigned int i = 0; i < 7; i++) { CPg[i] = subst.thermoParameters().critical_parameters[i]; } - myCORK.CORKCalcFugPure( (TClow/*+273.15*/), (CPg), FugProps ); + myCORK.CORKCalcFugPure( (TClow/*+273.15*/), CPg.data(), FugProps ); // increment thermodynamic properties tps.gibbs_energy += R_CONSTANT * (TK) * log( FugProps[0] ); // from ideal gas at 1 bar and givent T to pure real gas/fluid at T and P From e4671ab7ca18c74651bfe00a35d174c2bd22c1d9 Mon Sep 17 00:00:00 2001 From: Allan Leal Date: Mon, 21 Nov 2022 15:11:31 +0100 Subject: [PATCH 2/3] Adding fmt as deps to check if CI succeeds. --- environment.devenv.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.devenv.yml b/environment.devenv.yml index a5a2f587..52b9455d 100644 --- a/environment.devenv.yml +++ b/environment.devenv.yml @@ -14,6 +14,7 @@ dependencies: - pybind11 - nlohmann_json - spdlog=1.10.0 + - fmt - chemicalfun=0.1.5 - python={{ python_version }} - pytest From 1f211dbe742d585e29d8617dbd38d8f1c6494a52 Mon Sep 17 00:00:00 2001 From: gdmiron Date: Sat, 26 Nov 2022 14:09:40 +0100 Subject: [PATCH 3/3] bumped version to v0.4.1 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 26c769b1..b72f0142 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") include(CCache) # Set the name of the project -project(ThermoFun VERSION 0.4.0 LANGUAGES CXX) +project(ThermoFun VERSION 0.4.1 LANGUAGES CXX) # Define variables with the GNU standard installation directories include(GNUInstallDirs)