[petsc-users] Complex spmv performance

Jed Brown jed at 59A2.org
Tue May 3 12:09:55 CDT 2011


On Tue, May 3, 2011 at 19:01, Nun ion <m.skates82 at gmail.com> wrote:

> I understand PETSc replaces the scalar data type with a complex type for
> all solvers, and that configuring with fortran kernels improves performance,
> however it is unclear to me why in .../ksp/ksp/examples/tutorials/ex11.c the
> dimension of the matrix is set to: dim = n*n.
>

It is solving a 2D problem, therefore that is the length of the vector.


> If the matrix entries are stored in CSR can one interpret a matrix with
> complex entries as a vector where each entry is complex-valued or does this
> approach create 'two' matrices one with the real value the other with the
> imaginary part?
>

They are stored with fields interlaced, but you shouldn't think about it as
a "vector" except for very special things like trying to minimize energy of
the rows subject to sparsity constraints.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110503/5a214125/attachment.htm>


More information about the petsc-users mailing list