[petsc-dev] Copy *SNES-struct deeply

Barry Smith bsmith at mcs.anl.gov
Mon Mar 4 10:36:25 CST 2013


On Mar 4, 2013, at 10:18 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> 
> On Mon, Mar 4, 2013 at 10:13 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>    I am still deeply puzzled, why would you solve the "exact" same system again, surely something must be changed for the next time you solve it?
> 
> When computing transient adjoints, the entire history cannot typically be stored, so you checkpoint and incrementally recompute while following the adjoint backward in time. However, the method used to solve the system would not matter, provided that you have a scenario where if the solver converges, it converges to a unique solution.

  So you save the solution at some time step. Then later in another part of the calculation, you time integrate the solution for a few time steps (from the saved time-step) to "fill in" the solution values you did not save, then you use the solutions for those several time steps, then you discard them.

   So the question has nothing to do with SNES. It has to do with a "deep copy" of TS? Or being able to "restart" TS at a saved time step? Capabilities we want to build towards, but thinking in terms of a deep copy of SNES is a red herring.

   So, assuming one is using a single time integrator (not changing the integration method for different times), shouldn't this already pretty much work?


   Barry







More information about the petsc-dev mailing list