[petsc-dev] Matrix Free Conjugate Gradient

Hesameddin Ilatikhameneh hilatikh at purdue.edu
Fri Nov 30 23:53:33 CST 2012


Could you provide more information/example.
I don't know that for example for matrix-free conjugate gradient in Petsc which matrix operation I should do.
I guess that I need to write the function that gives Jacobian times a vector which is vector (Since I don't want to store Jacobian).
If it is so, which vector is that vector? Petsc will do which parts of the algorithm?

Thanks for your help.

Hesam

----- Original Message -----
From: "Jed Brown" <jedbrown at mcs.anl.gov>
To: "For users of the development version of PETSc" <petsc-dev at mcs.anl.gov>
Sent: Saturday, December 1, 2012 12:37:22 AM
Subject: Re: [petsc-dev] Matrix Free Conjugate Gradient

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatShellSetOperation.html 



Note that without an assembled matrix, you'll generally need to write your own preconditioner, which you can do using PCShell. 



On Fri, Nov 30, 2012 at 11:24 PM, Hesameddin Ilatikhameneh < hilatikh at purdue.edu > wrote: 


Hello, 

We have a very large system (100M variables) which we want to minimize its energy. We are using Petsc extensively for matrix operations. 
I know that it is theoretically possible to use conjugate gradient method without storing Jacobian matrix (which is very huge in this case) since the conjugate gradient needs Jacobian times a vector not Jacobian itself. 

I read your manual about matrix free methods but I couldn't find where I can determine that function to Jacobian times a vector. 

I appreciate your help. 

Thanks 
Hesam 



More information about the petsc-dev mailing list