From dfd5fca2a38a5f0c7f22435b3ed12ddba5fb07a3 Mon Sep 17 00:00:00 2001
From: Ian Bell <ian.bell@nist.gov>
Date: Sun, 6 Nov 2022 20:39:02 -0500
Subject: [PATCH] One more eval to avoid expression

---
 include/teqp/algorithms/critical_tracing.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/teqp/algorithms/critical_tracing.hpp b/include/teqp/algorithms/critical_tracing.hpp
index 752fc3d..f4e311e 100644
--- a/include/teqp/algorithms/critical_tracing.hpp
+++ b/include/teqp/algorithms/critical_tracing.hpp
@@ -170,7 +170,7 @@ struct CriticalTracing {
         fcn_t wrapper = [&rhovecmcx, &v0, &T, &model](const MultiComplex<double>& sigma_1) {
             Eigen::Vector<MultiComplex<double>, Eigen::Dynamic> rhovecused = rhovecmcx + sigma_1 * v0;
             auto rhotot = rhovecused.sum();
-            auto molefrac = rhovecused / rhotot;
+            auto molefrac = (rhovecused / rhotot).eval();
             return model.alphar(T, rhotot, molefrac) * model.R(molefrac) * T * rhotot;
         };
         auto psir_derivs_ = diff_mcx1(wrapper, 0.0, 4, true);
-- 
GitLab