NotebookEvaluate[NotebookDirectory[]<>"/split_step.nb"];

HarmonicTrap2D[0.01,1.0];
sizes={256,64};
timeStep=0.001;
k=0.3;
contactInteractionFactor=4 Pi k;
initialize[];
gridReport

calcAllTable
p1x=ListPlot[projectionX,Joined->True,PlotRange->All];
p1y=ListPlot[projectionY,Joined->True,PlotRange->All];

AbsoluteTiming[evolve["ite",100,20]]

calcAllTable
p2x=ListPlot[projectionX,Joined->True,PlotRange->All,PlotStyle->Black];
p2y=ListPlot[projectionY,Joined->True,PlotRange->All,PlotStyle->Red];
Show[p1x,p2x,PlotRange->All]
Show[p1y,p2y,PlotRange->All]

Show[p2x,p2y,PlotRange->{{-50,50},All}]

reportEnergies

reportMoments

wf0=wf;
psi0=psi;

fnc[{x_,y_}]:=(psi0 @@{x,y})(1+0.2Sin[2x]);
Plot[Abs[fnc[{x,0}]],{x,-50,50},PlotRange->All]
wf=Map[fnc,mesh[],{dim}];

plot:=AppendTo[lplots,{time,ListPlot[projectionX,Joined->True,PlotRange->All,PlotStyle->Black,Filling->0],ListPlot[projectionY,Joined->True,PlotRange->All,PlotStyle->Red],psi}];
reset[];
newPotential[free];
k=-2;
contactInteractionFactor=4 Pi k;
AbsoluteTiming[evolve["rte",250,50,50]]

Map[Show[#,PlotRange->{{-50,50},All}]&,lplots[[All,2]]]