how to inverse a sparse matrix in Petsc?

2008-02-06 Thread Ben Tay
Thank you Barry for your enlightenment. I'll just continue to use BoomerAMG for the poisson eqn. I'll also check up on FFTW. Last time, I recalled that there seemed to be some restrictions for FFT on solving poisson eqn. It seems that the grids must be constant in at least 1 dimension. I

how to inverse a sparse matrix in Petsc?

2008-02-06 Thread Ben Tay
Sorry Barry, I just would like to confirm that as long as it's a constant constant coefficient Poisson eqn with Neumann or Dirchelet boundary conditions, I can use FFT. It doesn't matter if the grids are uniform or not. Is that correct? Thanks. Barry Smith wrote: On Feb 5, 2008, at 8:48 PM,

how to inverse a sparse matrix in Petsc?

2008-02-06 Thread Barry Smith
Whoops, actually the grids in each direction would need to be uniform. Barry On Feb 5, 2008, at 9:39 PM, Ben Tay wrote: Sorry Barry, I just would like to confirm that as long as it's a constant constant coefficient Poisson eqn with Neumann or Dirchelet boundary conditions, I

Overdetermined, non-linear

2008-02-06 Thread Erlend Pedersen :.
On Tue, 2008-02-05 at 07:31 -0600, Matthew Knepley wrote: On Feb 5, 2008 3:26 AM, Erlend Pedersen :. erlend.pedersen at holberger.com wrote: On Sun, 2008-02-03 at 19:59 -0600, Matthew Knepley wrote: On Feb 1, 2008 5:54 AM, Erlend Pedersen :. erlend.pedersen at holberger.com wrote: I

how to inverse a sparse matrix in Petsc?

2008-02-06 Thread Lisandro Dalcin
Well, after taking into accout Barry's comments, you have have the following choices. * You can use a direct method based on LU factorization using '-ksp_type preonly -pc_type lu' . This way, PETSc will compute the LU factors the fist time they are needed; after that, every call to KSPSolve will