From c24c60732cb4741aec1f048fd2f5907aefb5c777 Mon Sep 17 00:00:00 2001
From: Ian Bell <ian.bell@nist.gov>
Date: Thu, 8 Jul 2021 17:14:56 -0400
Subject: [PATCH] Another return attempt

---
 include/teqp/algorithms/VLE.hpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/teqp/algorithms/VLE.hpp b/include/teqp/algorithms/VLE.hpp
index 00d419c..6069643 100644
--- a/include/teqp/algorithms/VLE.hpp
+++ b/include/teqp/algorithms/VLE.hpp
@@ -79,7 +79,7 @@ public:
 };
 
 template<typename Residual, typename Scalar>
-auto do_pure_VLE_T(Residual &resid, Scalar rhoL, Scalar rhoV, int maxiter) {
+Eigen::ArrayXd do_pure_VLE_T(Residual &resid, Scalar rhoL, Scalar rhoV, int maxiter) {
     auto rhovec = (Eigen::ArrayXd(2) << rhoL, rhoV).finished();
     auto r0 = resid.call(rhovec);
     auto J = resid.Jacobian(rhovec);
@@ -99,12 +99,11 @@ auto do_pure_VLE_T(Residual &resid, Scalar rhoL, Scalar rhoV, int maxiter) {
         }
         rhovec = rhovecnew;
     }
-    Eigen::ArrayXd r = (Eigen::ArrayXd(2) << rhovec[0], rhovec[1]).finished();
-    return r;
+    return (Eigen::ArrayXd(2) << rhovec[0], rhovec[1]).finished();
 }
 
 template<typename Model, typename Scalar>
-auto pure_VLE_T(const Model& model, Scalar T, Scalar rhoL, Scalar rhoV, int maxiter) {
+Eigen::ArrayXd pure_VLE_T(const Model& model, Scalar T, Scalar rhoL, Scalar rhoV, int maxiter) {
     auto res = IsothermPureVLEResiduals(model, T);
     return do_pure_VLE_T(res, rhoL, rhoV, maxiter);
 }
-- 
GitLab