<div class="gmail_quote">On Tue, May 3, 2011 at 19:01, Nun ion <span dir="ltr"><<a href="mailto:m.skates82@gmail.com">m.skates82@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>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. </div>
</blockquote><div><br></div><div>It is solving a 2D problem, therefore that is the length of the vector.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div> 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?</div>
</blockquote></div><br><div>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.</div>