Skip to content

Commit

Permalink
make twist shift compatible with new evalBasis changes
Browse files Browse the repository at this point in the history
  • Loading branch information
akashukla committed Jul 19, 2023
1 parent f17cfbe commit b1569f4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Updater/twistShiftData/TwistShiftFun.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit b1569f4

Please sign in to comment.