From b70178f79fe9f4950b3075b80fec4495313ffba5 Mon Sep 17 00:00:00 2001
From: Ian Bell <ian.bell@nist.gov>
Date: Thu, 28 Jul 2022 15:57:39 -0400
Subject: [PATCH] Also align eigenvectors when taking the temperature
 derivative

---
 include/teqp/algorithms/critical_tracing.hpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/teqp/algorithms/critical_tracing.hpp b/include/teqp/algorithms/critical_tracing.hpp
index b3b8a8a..2d8c96d 100644
--- a/include/teqp/algorithms/critical_tracing.hpp
+++ b/include/teqp/algorithms/critical_tracing.hpp
@@ -233,8 +233,8 @@ struct CriticalTracing {
 
         // The temperature derivative of total Psi w.r.t.T from a centered finite difference in T
         auto dT = 1e-7;
-        auto plusT = get_derivs(model, T + dT, rhovec).tot;
-        auto minusT = get_derivs(model, T - dT, rhovec).tot;
+        auto plusT = get_derivs(model, T + dT, rhovec, all_derivs.ei.v0).tot;
+        auto minusT = get_derivs(model, T - dT, rhovec, all_derivs.ei.v0).tot;
         auto derivT = (plusT - minusT) / (2.0 * dT);
 
         // Solve the eigenvalue problem for the given T & rho
-- 
GitLab