<div dir="ltr"><div><div><div><div><div><div><div>Hi All,<br><br></div>I'm looking to pass a vector between a KSP and TS routine. The KSP routine must be called before each timestep, and the solution vector is needed for the TS routine. Normally, TSSolve() runs over all timesteps, but in my case, I'd like to be able to add a routine before each timestep.<br><br>Can someone direct me to an example script or briefly explain a case which shows how to control time stepping such that one could achieve something along the lines of:<br><br></div>while (step < maxsteps+1){<br></div><div>        KSPSolve(ksp, v, p); /* solves for Vec p and passes this info onto TS */<br></div>        TSSolve(ts, u); /* only iterate for 1 timestep */<br>}<br><br></div>The function TSSetPreStep() seemed promising, but it can only take TS as arguments which may not be sufficient to pass a global vector.<br><br></div>Thank you in advance.<br></div>Scott Dossa<br></div><div><div><div><div><br><br></div></div></div></div></div>