Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-11 Thread Barry Smith
> On Feb 11, 2015, at 8:32 PM, Dmitry Karpeyev wrote: > > Hong, I could stop by your office tomorrow to chat a bit more about the > "funky system" I'm talking about. > Is tomorrow good for you? > Dmitry. > > On Wed Feb 11 2015 at 8:30:47 PM Hong Zhang wrote: > This is a good heads-up for me.

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-11 Thread Dmitry Karpeyev
Hong, I could stop by your office tomorrow to chat a bit more about the "funky system" I'm talking about. Is tomorrow good for you? Dmitry. On Wed Feb 11 2015 at 8:30:47 PM Hong Zhang wrote: > This is a good heads-up for me. Actually I wanted that our adjoint models > could handle forward integr

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-11 Thread Hong Zhang
This is a good heads-up for me. Actually I wanted that our adjoint models could handle forward integrations like this: TSSolve(ts,u); TSStep(ts); TSSolve(ts,u); Then the reverse run would look like: TSAdjointSolve(ts); TSAdjointStep(ts); TSAdjointSolve(ts); This flexibility should be very use

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-08 Thread Emil Constantinescu
On 2/8/15 8:41 PM, Barry Smith wrote: I never said remove TSStep() or make it completely private. I just want to limit its use to when it is really needed by the user. Then, how about we move TSSetSolution from beginner to intermediate or lower level (the same level where we have TSStep

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-08 Thread Barry Smith
If the number of degrees of freedom do not change and they have essentially the same "meaning" regardless of which process they are on then we can "hide" inside the Vec object (and Mat object) the fact that they move around between processors so TS shouldn't care. BUT note that if the user

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-08 Thread Dmitry Karpeyev
This is a bit off-topic, but I'm dealing exactly with this sort of "funky system" -- particles+field. Since degrees of freedom do move between processors, it's unclear how it fits into the current TS framework short of rebuilding the TS every timestep. That's a bit inconvenient, since now I have to

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-08 Thread Barry Smith
> On Feb 8, 2015, at 8:11 PM, Jed Brown wrote: > > Barry Smith writes: >> Why can't TS handle that? Users always prefer to use the lowest >> level thing available, that doesn't mean it is right. >> >> In the language of TS what does a "funky system, liked mixed >> particle-field," mean

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-08 Thread Jed Brown
Barry Smith writes: >Why can't TS handle that? Users always prefer to use the lowest >level thing available, that doesn't mean it is right. > >In the language of TS what does a "funky system, liked mixed >particle-field," mean, does it require a little more API on our >side? I'

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-08 Thread Barry Smith
> On Feb 8, 2015, at 7:48 PM, Jed Brown wrote: > > Barry Smith writes: >> Why would a user want to do TSStep() instead of calling TSSolve()? > > The user is stepping a funky system, liked mixed particle-field, and > prefer to roll a loop instead of inject all their logic into a bunch of > ca

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-08 Thread Jed Brown
Barry Smith writes: >Why would a user want to do TSStep() instead of calling TSSolve()? The user is stepping a funky system, liked mixed particle-field, and prefer to roll a loop instead of inject all their logic into a bunch of callbacks. signature.asc Description: PGP signature

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-08 Thread Barry Smith
> On Feb 8, 2015, at 12:12 PM, Emil Constantinescu wrote: > > On 2/6/15 9:35 PM, Jed Brown wrote: >> Barry Smith writes: >>>I am not proposing removing the solution from TSSolve() argument >>>list, far from it. I am proposing removing the TSSetSolution(), >>>keeping the solution in

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-08 Thread Emil Constantinescu
On 2/6/15 9:35 PM, Jed Brown wrote: Barry Smith writes: I am not proposing removing the solution from TSSolve() argument list, far from it. I am proposing removing the TSSetSolution(), keeping the solution in TSSolve() as the standard approach, but also allowing a callback for w

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-07 Thread Matthew Knepley
On Sat, Feb 7, 2015 at 11:00 AM, Barry Smith wrote: > > Hmm, we should definitely debug this because SNESComputeFunction() > should be usable as a stand-alone function. In a quick look at the code I > cannot see why a SNESSetSolution() call should be needed, nor would I want > it to be needed i

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-07 Thread Barry Smith
Hmm, we should definitely debug this because SNESComputeFunction() should be usable as a stand-alone function. In a quick look at the code I cannot see why a SNESSetSolution() call should be needed, nor would I want it to be needed in order to use SNESComputeFunction(). How can I reproduce y

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-06 Thread Matthew Knepley
On Fri, Feb 6, 2015 at 9:35 PM, Jed Brown wrote: > Barry Smith writes: > >I am not proposing removing the solution from TSSolve() argument > >list, far from it. I am proposing removing the TSSetSolution(), > >keeping the solution in TSSolve() as the standard approach, but > >also

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-06 Thread Jed Brown
Barry Smith writes: >I am not proposing removing the solution from TSSolve() argument >list, far from it. I am proposing removing the TSSetSolution(), >keeping the solution in TSSolve() as the standard approach, but >also allowing a callback for when the user wants the DM passed to

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-06 Thread Barry Smith
> On Feb 6, 2015, at 9:28 PM, Jed Brown wrote: > > Barry Smith writes: >> Nonsense. They could always put the initial conditions in an >> appropriate vector and the callback just be a vec copy, then you get >> back the effect of TSSet"Initial"Solution() > > How is that simpler or clearer th

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-06 Thread Jed Brown
Barry Smith writes: > Nonsense. They could always put the initial conditions in an > appropriate vector and the callback just be a vec copy, then you get > back the effect of TSSet"Initial"Solution() How is that simpler or clearer than passing it as an argument to TSSolve? I didn't say it'

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-06 Thread Barry Smith
> On Feb 6, 2015, at 9:16 PM, Jed Brown wrote: > > Barry Smith writes: > >>> On Feb 6, 2015, at 8:59 PM, Jed Brown wrote: >>> >>> Barry Smith writes: So going back to my email, now with more clarity, do we get rid of the XXXSetSolution/RightHandSide() paradigm; this would void >

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-06 Thread Jed Brown
Barry Smith writes: >> On Feb 6, 2015, at 8:59 PM, Jed Brown wrote: >> >> Barry Smith writes: >>> So going back to my email, now with more clarity, do we get rid of >>> the XXXSetSolution/RightHandSide() paradigm; this would void >>> questions like Mark's about what the differences are b

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-06 Thread Barry Smith
> On Feb 6, 2015, at 8:59 PM, Jed Brown wrote: > > Barry Smith writes: >> So going back to my email, now with more clarity, do we get rid of >> the XXXSetSolution/RightHandSide() paradigm; this would void >> questions like Mark's about what the differences are between >> them**. But do

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-06 Thread Jed Brown
Barry Smith writes: >So going back to my email, now with more clarity, do we get rid of >the XXXSetSolution/RightHandSide() paradigm; this would void >questions like Mark's about what the differences are between >them**. But do we lose any useful functionality? I think the main po

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-06 Thread Barry Smith
> On Feb 6, 2015, at 7:58 PM, Jed Brown wrote: > > Barry Smith writes: > >>> On Feb 6, 2015, at 12:28 PM, Mark Adams wrote: >>> >>> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSSolve.html#TSSolve >>> >>> The TSSolve web page does not have an output parameter. It is not

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-06 Thread Jed Brown
Barry Smith writes: >I note that with the current code if you run TSSolve() with >TS_EXACTFINALTIME_INTERPOLATE and then another TSSolve to continue >solving for later time it actually uses the "interpolated" value as >the starting point for the next solve (and not the final solut

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-06 Thread Jed Brown
Barry Smith writes: >> On Feb 6, 2015, at 12:28 PM, Mark Adams wrote: >> >> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSSolve.html#TSSolve >> >> The TSSolve web page does not have an output parameter. It is not clear to >> my why you would use TSSetSolution. Is there an

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-06 Thread Barry Smith
I note that with the current code if you run TSSolve() with TS_EXACTFINALTIME_INTERPOLATE and then another TSSolve to continue solving for later time it actually uses the "interpolated" value as the starting point for the next solve (and not the final solution of the previous TSSolve()). Is

Re: [petsc-dev] TSSolve web page JED and EMIL READ THIS!

2015-02-06 Thread Barry Smith
> On Feb 6, 2015, at 12:28 PM, Mark Adams wrote: > > http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSSolve.html#TSSolve > > The TSSolve web page does not have an output parameter. It is not clear to > my why you would use TSSetSolution. Is there any difference between using