[petsc-users] Setting TimeStep in TS

Smith, Barry F. bsmith at mcs.anl.gov
Wed Aug 8 12:54:01 CDT 2018



> On Aug 8, 2018, at 11:31 AM, Amir <mhbaghaei at mail.sjtu.edu.cn> wrote:
> 
> You are right! It does have the "latest solution vector". But, I tried to use TSGetSolution() to get it but it seems it gives me the solution at the current time step, not the new solution.

    Yes, this is a feature, the new solution has not yet been updated which is why the solution is passed through the function interface for you to use.

    Is everything ok now (you can use the update function argument?) or is there still an issue for us to deal with?

      Barry


> 
> On Aug 8 2018, at 11:37 pm, Smith, Barry F. <bsmith at mcs.anl.gov> wrote:
> 
> 
> I don't understand. One of the arguments to your TSPseudoSetVerifyTimeStep() routine is the "update - latest solution vector" but you seem to want access to the "next" solution that has yet to be computed? There is no way to access that because it has not yet been computed and cannot be computed until the next time step has been decided on.
> 
> Barry
> 
> 
> On Aug 8, 2018, at 3:25 AM, Amir <mhbaghaei at mail.sjtu.edu.cn> wrote:
> 
> Hi
> Trying to set the time step for next step, using TSPseudoSetVerifyTimeStep(), by TTE method. It seems we need to use the new solution at the next step. We can get that by TSSetPostEvaluate(). However, it is called before TimeStep routine. Is there any way that I can access to new solution, while I can set the the time step?
> Thanks for your great time.
> Amir
> 



More information about the petsc-users mailing list