Cast matrix as a vector?

liu chang liuchangjohn at
Sun May 3 04:42:08 CDT 2009

I'm using TAO's LMVM method for optimize a dense matrix, but TAO
expects its input as a Vec. Do I have to copy the content back and
forth between a Mat and a Vec? Can I somehow cast the Mat into a Vec?

Both the Mat and the Vec are distributed evenly across the processes
so ideally there doesn't need to be any copying at all.

Liu Chang

More information about the petsc-users mailing list