adding SNESSetLinearSolve()

2007-11-08 Thread Lisandro Dalcin
On 11/7/07, Barry Smith bsmith at mcs.anl.gov wrote: Go ahead add and add the features you'd like. Well, I was thinking about all this. As I take very seriously all your concerns, I've decided to implement anyway a full features 'python shell' SNES. I was far more easier than I thought.

adding SNESSetLinearSolve()

2007-11-08 Thread Barry Smith
On Nov 8, 2007, at 3:00 PM, Lisandro Dalcin wrote: On 11/7/07, Barry Smith bsmith at mcs.anl.gov wrote: Go ahead add and add the features you'd like. Well, I was thinking about all this. As I take very seriously all your concerns, I've decided to implement anyway a full features

adding SNESSetLinearSolve()

2007-11-07 Thread Lisandro Dalcin
On 11/1/07, Barry Smith bsmith at mcs.anl.gov wrote: On Nov 1, 2007 9:24 AM, Lisandro Dalcin dalcinl at gmail.com For example, I would love to have SNESSetPresolve/SNESSetPostSolve and SNESSetPreStep/SNESSetPostStep, and perhaps a SNESSetPreLinearSolve/SNESSetPostLinearSolve. Of

adding SNESSetLinearSolve()

2007-11-07 Thread Barry Smith
Lisandro, Go ahead add and add the features you'd like. Barry On Nov 7, 2007, at 10:01 AM, Lisandro Dalcin wrote: On 11/1/07, Barry Smith bsmith at mcs.anl.gov wrote: On Nov 1, 2007 9:24 AM, Lisandro Dalcin dalcinl at gmail.com For example, I would love to have

adding SNESSetLinearSolve()

2007-11-01 Thread Matthew Knepley
Actually, making the regularization parameter independent for each process is much more efficient. Gene Golub had a poster on this at the last SIAM CSE meeting. Matt On Nov 1, 2007 9:24 AM, Lisandro Dalcin dalcinl at gmail.com wrote: On 10/31/07, Barry Smith bsmith at mcs.anl.gov wrote:

adding SNESSetLinearSolve()

2007-11-01 Thread Barry Smith
On Nov 1, 2007, at 10:16 AM, Matthew Knepley wrote: Actually, making the regularization parameter independent for each process is much more efficient. Gene Golub had a poster on this at the last SIAM CSE meeting. Matt On Nov 1, 2007 9:24 AM, Lisandro Dalcin dalcinl at gmail.com wrote:

adding SNESSetLinearSolve()

2007-11-01 Thread Lisandro Dalcin
On 10/31/07, Barry Smith bsmith at mcs.anl.gov wrote: Lisandro, A followup to our previous discussion. It sounds to me like you are actually solving an n+1 unknown nonlinear problem where the special unknown is kept secret from SNES and managed somehow by the application code? That's

adding SNESSetLinearSolve()

2007-10-31 Thread Barry Smith
Lisandro, A followup to our previous discussion. It sounds to me like you are actually solving an n+1 unknown nonlinear problem where the special unknown is kept secret from SNES and managed somehow by the application code? You can guess how I feel about this :-). PETSc/SNES is suppose

adding SNESSetLinearSolve()

2007-10-29 Thread Matthew Knepley
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 dalcinl at gmail.com wrote: Some time ago I made a request for adding SNESSetLinearSolve(), in order to let users set a custom linear solve routine

adding SNESSetLinearSolve()

2007-10-29 Thread Lisandro Dalcin
) 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 was not clear to me if this idea

adding SNESSetLinearSolve()

2007-10-29 Thread Matthew Knepley
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

adding SNESSetLinearSolve()

2007-10-29 Thread Barry Smith
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 petsc release. My

adding SNESSetLinearSolve()

2007-10-29 Thread Matthew Knepley
On 10/29/07, Lisandro Dalcin dalcinl at gmail.com 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:

adding SNESSetLinearSolve()

2007-10-29 Thread Barry Smith
On Mon, 29 Oct 2007, Lisandro Dalcin wrote: On 10/29/07, Barry Smith bsmith at mcs.anl.gov 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

adding SNESSetLinearSolve()

2007-10-29 Thread Richard Tran Mills
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

adding SNESSetLinearSolve()

2007-10-29 Thread Lisandro Dalcin
On 10/29/07, Barry Smith bsmith at mcs.anl.gov 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

adding SNESSetLinearSolve()

2007-10-29 Thread Barry Smith
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

adding SNESSetLinearSolve()

2007-10-29 Thread Lisandro Dalcin
On 10/29/07, Richard Tran Mills rmills at ornl.gov 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