From f01ac7be43fcca4e1cd3c502be0259755396436b Mon Sep 17 00:00:00 2001
From: Ian Bell <ian.bell@nist.gov>
Date: Mon, 7 Feb 2022 20:57:55 -0500
Subject: [PATCH] Pass the alignment vector

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

diff --git a/include/teqp/algorithms/critical_tracing.hpp b/include/teqp/algorithms/critical_tracing.hpp
index c034af7..1c5cd18 100644
--- a/include/teqp/algorithms/critical_tracing.hpp
+++ b/include/teqp/algorithms/critical_tracing.hpp
@@ -243,24 +243,24 @@ struct CriticalTracing {
         auto eval = [](const auto& ex) { return ex.eval(); };
         if (all(eval(rhovec_minus > 0)) && all(eval(rhovec_plus > 0))) {
             // Conventional centered derivative
-            auto plus_sigma2 = get_derivs(model, T, rhovec_plus);
-            auto minus_sigma2 = get_derivs(model, T, rhovec_minus);
+            auto plus_sigma2 = get_derivs(model, T, rhovec_plus, ei.v0);
+            auto minus_sigma2 = get_derivs(model, T, rhovec_minus, ei.v0);
             deriv_sigma2 = (plus_sigma2.tot - minus_sigma2.tot) / (2.0 * sigma2);
             stepping_desc = "conventional centered";
         }
         else if (all(eval(rhovec_plus > 0))) {
             // Forward derivative in the direction of v1
-            auto plus_sigma2 = get_derivs(model, T, rhovec_plus);
+            auto plus_sigma2 = get_derivs(model, T, rhovec_plus, ei.v0);
             auto rhovec_2plus = (rhovec + 2 * ei.v1 * sigma2).eval();
-            auto plus2_sigma2 = get_derivs(model, T, rhovec_2plus);
+            auto plus2_sigma2 = get_derivs(model, T, rhovec_2plus, ei.v0);
             deriv_sigma2 = (-3 * derivs + 4 * plus_sigma2.tot - plus2_sigma2.tot) / (2.0 * sigma2);
             stepping_desc = "forward";
         }
         else if (all(eval(rhovec_minus > 0))) {
             // Negative derivative in the direction of v1
-            auto minus_sigma2 = get_derivs(model, T, rhovec_minus);
+            auto minus_sigma2 = get_derivs(model, T, rhovec_minus, ei.v0);
             auto rhovec_2minus = (rhovec - 2 * ei.v1 * sigma2).eval();
-            auto minus2_sigma2 = get_derivs(model, T, rhovec_2minus);
+            auto minus2_sigma2 = get_derivs(model, T, rhovec_2minus, ei.v0);
             deriv_sigma2 = (-3 * derivs + 4 * minus_sigma2.tot - minus2_sigma2.tot) / (-2.0 * sigma2);
             stepping_desc = "backwards";
         }
-- 
GitLab