local Lin = require "Lib.Linalg"
local function stencilFn(dx)
  local _M = {}

  _M[1] = Lin.Mat(3,3)
  _M[1][1][1] = 3.75/dx[1]^2
  _M[1][1][2] = 4.763139720814412/dx[1]^2
  _M[1][1][3] = 2.683281572999748/dx[1]^2
  _M[1][2][1] = -4.763139720814412/dx[1]^2
  _M[1][2][2] = -5.8125/dx[1]^2
  _M[1][2][3] = -2.953149801483155/dx[1]^2
  _M[1][3][1] = 1.677050983124842/dx[1]^2
  _M[1][3][2] = 1.210307295689818/dx[1]^2
  _M[1][3][3] = -0.5625/dx[1]^2
  _M[2] = Lin.Mat(3,3)
  _M[2][1][1] = -7.5/dx[1]^2
  _M[2][1][2] = 0.0
  _M[2][1][3] = -5.366563145999495/dx[1]^2
  _M[2][2][1] = 0.0
  _M[2][2][2] = -21.375/dx[1]^2
  _M[2][2][3] = 0.0
  _M[2][3][1] = -3.354101966249685/dx[1]^2
  _M[2][3][2] = 0.0
  _M[2][3][3] = -25.125/dx[1]^2
  _M[3] = Lin.Mat(3,3)
  _M[3][1][1] = 3.75/dx[1]^2
  _M[3][1][2] = -4.763139720814412/dx[1]^2
  _M[3][1][3] = 2.683281572999748/dx[1]^2
  _M[3][2][1] = 4.763139720814412/dx[1]^2
  _M[3][2][2] = -5.8125/dx[1]^2
  _M[3][2][3] = 2.953149801483155/dx[1]^2
  _M[3][3][1] = 1.677050983124842/dx[1]^2
  _M[3][3][2] = -1.210307295689818/dx[1]^2
  _M[3][3][3] = -0.5625/dx[1]^2
  return(_M)
end

return(stencilFn)