local sin = math.sin
local cos = math.cos
local exp = math.exp
local pi = math.pi

function fillTable(tab, x, y, z, t)
   tab.T = {}
   

tab.p = 50000.0*sin(1.413716694115407*y) + 20000.0*sin(2.6703537555513242*z) - 25000.0*sin(2.3561944901923449*x*y) - 10000.0*sin(2.1991148575128551*x*z) + 20000.0*cos(1.2566370614359174*x) + 10000.0*cos(2.5132741228718347*y*z) + 50000.0*cos(0.94247779607693794*x*y*z) + 100000.0



tab.T = 0.00348432055749129*(50000.0*sin(1.413716694115407*y) +20000.0*sin(2.6703537555513242*z) - 25000.0*sin(2.3561944901923449*x*y) - 10000.0*sin(2.1991148575128551*x*z) + 20000.0*cos(1.2566370614359174*x) + 10000.0*cos(2.5132741228718347*y*z) + 50000.0*cos(0.94247779607693794*x*y*z) + 100000.0)/(0.15*sin(2.3561944901923449*x) + 0.05*sin(2.3561944901923449*x*z) + 0.1*sin(0.62831853071795868*x*y*z) - 0.1*cos(1.413716694115407*y) + 0.1*cos(2.5132741228718347*z) + 0.08*cos(2.0420352248333657*x*y) +0.12*cos(1.5707963267948966*y*z) + 1.0)



tab.velx = 7.0*sin(1.5707963267948966*x) + 4.0*sin(2.5132741228718347*x*z) - 2.0*sin(1.5707963267948966*x*y*z) - 15.0*cos(2.6703537555513242*y) - 10.0*cos(1.2566370614359174*z) + 7.0*cos(1.8849555921538759*x*y) -4.0*cos(2.827433388230814*y*z) + 70.0



tab.vely = -5.0*sin(2.5132741228718347*x) - 5.0*sin(1.2566370614359174*x*z) + 5.0*sin(1.8849555921538759*y*z) +10.0*cos(2.5132741228718347*y) + 5.0*cos(1.5707963267948966*z) - 11.0*cos(2.827433388230814*x*y) +10.0*cos(0.62831853071795868*x*y*z) + 90.0



tab.velz = -10.0*sin(2.6703537555513242*x) + 5.0*sin(2.3561944901923449*y*z) + 20.0*sin(0.94247779607693794*x*y*z) + 10.0*cos(2.827433388230814*y) + 12.0*cos(1.5707963267948966*z) - 12.0*cos(1.2566370614359174*x*y) +11.0*cos(2.5132741228718347*x*z) + 80.0



   return tab
end

function ghostCells(args)
   x = args.x; y = args.y; z = args.z; t = args.t
   i = args.i; j = args.j; k = args.k
   ghost0 = {}
   fillTable(ghost0, args.gc0x, args.gc0y, args.gc0z, t)
   --ghost1 = {}
   --fillTable(ghost1, args.gc1x, args.gc1y, args.gc1z, t)
   return ghost0--, ghost1
end

function interface(args)
   x = args.x; y = args.y; z = args.z; t = args.t
   iface = {}
   fillTable(iface, x, y, z, t);
   return iface
end


