From b1569f4a79a01e4081a7230d58e448538fe6e6ce Mon Sep 17 00:00:00 2001 From: Akash Shukla Date: Wed, 19 Jul 2023 15:45:19 -0500 Subject: [PATCH] make twist shift compatible with new evalBasis changes --- Updater/twistShiftData/TwistShiftFun.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Updater/twistShiftData/TwistShiftFun.lua b/Updater/twistShiftData/TwistShiftFun.lua index 51c407ebc..bbe6724e9 100644 --- a/Updater/twistShiftData/TwistShiftFun.lua +++ b/Updater/twistShiftData/TwistShiftFun.lua @@ -1050,7 +1050,9 @@ function _M.getDonors(grid, yShift, yShBasis) evPoint[dC] = evPoint[dC]+(xS-1)*(grid:dx(dC)-2.*delta[dC]) -- Evaluate yShift at this point. - yShBasis:evalBasis({p2l(evPoint[1],grid:cellCenterInDir(1),grid:dx(1))}, yShBasisEv) + local p2l_eval= Lin.Vec(1) + p2l_eval[1] = p2l(evPoint[1],grid:cellCenterInDir(1),grid:dx(1)) + yShBasis:evalBasis(p2l_eval:data(), yShBasisEv:data()) local yShEv = 0. for k = 1,yShNumB do yShEv = yShEv + yShItr[k]*yShBasisEv[k] end @@ -1073,7 +1075,8 @@ function _M.getDonors(grid, yShift, yShBasis) if sI==numSteps[stepDim] then newP[stepDim]=newP[stepDim]-2.*delta[stepDim] end -- Evaluate yShift at this point. - yShBasis:evalBasis({p2l(newP[1],grid:cellCenterInDir(1),grid:dx(1))}, yShBasisEv) + p2l_eval[1] = p2l(newP[1],grid:cellCenterInDir(1),grid:dx(1)) + yShBasis:evalBasis(p2l_eval:data(), yShBasisEv:data()) yShEv = 0. for k = 1,yShNumB do yShEv = yShEv + yShItr[k]*yShBasisEv[k] end