From a5e9851c4b3cf2e4c4cafdb631ad09ddb7b1dc91 Mon Sep 17 00:00:00 2001 From: Ian Bell <ian.bell@nist.gov> Date: Thu, 19 May 2022 15:40:00 -0400 Subject: [PATCH] Is this how to make non-MSVC compilers happy? --- include/teqp/algorithms/VLE.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/teqp/algorithms/VLE.hpp b/include/teqp/algorithms/VLE.hpp index 6b47ed2..70050a4 100644 --- a/include/teqp/algorithms/VLE.hpp +++ b/include/teqp/algorithms/VLE.hpp @@ -277,7 +277,7 @@ auto get_pure_critical_conditions_Jacobian(const Model& model, const Scalar T, c template<typename Model, typename Scalar, ADBackends backend = ADBackends::autodiff> auto solve_pure_critical(const Model& model, const Scalar T0, const Scalar rho0, const nlohmann::json& flags = {}) { auto x = (Eigen::ArrayXd(2) << T0, rho0).finished(); - int maxsteps = (flags.contains("maxsteps")) ? flags.at("maxsteps") : 10; + int maxsteps = (flags.contains("maxsteps")) ? flags.at("maxsteps").get<int>() : 10; for (auto counter = 0; counter < maxsteps; ++counter) { auto [resids, Jacobian] = get_pure_critical_conditions_Jacobian<Model, Scalar, backend>(model, x[0], x[1]); auto v = linsolve(Jacobian, -resids); -- GitLab