On 10/29/07, Richard Tran Mills wrote:
> Barry,
>
> That accomplishes essentially the same thing as Lisandro's proposed
> SNESSetLinearSolve() but is more consistent with the existing framework of
> PETSc.
> it seems like there ought to be a KSP shell option. But what might
> this mess up?
But
On 10/29/07, Barry Smith wrote:
>This may be an error in our design, we may need a shell KSP. It would be
> nice not to need it, but ...
>You seem to be saying you want something much like a KSP shell?
Indeed. Perhaps we need one in the end, but I would prefer to avoid that.
> What are
On 10/29/07, Barry Smith wrote:
> I strongly resist this. Back in the bad old days, 1995?, there was
> some pressure to "allow SNES to use any linear solver package, not just
> PETSc's". WELL, the whole idea then and now is PETSc KSP is suppose to
> be a powerful enough wrapper to wrap ANY linea
Barry,
That accomplishes essentially the same thing as Lisandro's proposed
SNESSetLinearSolve() but is more consistent with the existing framework of
PETSc. In fact, it seems *inconsistent* right now that there is a way to use
a shell PC but not a way to use a shell KSP. Since it is not alway
So SNES is actually only "seeing" a system of size n? And you are
NOT using Newton's method on that nonlinear system of size n? Instead
you are solving some other linear system (defined by your solution
process) and pretending it is the Newton solution?
Barry
On Mon, 29 Oct 2007, Lisandro D
Yes, Barry, I know we can do this, but this trick is not fully
fuctional, or you have to make a lot of more trickery:
- You have to explicitely use a KSPPREONLY, thus you cannot reuse this
ksp in your 'LinearSolve' routine. Then, you cannot get EW method work
in a easy way.
- PCSHELL to currently
On Mon, 29 Oct 2007, Lisandro Dalcin wrote:
> On 10/29/07, Barry Smith wrote:
> > I strongly resist this. Back in the bad old days, 1995?, there was
> > some pressure to "allow SNES to use any linear solver package, not just
> > PETSc's". WELL, the whole idea then and now is PETSc KSP is supp
On 10/29/07, Lisandro Dalcin wrote:
> In practice, the only way to wrap any solver package is
> KSPPREONLY+PCSHELL. And you actually implement the linear solve in PC,
> not KSP.
I disagree here. See below.
> If PETSc internals were implemented in C++, I would simply do:
>
> MyKSP: public KSP {
>
Some time ago I made a request for adding SNESSetLinearSolve(), in
order to let users set a custom linear solve routine to SNES. I was
not clear to me if this idea was finally accepted, so I want to ask
again.
I really needs this feature in the near future, I I would like this to
go in the next pe
On Mon, 29 Oct 2007, Lisandro Dalcin wrote:
> Barry, why do you really resist this idea? Do you believe it is an
> example of 'too many ways to do it'? All I am asking for is let users
> replace the call to KSPSolve for a custom call, wich in fact CAN
> internally call KSPSolve after getting the
On 10/29/07, Lisandro Dalcin wrote:
> Yes, Barry, I know we can do this, but this trick is not fully
> fuctional, or you have to make a lot of more trickery:
>
> - You have to explicitely use a KSPPREONLY, thus you cannot reuse this
> ksp in your 'LinearSolve' routine. Then, you cannot get EW meth
You might want to investigate FeasNewt from Todd Munson, which is
a very elegant solution of this problem.
Matt
On 10/29/07, Lisandro Dalcin wrote:
> Some time ago I made a request for adding SNESSetLinearSolve(), in
> order to let users set a custom linear solve routine to SNES. I was
> not c
SNESGetKSP(
KSPSetType(ksp,KSPPREONLY)
KSPGetPC(
PCSetType(pc,PCSHELL);
PCShellSetApply(pc,YourSolver);
On Mon, 29 Oct 2007, Lisandro Dalcin wrote:
> Some time ago I made a request for adding SNESSetLinearSolve(), in
> order to let users set a custom linear solve routine to SNES. I wa
13 matches
Mail list logo